use ENUM_CLASS_RANGE

This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2022-06-30 11:14:39 +08:00
parent 1e14c1b01d
commit 9582bfafcc
2 changed files with 8 additions and 13 deletions

View File

@ -25,9 +25,7 @@ namespace hgl
StreamDevice, ///<流式设备(如摄像头、麦克风) StreamDevice, ///<流式设备(如摄像头、麦克风)
Network, ///<网络 Network, ///<网络
BEGIN_RANGE =Memory, ENUM_CLASS_RANGE(Memory,Network)
END_RANGE =Network,
RANGE_SIZE =(END_RANGE-BEGIN_RANGE)+1
};//enum class SourceType };//enum class SourceType
/** /**
@ -35,14 +33,12 @@ namespace hgl
*/ */
enum class IndexType enum class IndexType
{ {
itAnonymous=0, ///<匿名访问 Anonymous=0, ///<匿名访问
itName, ///<字符串名称 Name, ///<字符串名称
itID, ///<ID ID, ///<ID
itPosition, ///<坐标访问(如图数据库) Position, ///<坐标访问(如图数据库)
BEGIN_RANGE =itAnonymous, ENUM_CLASS_RANGE(Anonymous,Position)
END_RANGE =itPosition,
RANGE_SIZE =(END_RANGE-BEGIN_RANGE)+1
};//enum class IndexType };//enum class IndexType
/** /**

View File

@ -1,6 +1,7 @@
#ifndef HGL_ASSETS_TYPE_INCLUDE #ifndef HGL_ASSETS_TYPE_INCLUDE
#define HGL_ASSETS_TYPE_INCLUDE #define HGL_ASSETS_TYPE_INCLUDE
#include<hgl/TypeFunc.h>
namespace hgl namespace hgl
{ {
/** /**
@ -17,9 +18,7 @@ namespace hgl
Wave, ///<声音数据 Wave, ///<声音数据
Video, ///<视频数据 Video, ///<视频数据
BEGIN_RANGE =Binary, ENUM_CLASS_RANGE(Binary,Video)
END_RANGE =Video,
RANGE_SIZE =(END_RANGE-BEGIN_RANGE)+1
};//enum class AssetsType };//enum class AssetsType
}//namespace hgl }//namespace hgl
#endif//HGL_ASSETS_TYPE_INCLUDE #endif//HGL_ASSETS_TYPE_INCLUDE