add AssetsType/Source files

This commit is contained in:
hyzboy 2020-01-12 19:33:39 +08:00
parent 4683240be0
commit ef66ff499e
4 changed files with 66 additions and 0 deletions

8
CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.0)
project(CMAssetsManage)
include(path_config.cmake)
CMAssetsManageSetup(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(${CMASSETS_MANAGE_ROOT_SOURCE_PATH})

View File

@ -0,0 +1,24 @@
#ifndef HGL_ASSETS_SOURCE_INCLUDE
#define HGL_ASSETS_SOURCE_INCLUDE
namespace hgl
{
/**
*
*/
enum class AssetsSource
{
Memory=0, ///<内存
Filesystem, ///<文件系统
Archive, ///<打包/压缩档
Database, ///<数据库
SaveDevice, ///<存储设备
StreamDevice, ///<流式设备(如摄像头、麦克风)
Network, ///<网络
BEGIN_RANGE =Memory,
END_RANGE =Network,
RANGE_SIZE =(END_RANGE-BEGIN_RANGE)+1
};//enum class AssetsSource
}//namespace hgl
#endif//HGL_ASSETS_SOURCE_INCLUDE

View File

@ -0,0 +1,25 @@
#ifndef HGL_ASSETS_TYPE_INCLUDE
#define HGL_ASSETS_TYPE_INCLUDE
namespace hgl
{
/**
*
*/
enum class AssetsType
{
Binary=0, ///<二进制数据
Text, ///<文本
Bitmap, ///<位图
Vector, ///<矢量图
MIDI, ///<MIDI音乐
Wave, ///<声音数据
Video, ///<视频数据
BEGIN_RANGE =Binary,
END_RANGE =Video,
RANGE_SIZE =(END_RANGE-BEGIN_RANGE)+1
};//enum class AssetsType
}//namespace hgl
#endif//HGL_ASSETS_TYPE_INCLUDE

9
path_config.cmake Normal file
View File

@ -0,0 +1,9 @@
macro(CMAssetsManageSetup CMASSETS_MANAGE_ROOT_PATH)
message("CMASSETS_MANAGE_ROOT_PATH: " ${CMASSETS_MANAGE_ROOT_PATH})
set(CMASSETS_MANAGE_ROOT_INCLUDE_PATH ${CMASSETS_MANAGE_ROOT_PATH}/inc)
set(CMASSETS_MANAGE_ROOT_SOURCE_PATH ${CMASSETS_MANAGE_ROOT_PATH}/src)
include_directories(${CMASSETS_MANAGE_ROOT_INCLUDE_PATH})
endmacro()