Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUIProperty.h

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIProperty.h
00003         created:        21/2/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Defines the Property class which forms part of a
00007                                 PropertySet
00008 *************************************************************************/
00009 /*************************************************************************
00010     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00011     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00012 
00013     This library is free software; you can redistribute it and/or
00014     modify it under the terms of the GNU Lesser General Public
00015     License as published by the Free Software Foundation; either
00016     version 2.1 of the License, or (at your option) any later version.
00017 
00018     This library is distributed in the hope that it will be useful,
00019     but WITHOUT ANY WARRANTY; without even the implied warranty of
00020     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021     Lesser General Public License for more details.
00022 
00023     You should have received a copy of the GNU Lesser General Public
00024     License along with this library; if not, write to the Free Software
00025     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 *************************************************************************/
00027 #ifndef _CEGUIProperty_h_
00028 #define _CEGUIProperty_h_
00029 
00030 #include "CEGUIBase.h"
00031 #include "CEGUIString.h"
00032 
00033 
00034 // Start of CEGUI namespace section
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 } // End of  CEGUI namespace section
00172 
00173 #endif  // end of guard _CEGUIProperty_h_

Generated on Wed Feb 16 12:41:07 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1