source: GTP/trunk/Lib/Geom/OgreStuff/include/CEGUI/falagard/CEGUIFalPropertyInitialiser.h @ 1809

Revision 1809, 3.4 KB checked in by gumbau, 18 years ago (diff)
Line 
1/************************************************************************
2    filename:   CEGUIFalPropertyInitialiser.h
3    created:    Mon Jun 13 2005
4    author:     Paul D Turner <paul@cegui.org.uk>
5*************************************************************************/
6/*************************************************************************
7    Crazy Eddie's GUI System (http://www.cegui.org.uk)
8    Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
9 
10    This library is free software; you can redistribute it and/or
11    modify it under the terms of the GNU Lesser General Public
12    License as published by the Free Software Foundation; either
13    version 2.1 of the License, or (at your option) any later version.
14 
15    This library is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    Lesser General Public License for more details.
19 
20    You should have received a copy of the GNU Lesser General Public
21    License along with this library; if not, write to the Free Software
22    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23*************************************************************************/
24#ifndef _CEGUIFalPropertyInitialiser_h_
25#define _CEGUIFalPropertyInitialiser_h_
26
27#include "CEGUIPropertySet.h"
28
29
30// Start of CEGUI namespace section
31namespace CEGUI
32{
33    /*!
34    \brief
35        Class that holds information about a property and it's required initial value.
36    */
37    class CEGUIEXPORT PropertyInitialiser
38    {
39    public:
40        /*!
41        \brief
42            Constructor
43
44        \param property
45            String holding the name of the property targetted by this PropertyInitialiser.
46
47        \param value
48            String holding the value to be set by this PropertyInitialiser.
49        */
50        PropertyInitialiser(const String& property, const String& value);
51
52        /*!
53        \brief
54            Apply this property initialiser to the specified target CEGUI::PropertySet object.
55
56        \param target
57            CEGUI::PropertySet object to be initialised by this PropertyInitialiser.
58
59        \return
60            Nothing.
61        */
62        void apply(PropertySet& target) const;
63
64        /*!
65        \brief
66            Return the name of the property targetted by this PropertyInitialiser.
67
68        \return
69            String object holding the name of the target property.
70        */
71        const String& getTargetPropertyName() const;
72
73        /*!
74        \brief
75            Return the value string to be set on the property targetted by this PropertyInitialiser.
76
77        \return
78            String object holding the value string.
79        */
80        const String& getInitialiserValue() const;
81
82        /*!
83        \brief
84            Writes an xml representation of this PropertyInitialiser to \a out_stream.
85
86        \param out_stream
87            Stream where xml data should be output.
88
89        \return
90            Nothing.
91        */
92        void writeXMLToStream(OutStream& out_stream) const;
93
94    private:
95        CEGUI::String   d_propertyName;     //!< Name of a property to be set.
96        CEGUI::String   d_propertyValue;    //!< Value string to be set on the property.
97    };
98
99} // End of  CEGUI namespace section
100
101
102#endif  // end of guard _CEGUIFalPropertyInitialiser_h_
Note: See TracBrowser for help on using the repository browser.