1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
40 #ifndef _OSGSTATELEM_H_
41 #define _OSGSTATELEM_H_
46 #include "OSGBaseTypes.h"
52 class StatElemDescBase
;
54 /*! \brief Single Statistics element, see \ref PageSystemStatistics for
56 \ingroup GrpBaseStatistics
57 \ingroup GrpLibOSGBase
60 class OSG_BASE_DLLMAPPING StatElem
62 /*========================== PUBLIC =================================*/
66 /*---------------------------------------------------------------------*/
70 bool isOn (void ) const;
73 StatElemDescBase
*getDesc(void ) const;
76 /*---------------------------------------------------------------------*/
77 /*! \name Destructor */
80 virtual void putToString ( std::string
&str
,
81 const std::string
&format
= std::string()) const = 0;
83 virtual bool getFromCString(const Char8
*&inVal
) = 0;
85 virtual Real64
getValue (void ) const = 0;
87 virtual void reset (void ) = 0;
90 /*---------------------------------------------------------------------*/
91 /*! \name Destructor */
94 virtual ~StatElem(void);
97 /*---------------------------------------------------------------------*/
98 /*! \name Comparison */
101 bool operator < (const StatElem
&other
) const;
104 /*---------------------------------------------------------------------*/
105 /*! \name Creation */
108 virtual StatElem
*clone(void) const = 0;
111 /*---------------------------------------------------------------------*/
112 /*! \name Operators */
115 virtual StatElem
&operator += (const StatElem
&other
) = 0;
118 /*========================= PROTECTED ===============================*/
122 StatElem (StatElemDescBase
*desc
);
124 /*========================== PRIVATE ================================*/
129 StatElemDescBase
*_desc
;
131 // prohibit default functions (move to 'public' if you need one)
133 StatElem (const StatElem
&source
);
134 StatElem
& operator =(const StatElem
&source
);
137 typedef StatElem
*StatElemP
;
141 #include "OSGStatElem.inl"
143 #endif /* _OSGSTATELEM_H_ */