inlib  1.2.0
Public Member Functions
inlib::sg::mf_vec< T, TT > Class Template Reference
Inheritance diagram for inlib::sg::mf_vec< T, TT >:
Inheritance graph
[legend]
Collaboration diagram for inlib::sg::mf_vec< T, TT >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual bool write (io::iwbuf &a_buffer)
virtual bool read (io::irbuf &a_buffer)
virtual bool dump (std::ostream &a_out)
 mf_vec ()
virtual ~mf_vec ()
 mf_vec (const mf_vec &a_from)
mf_vecoperator= (const mf_vec &a_from)

Detailed Description

template<class T, class TT>
class inlib::sg::mf_vec< T, TT >

Definition at line 219 of file mf.


Constructor & Destructor Documentation

template<class T , class TT >
inlib::sg::mf_vec< T, TT >::mf_vec ( ) [inline]

Definition at line 255 of file mf.

: bmf<T>(){}
template<class T , class TT >
virtual inlib::sg::mf_vec< T, TT >::~mf_vec ( ) [inline, virtual]

Definition at line 256 of file mf.

{}
template<class T , class TT >
inlib::sg::mf_vec< T, TT >::mf_vec ( const mf_vec< T, TT > &  a_from) [inline]

Definition at line 258 of file mf.

  : bmf<T>(a_from){}

Member Function Documentation

template<class T , class TT >
virtual bool inlib::sg::mf_vec< T, TT >::dump ( std::ostream &  a_out) [inline, virtual]

Implements inlib::sg::field.

Definition at line 245 of file mf.

                                       {
    const std::vector<T>& vec = bmf<T>::m_values;
    a_out << "size : " << vec.size() << std::endl;
    typedef typename std::vector<T>::const_iterator cit_t;
    for(cit_t it=vec.begin();it!=vec.end();++it) {
      a_out << "  " << (*it) << std::endl;
    }
    return true;
  }
template<class T , class TT >
mf_vec& inlib::sg::mf_vec< T, TT >::operator= ( const mf_vec< T, TT > &  a_from) [inline]

Definition at line 260 of file mf.

                                         {
    bmf<T>::operator=(a_from);
    return *this;
  }
template<class T , class TT >
virtual bool inlib::sg::mf_vec< T, TT >::read ( io::irbuf a_buffer) [inline, virtual]

Implements inlib::sg::field.

Definition at line 231 of file mf.

                                       {
    std::vector<T>& vec = bmf<T>::m_values;
    vec.clear();
    typedef typename std::vector<TT> vec_t;
    std::vector<vec_t> vec_vec;
    if(!a_buffer.read_std_vec_vec(vec_vec)) return false;
    typedef typename std::vector<vec_t>::iterator it_t;
    for(it_t it=vec_vec.begin();it!=vec_vec.end();++it) {
      T x;
      if(!x.fill(*it)) {vec.clear();return false;}
      vec.push_back(x);
    }
    return true;
  }
template<class T , class TT >
virtual bool inlib::sg::mf_vec< T, TT >::write ( io::iwbuf a_buffer) [inline, virtual]

Implements inlib::sg::field.

Definition at line 221 of file mf.

                                        {
    const std::vector<T>& vec = bmf<T>::m_values;
    typedef typename std::vector<TT> vec_t;
    std::vector<vec_t> vec_vec;
    typedef typename std::vector<T>::const_iterator cit_t;
    for(cit_t it=vec.begin();it!=vec.end();++it) {
      vec_vec.push_back((*it).vector());
    }
    return a_buffer.write_std_vec_vec(vec_vec);
  }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines