Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_MFTIME_H 00002 #define XDKWRL_MFTIME_H 00003 00004 #include <xdkwrl/fieldtypes/sftime.h> 00005 #include <deque> 00006 #include <algorithm> 00007 #include <iterator> 00008 00009 namespace wrl 00010 { 00011 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00012 // Interface of MFTime 00013 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00014 /*! \ingroup fieldtypes 00015 * 00016 * A MFTime is a container of SFTime. It is implemented using a STL's 00017 * deque so you can benefit from its interface. Most common 00018 * functionnalities you would use are: 00019 \code 00020 MFTime mf; 00021 mf.push_back(SFTime(60.0f)); // push_back (60.0f); would fail since 00022 mf.push_front(SFTime(30.0f)); // constructor SFTime(float) is explicit 00023 mf[0].setNbSeconds(10.0f); 00024 \endcode 00025 * but since it uses STL principles, you have all useful concepts such as 00026 * iterator, algorithms, etc... 00027 * 00028 * Below is included the documentation for this field type from the ISO 00029 * standard. 00030 * \htmlinclude sftime.html 00031 */ 00032 class MFTime : public std::deque<SFTime> 00033 { 00034 public: 00035 static inline const char* typeName(); 00036 static inline FieldTypeId typeId(); 00037 friend std::ostream& operator<<(std::ostream& s,const MFTime& f); 00038 }; 00039 //************************************************************ 00040 // Implementation of MFTime 00041 //************************************************************ 00042 inline const char* 00043 MFTime::typeName() 00044 { 00045 return "MFTime"; 00046 } 00047 inline FieldTypeId 00048 MFTime::typeId() 00049 { 00050 return mfTime; 00051 } 00052 inline std::ostream& operator<<(std::ostream& s,const MFTime& f) 00053 { 00054 s<<'['; 00055 std::copy(f.begin(),f.end(),std::ostream_iterator<SFTime>(s," ")); 00056 return s<<']'; 00057 } 00058 } 00059 00060 #endif // XDKWRL_MFTIME_H
Generated on 24 Feb 2005 with
![]() |
|