XdkWrl: mfint32.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# mfint32.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_MFINT32_H
    00002 #define XDKWRL_MFINT32_H
    00003
    00004 #include <xdkwrl/config.h>
    00005 #include <xdkwrl/fieldtypes/sfint32.h>
    00006 #include <deque>
    00007 #include <algorithm>
    00008 #include <iterator>
    00009
    00010 namespace wrl
    00011 {
    00012   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00013   // Interface of  MFInt32
    00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00015   /*! \ingroup fieldtypes
    00016    *
    00017    * A MFInt32 is a container of SFInt32. It is implemented using a STL's
    00018    * deque so you can benefit from its interface. Most common
    00019    * functionnalities you would use are:
    00020    \code
    00021    MFInt32 mf;
    00022    mf.push_back(SFInt32(1));  // push_back (1); would fail since
    00023    mf.push_front(SFInt32(2)); // constructor SFInt32(int) is explicit
    00024    mf[0] = 3; // Valid since SFInt32 has operator=(int)
    00025    \endcode
    00026    * but since it uses STL principles, you have all useful concepts such as
    00027    * iterator, algorithms, etc...
    00028    *
    00029    * Below is included the documentation for this field type from the ISO
    00030    * standard.
    00031    * \htmlinclude sfint32.html
    00032    */
    00033   class XDKWRL_EXPORT MFInt32 : public std::deque<SFInt32>
    00034   {
    00035   public:
    00036     inline MFInt32();
    00037     template <class T>
    00038     inline MFInt32(T first,T last);
    00039     static inline const char* typeName();
    00040     static inline FieldTypeId typeId();
    00041     friend std::ostream& operator<<(std::ostream& s,const MFInt32& f);
    00042   };
    00043   //************************************************************
    00044   // Implementation of MFInt32
    00045   //************************************************************
    00046   inline
    00047   MFInt32::MFInt32()
    00048   {
    00049   }
    00050   template <class T>
    00051   inline
    00052   MFInt32::MFInt32(T first,T last)
    00053     : std::deque<SFInt32>(first,last)
    00054   {
    00055   }
    00056   inline const char*
    00057   MFInt32::typeName()
    00058   {
    00059     return "MFInt32";
    00060   }
    00061   inline FieldTypeId
    00062   MFInt32::typeId()
    00063   {
    00064     return mfInt32;
    00065   }
    00066 }
    00067
    00068 #endif // XDKWRL_MFINT32_H
    00069
    00070 // Local variables section.
    00071 // This is only used by emacs!
    00072 // Local Variables:
    00073 // ff-search-directories: ("../../" "../../../src/xdkwrl/fieldtypes")
    00074 // End:

Generated on 5 Jan 2007 with version 1.5.1. |