00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _CEGUIProperty_h_
00028 #define _CEGUIProperty_h_
00029
00030 #include "CEGUIBase.h"
00031 #include "CEGUIString.h"
00032
00033
00034
00035 namespace CEGUI
00036 {
00037
00042 class CEGUIBASE_API PropertyReceiver
00043 {
00044 public:
00045 PropertyReceiver() {}
00046 virtual ~PropertyReceiver() {}
00047 };
00048
00049
00057 class CEGUIBASE_API Property
00058 {
00059 public:
00073 Property(const String& name, const String& help, const String& defaultValue = "") :
00074 d_name(name),
00075 d_help(help),
00076 d_default(defaultValue)
00077 {
00078 }
00079
00080
00085 virtual ~Property(void) {}
00086
00087
00095 const String& getHelp(void) const {return d_help;}
00096
00097
00105 const String& getName(void) const {return d_name;}
00106
00107
00118 virtual String get(const PropertyReceiver* receiver) const = 0;
00119
00120
00136 virtual void set(PropertyReceiver* receiver, const String& value) = 0;
00137
00138
00150 virtual bool isDefault(const PropertyReceiver* receiver) const;
00151
00152
00163 virtual String getDefault(const PropertyReceiver* receiver) const;
00164
00165 protected:
00166 String d_name;
00167 String d_help;
00168 String d_default;
00169 };
00170
00171 }
00172
00173 #endif // end of guard _CEGUIProperty_h_