PixelLightAPI  .
MemberDesc.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: MemberDesc.h                                   *
00003  *
00004  *  Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/)
00005  *
00006  *  This file is part of PixelLight.
00007  *
00008  *  PixelLight is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU Lesser General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  PixelLight is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  *  GNU Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public License
00019  *  along with PixelLight. If not, see <http://www.gnu.org/licenses/>.
00020 \*********************************************************/
00021 
00022 
00023 #ifndef __PLCORE_MEMBERDESC_H__
00024 #define __PLCORE_MEMBERDESC_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLCore/String/String.h"
00032 #include "PLCore/PLCoreDefinitions.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLCore {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Forward declarations                                  ]
00043 //[-------------------------------------------------------]
00044 class ClassReal;
00045 
00046 
00047 //[-------------------------------------------------------]
00048 //[ Classes                                               ]
00049 //[-------------------------------------------------------]
00050 /**
00051 *  @brief
00052 *    Member descriptor
00053 *
00054 *  @remarks
00055 *    This class contains a descriptor for a member of a class, such as a variable
00056 *    or a method. It consists of information equal for all member types (name, description, etc.).
00057 */
00058 class MemberDesc {
00059 
00060 
00061     //[-------------------------------------------------------]
00062     //[ Public functions                                      ]
00063     //[-------------------------------------------------------]
00064     public:
00065         /**
00066         *  @brief
00067         *    Constructor
00068         *
00069         *  @param[in] nMemberType
00070         *    Member type
00071         *  @param[in] sName
00072         *    Var name
00073         *  @param[in] sDescription
00074         *    Var description
00075         *  @param[in] sAnnotation
00076         *    Var annotation
00077         */
00078         PLCORE_API MemberDesc(EMemberType nMemberType, const String &sName, const String &sDescription, const String &sAnnotation);
00079 
00080         /**
00081         *  @brief
00082         *    Destructor
00083         */
00084         PLCORE_API virtual ~MemberDesc();
00085 
00086         /**
00087         *  @brief
00088         *    Get member type
00089         *
00090         *  @return
00091         *    Member type
00092         */
00093         inline EMemberType GetMemberType() const;
00094 
00095         /**
00096         *  @brief
00097         *    Get name
00098         *
00099         *  @return
00100         *    Name
00101         */
00102         inline String GetName() const;
00103 
00104         /**
00105         *  @brief
00106         *    Get description
00107         *
00108         *  @return
00109         *    Description
00110         */
00111         inline String GetDescription() const;
00112 
00113         /**
00114         *  @brief
00115         *    Get annotation
00116         *
00117         *  @return
00118         *    Annotation
00119         */
00120         inline String GetAnnotation() const;
00121 
00122 
00123     //[-------------------------------------------------------]
00124     //[ Protected functions                                   ]
00125     //[-------------------------------------------------------]
00126     protected:
00127         /**
00128         *  @brief
00129         *    Register member at class
00130         *
00131         *  @param[in] pClass
00132         *    Pointer to class (must be valid!)
00133         */
00134         PLCORE_API void Register(ClassReal *pClass);
00135 
00136 
00137     //[-------------------------------------------------------]
00138     //[ Protected data                                        ]
00139     //[-------------------------------------------------------]
00140     protected:
00141         EMemberType m_nMemberType;  /**< Member type */
00142         String      m_sName;        /**< Name */
00143         String      m_sDescription; /**< Description */
00144         String      m_sAnnotation;  /**< Annotation */
00145 
00146 
00147 };
00148 
00149 
00150 //[-------------------------------------------------------]
00151 //[ Namespace                                             ]
00152 //[-------------------------------------------------------]
00153 } // PLCore
00154 
00155 
00156 //[-------------------------------------------------------]
00157 //[ Implementation                                        ]
00158 //[-------------------------------------------------------]
00159 #include "PLCore/Base/MemberDesc.inl"
00160 
00161 
00162 #endif // __PLCORE_MEMBERDESC_H__


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:08:57
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported