00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 00040 #ifndef _STATTIMESTAMPELEM_H_ 00041 #define _STATTIMESTAMPELEM_H_ 00042 #ifdef __sgi 00043 #pragma once 00044 #endif 00045 00046 00047 #include <OSGBaseTypes.h> 00048 #include <OSGSystemDef.h> 00049 00050 #include <OSGStatElem.h> 00051 00052 #include <OSGTime.h> 00053 00054 OSG_BEGIN_NAMESPACE 00055 00056 class StatElemDescBase; 00057 00060 class OSG_SYSTEMLIB_DLLMAPPING StatTimeStampElem : public StatElem 00061 { 00062 00063 /*========================== PUBLIC =================================*/ 00064 public: 00065 00066 /*---------------------------------------------------------------------*/ 00070 static const char *getClassname(void) { return "StatTimeStampElem"; } 00071 00073 /*---------------------------------------------------------------------*/ 00077 static StatElem *create ( StatElemDescBase *desc ); 00078 00080 /*---------------------------------------------------------------------*/ 00084 virtual void reset (void); 00085 00086 inline const TimeStamp &start (void); 00087 00088 inline const TimeStamp &stop (void); 00089 00090 inline const TimeStamp &getTime (void) const; 00091 00092 virtual void putToString (std::string &str, 00093 const char *format = NULL) const; 00094 00095 virtual bool getFromString(const Char8 *&inVal); 00096 00097 virtual Real64 getValue (void) const; 00098 00100 /*---------------------------------------------------------------------*/ 00104 bool operator < (const StatTimeStampElem &other) const; 00105 00107 /*---------------------------------------------------------------------*/ 00111 virtual StatElem *clone(void) const; 00112 00114 /*---------------------------------------------------------------------*/ 00118 virtual StatElem &operator += (const StatElem &other); 00119 00122 /*========================= PROTECTED ===============================*/ 00123 protected: 00124 00125 /*---------------------------------------------------------------------*/ 00129 StatTimeStampElem(StatElemDescBase *desc); 00130 00131 virtual ~StatTimeStampElem(void); 00132 00134 /*========================= PRIVATE ===============================*/ 00135 private: 00136 00137 typedef StatElem Inherited; 00138 00139 TimeStamp _time; 00140 00141 StatTimeStampElem (const StatTimeStampElem &source); 00142 00143 StatTimeStampElem& operator =(const StatTimeStampElem &source); 00144 }; 00145 00146 //--------------------------------------------------------------------------- 00147 // Exported Types 00148 //--------------------------------------------------------------------------- 00149 00150 // class pointer 00151 00152 typedef StatTimeStampElem *StatTimeStampElemP; 00153 00154 OSG_END_NAMESPACE 00155 00156 #include <OSGStatTimeStampElem.inl> 00157 00158 #define OSGSTATTIMESTAMPELEM_HEADER_CVSID "@(#)$Id: OSGStatTimeStampElem.h,v 1.1 2005/10/02 15:16:45 dirk Exp $" 00159 00160 #endif /* _STATTIMESTAMPELEM_H_ */
1.5.5