00001 /*! \file 00002 \author victorien ferry & www.m4nkind.com 00003 \brief This file applies the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 , read file COPYING. 00004 */ 00005 #ifndef COM_M4NKIND_PackULong_Enums_H 00006 #define COM_M4NKIND_PackULong_Enums_H 00007 00008 #include "PackULong.h" 00009 00010 #ifdef _ENGINE_EDITABLE_ 00011 // if we are in editable mode: 00012 /*! 00013 \class PackULong_Enums 00014 \ingroup BaseSerializableClass 00015 \brief PackULong_Enums specialize PackULong to define from 1 to 28 bit bitfield 00016 where each bit stands as a boolean value with a given meaning. 00017 */ 00018 class PackULong_Enums : public PackULong 00019 { 00020 /*================================================================== 00021 PUBLIC 00022 ==================================================================*/ 00023 public: 00024 /*! 00025 \brief Constructor. 00026 */ 00027 PackULong_Enums(void); 00028 /*! 00029 \brief Destructor. 00030 */ 00031 virtual ~PackULong_Enums(void); 00032 /*! 00033 \brief Each BaseType's inherited classes must explicit an ID for their 00034 class, or let use one of the super class at least through this virtual method. 00035 This is needed by GUIs to detect the types of each sub-members, and shape 00036 an interface for each Object according to their member list. 00037 \return a const character string, that must be unique and unchanged for all serializable base type. 00038 */ 00039 virtual const char *GetClassID() const { return "PackULong::PackULong_Enums"; }; 00040 /*! 00041 \brief convert the value of this object to an explicit string. The object manages the string privately, 00042 so just read it or copy it. the string would be destroyed with the objects, and changed when using Set() methods. 00043 Note: this is not virtual, but each class can manage m_pValueString or not. 00044 \return the value as a const string. 00045 */ 00046 virtual const char *ValueToString(); 00047 /*! 00048 \brief set an infostring for the bitfield meaning. 00049 \param _meaning a string looking like: "enum0.enum1.enum2" for each known values 00050 */ 00051 virtual void SetEnumsInfo( const char *_meaning ); 00052 /*! 00053 \brief get an infostring for the enums meaning. 00054 \return a string looking like: "enum0.enum1.enum2" for each known values 00055 */ 00056 const char *GetEnumsInfo( ){ return m_Enums_Meaning_MemberName; }; 00057 00058 /*================================================================== 00059 PROTECTED 00060 ==================================================================*/ 00061 protected: 00062 //! the BitFieldInfo string 00063 const char *m_Enums_Meaning_MemberName; 00064 00065 }; 00066 /*! 00067 \def REGISTER_MEMBER_ENUMS 00068 00069 \brief This macro is used for member registration and to specify the enum list 00070 */ 00071 #define REGISTER_MEMBER_ENUMS(_object,_MemberName,_DefaultVal,_InfoEnumsList) \ 00072 REGISTER_MEMBER(_object,_MemberName)\ 00073 _object.Set(_DefaultVal);\ 00074 _object.SetEnumsInfo( _InfoEnumsList ); 00075 00076 #else 00077 /*================================================================== 00078 WHEN NON EDITABLE: 00079 ==================================================================*/ 00080 // if we are in non-editable mode: 00081 /*! 00082 \class PackULong_Enums 00083 00084 \brief PackULong_Enums specialize PackULong to define from 1 to 28 bit bitfield 00085 where each bit stands as a boolean value with a given meaning. 00086 */ 00087 typedef PackULong PackULong_Enums; 00088 /*! 00089 \def REGISTER_MEMBER_ENUMS 00090 00091 \brief This macro is used for member registration and to specify the enum list 00092 */ 00093 00094 #define REGISTER_MEMBER_ENUMS(_object,_MemberName,_DefaultVal,_InfoEnumsList) \ 00095 REGISTER_MEMBER(_object,_MemberName) 00096 00097 // end of editable mode test : 00098 #endif 00099 00100 // end of file: 00101 #endif
/\/\ 4 N k ! N D _______ _ __ ___ _____ ___ _ _ ____ ___________ __//___ /________ |/ / ___________\_______/ \ / _ _ \/ _ / _ / _/_/____/ _ __ / / / / / / / \ \/ / / \ \ / \\___/___/___/ ¯ _____/_____/ ______\___/_____/\________\\ \________/_ ___ __ l____\ /elD! http://www.m4nkind.com \____/