fixed: gcc8 compile issues
[opensg.git] / Source / Base / Statistics / OSGStatStringElem.h
blob015223ffc521ad9e54b1723505d7bbe0346c7622
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSTATSTRINGELEM_H_
40 #define _OSGSTATSTRINGELEM_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGStatElem.h"
47 OSG_BEGIN_NAMESPACE
49 class StatElemDescBase;
51 /*! \brief String Statistics element, see \ref PageSystemStatistics for
52 details.
53 \ingroup GrpBaseStatistics
54 \ingroup GrpLibOSGBase
57 class OSG_BASE_DLLMAPPING StatStringElem : public StatElem
59 /*========================== PUBLIC =================================*/
61 public:
63 /*---------------------------------------------------------------------*/
64 /*! \name your_category */
65 /*! \{ */
67 static StatElem *create(StatElemDescBase *desc);
69 /*! \} */
70 /*---------------------------------------------------------------------*/
71 /*! \name instance */
72 /*! \{ */
74 const std::string &get ( void ) const;
75 void set (const std::string &value);
76 void set (const Char8 *value);
78 virtual void reset(void );
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name instance */
83 /*! \{ */
85 virtual void putToString ( std::string &str,
86 const std::string &format = std::string()) const;
88 virtual bool getFromCString(const Char8 *&inVal );
90 virtual Real64 getValue ( void ) const;
92 /*! \} */
93 /*---------------------------------------------------------------------*/
94 /*! \name comparison */
95 /*! \{ */
97 bool operator < (const StatStringElem &other) const;
99 /*! \} */
100 /*---------------------------------------------------------------------*/
101 /*! \name Creation */
102 /*! \{ */
104 virtual StatElem *clone(void) const;
106 /*! \} */
107 /*---------------------------------------------------------------------*/
108 /*! \name Operators */
109 /*! \{ */
111 virtual StatElem &operator += (const StatElem &other);
113 /*! \} */
114 /*========================= PROTECTED ===============================*/
116 protected:
118 /*---------------------------------------------------------------------*/
119 /*! \name Constructors */
120 /*! \{ */
122 StatStringElem(StatElemDescBase *desc);
124 virtual ~StatStringElem(void);
126 /*! \} */
128 /*========================= PRIVATE ===============================*/
129 private:
131 typedef StatElem Inherited;
133 std::string _value;
136 // prohibit default functions (move to 'public' if you need one)
137 StatStringElem(const StatStringElem &source);
138 StatStringElem &operator =(const StatStringElem &source);
141 //---------------------------------------------------------------------------
142 // Exported Types
143 //---------------------------------------------------------------------------
145 typedef StatStringElem *StatStringElemP;
147 OSG_END_NAMESPACE
149 #include "OSGStatStringElem.inl"
151 #endif /* _OSGSTATSTRINGELEM_H_ */