• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

CEGUIPropertySet.h

00001 /***********************************************************************
00002         filename:       CEGUIPropertySet.h
00003         created:        21/2/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Defines interface for the PropertySet class
00007 *************************************************************************/
00008 /***************************************************************************
00009  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
00010  *
00011  *   Permission is hereby granted, free of charge, to any person obtaining
00012  *   a copy of this software and associated documentation files (the
00013  *   "Software"), to deal in the Software without restriction, including
00014  *   without limitation the rights to use, copy, modify, merge, publish,
00015  *   distribute, sublicense, and/or sell copies of the Software, and to
00016  *   permit persons to whom the Software is furnished to do so, subject to
00017  *   the following conditions:
00018  *
00019  *   The above copyright notice and this permission notice shall be
00020  *   included in all copies or substantial portions of the Software.
00021  *
00022  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00023  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00024  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00025  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00026  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00027  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00028  *   OTHER DEALINGS IN THE SOFTWARE.
00029  ***************************************************************************/
00030 #ifndef _CEGUIPropertySet_h_
00031 #define _CEGUIPropertySet_h_
00032 
00033 #include "CEGUIBase.h"
00034 #include "CEGUIString.h"
00035 #include "CEGUIIteratorBase.h"
00036 #include "CEGUIProperty.h"
00037 #include <map>
00038 
00039 
00040 #if defined(_MSC_VER)
00041 #       pragma warning(push)
00042 #       pragma warning(disable : 4251)
00043 #endif
00044 
00045 // Start of CEGUI namespace section
00046 namespace CEGUI
00047 {
00052 class CEGUIEXPORT PropertySet : public PropertyReceiver
00053 {
00054 public:
00059         PropertySet(void) {}
00060 
00061 
00066         virtual ~PropertySet(void) {}
00067 
00068 
00082         void    addProperty(Property* property);
00083 
00084 
00095         void    removeProperty(const String& name);
00096 
00097 
00105         void    clearProperties(void);
00106 
00107 
00118         bool    isPropertyPresent(const String& name) const;
00119 
00120 
00133         const String&   getPropertyHelp(const String& name) const;
00134 
00135 
00148         String  getProperty(const String& name) const;
00149 
00150 
00167         void    setProperty(const String& name, const String& value);
00168 
00169 
00181         bool    isPropertyDefault(const String& name) const;
00182 
00183 
00194         String  getPropertyDefault(const String& name) const;
00195 
00196 private:
00197         typedef std::map<String, Property*, String::FastLessCompare>    PropertyRegistry;
00198         PropertyRegistry        d_properties;
00199 
00200 
00201 public:
00202         /*************************************************************************
00203                 Iterator stuff
00204         *************************************************************************/
00205     typedef     ConstBaseIterator<PropertyRegistry> Iterator;
00206 
00212     Iterator getIterator(void) const;
00213 };
00214 
00215 } // End of  CEGUI namespace section
00216 
00217 #if defined(_MSC_VER)
00218 #       pragma warning(pop)
00219 #endif
00220 
00221 #endif  // end of guard _CEGUIPropertySet_h_

Generated on Fri Nov 19 2010 12:01:20 for Crazy Eddies GUI System by  doxygen 1.7.2