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 _STATTIMESTAMPELEM_H_
40 #define _STATTIMESTAMPELEM_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 StatTimeStampElem
: public StatElem
62 /*========================== PUBLIC =================================*/
66 /*---------------------------------------------------------------------*/
67 /*! \name your_category */
70 static StatElem
*create(StatElemDescBase
*desc
);
73 /*---------------------------------------------------------------------*/
77 virtual void reset (void);
79 const TimeStamp
&start (void);
81 const TimeStamp
&stop (void);
83 const TimeStamp
&getTime(void) const;
86 /*---------------------------------------------------------------------*/
90 virtual void putToString ( std::string
& str
,
91 const std::string
&format
= std::string()) const;
93 virtual bool getFromCString(const Char8
*&inVal
);
95 virtual Real64
getValue (void ) const;
98 /*---------------------------------------------------------------------*/
99 /*! \name comparison */
102 bool operator < (const StatTimeStampElem
&other
) const;
105 /*---------------------------------------------------------------------*/
106 /*! \name Creation */
109 virtual StatElem
*clone(void) const;
112 /*---------------------------------------------------------------------*/
113 /*! \name Operators */
116 virtual StatElem
&operator += (const StatElem
&other
);
119 /*========================= PROTECTED ===============================*/
123 /*---------------------------------------------------------------------*/
124 /*! \name Constructors */
127 StatTimeStampElem(StatElemDescBase
*desc
);
129 virtual ~StatTimeStampElem(void);
132 /*========================= PRIVATE ===============================*/
136 typedef StatElem Inherited
;
140 // prohibit default functions (move to 'public' if you need one)
141 StatTimeStampElem (const StatTimeStampElem
&source
);
142 StatTimeStampElem
& operator =(const StatTimeStampElem
&source
);
145 //---------------------------------------------------------------------------
147 //---------------------------------------------------------------------------
149 typedef StatTimeStampElem
*StatTimeStampElemP
;
153 #include "OSGStatTimeStampElem.inl"
155 #endif /* _STATTIMESTAMPELEM_H_ */