Home Hierarchy Members Alphabetical Related Pages

mfvec3f.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_MFVEC3F_H
00002 #define XDKWRL_MFVEC3F_H
00003 
00004 #include <xdkwrl/fieldtypes/sfvec3f.h>
00005 #include <deque>
00006 #include <algorithm>
00007 #include <iterator>
00008 
00009 namespace wrl
00010 {
00011   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00012   // Interface of  MFVec3f
00013   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00014   /*! \ingroup fieldtypes
00015    * 
00016    * A MFVec3f is a container of SFVec3f. 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    MFVec3f mf;
00021    mf.push_back(SFVec3f(0.0f,0.0f));  
00022    mf.push_front(SFVec3f(1.0f,0.0f));
00023    mf[0].setX(1.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 sfvec3f.html
00031    */
00032   class MFVec3f : public std::deque<SFVec3f>
00033   {
00034   public:
00035     inline MFVec3f();
00036     template <class T>
00037     inline MFVec3f(T first,T last);
00038     static inline const char* typeName();
00039     static inline FieldTypeId typeId();
00040     friend std::ostream& operator<<(std::ostream& s,const MFVec3f& f);
00041   };
00042   //************************************************************
00043   // Implementation of MFVec3f
00044   //************************************************************
00045   inline MFVec3f::MFVec3f()
00046   {
00047   }
00048   template <class T>  
00049   inline MFVec3f::MFVec3f(T first,T last)
00050     : std::deque<SFVec3f>(first,last)
00051   {
00052   }
00053   inline const char*
00054   MFVec3f::typeName()
00055   {
00056     return "MFVec3f";
00057   }
00058   inline FieldTypeId
00059   MFVec3f::typeId()
00060   {
00061     return mfVec3f;
00062   }  
00063   inline std::ostream& operator<<(std::ostream& s,const MFVec3f& f)
00064   {
00065     s<<'[';
00066     std::copy(f.begin(),f.end(),std::ostream_iterator<SFVec3f>(s," "));
00067     return s<<']';
00068   }  
00069 }
00070 
00071 #endif // XDKWRL_MFVEC3F_H

Generated on 24 Feb 2005 with doxygen version 1.3.9.1. Valid HTML 4.0! Valid CSS!