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 \*---------------------------------------------------------------------------*/
39 #ifndef _STATTIMEELEM_H_
40 #define _STATTIMEELEM_H_
46 #include "OSGStatElem.h"
52 class StatElemDescBase
;
54 /*! \brief Time Statistics element, see \ref PageSystemStatistics for details.
55 \ingroup GrpBaseStatistics
56 \ingroup GrpLibOSGBase
59 class OSG_BASE_DLLMAPPING StatTimeElem
: public StatElem
62 /*========================== PUBLIC =================================*/
66 /*---------------------------------------------------------------------*/
67 /*! \name your_category */
70 static StatElem
*create(StatElemDescBase
*desc
);
73 /*---------------------------------------------------------------------*/
77 virtual void reset (void);
79 const Time
&start (void);
80 const Time
&stop (void);
81 const Time
&getTime(void) const;
84 /*---------------------------------------------------------------------*/
88 virtual void putToString ( std::string
&str
,
89 const std::string
&format
= std::string()) const;
91 virtual bool getFromCString(const Char8
*&inVal
);
93 virtual Real64
getValue ( void ) const;
96 /*---------------------------------------------------------------------*/
97 /*! \name comparison */
100 bool operator < (const StatTimeElem
&other
) const;
103 /*---------------------------------------------------------------------*/
104 /*! \name Creation */
107 virtual StatElem
*clone(void) const;
110 /*---------------------------------------------------------------------*/
111 /*! \name Operators */
114 virtual StatElem
&operator += (const StatElem
&other
);
117 /*========================= PROTECTED ===============================*/
121 /*---------------------------------------------------------------------*/
122 /*! \name Constructors */
125 StatTimeElem(StatElemDescBase
*desc
);
127 virtual ~StatTimeElem(void);
130 /*========================= PRIVATE ===============================*/
134 typedef StatElem Inherited
;
139 // prohibit default functions (move to 'public' if you need one)
140 StatTimeElem (const StatTimeElem
&source
);
141 StatTimeElem
& operator =(const StatTimeElem
&source
);
144 //---------------------------------------------------------------------------
146 //---------------------------------------------------------------------------
148 typedef StatTimeElem
*StatTimeElemP
;
152 #include "OSGStatTimeElem.inl"
154 #endif /* _STATTIMEELEM_H_ */