g4tools  5.4.0
Public Member Functions | Static Public Member Functions | List of all members
tools::sg::mf_std_vec< T > Class Template Reference
Inheritance diagram for tools::sg::mf_std_vec< T >:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::mf_std_vec< T >:
Collaboration graph
[legend]

Public Member Functions

virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const
 
virtual bool write (io::iwbuf &a_buffer)
 
virtual bool read (io::irbuf &a_buffer)
 
virtual bool dump (std::ostream &a_out)
 
virtual bool s_value (std::string &a_s) const
 
virtual bool s2value (const std::string &)
 
 mf_std_vec ()
 
 mf_std_vec (const T &a_v)
 
 mf_std_vec (const std::vector< T > &a_v)
 
virtual ~mf_std_vec ()
 
 mf_std_vec (const mf_std_vec &a_from)
 
mf_std_vecoperator= (const mf_std_vec &a_from)
 
- Public Member Functions inherited from tools::sg::bmf< std::vector< T > >
virtual const std::string & s_cls () const
 
 bmf ()
 
 bmf (const std::vector< T > &a_value)
 
 bmf (const std::vector< std::vector< T > > &a_v)
 
 bmf (const bmf &a_from)
 
virtual ~bmf ()
 
bmfoperator= (const bmf &a_from)
 
bmfoperator= (const std::vector< std::vector< T > > &a_from)
 
bmfoperator= (const std::vector< T > &a_v)
 
bool operator== (const bmf &a_from) const
 
bool operator!= (const bmf &a_from) const
 
const std::vector< T > & operator[] (size_t a_index) const
 
std::vector< T > & operator[] (size_t a_index)
 
size_t size () const
 
bool empty () const
 
const std::vector< std::vector< T > > & values () const
 
std::vector< std::vector< T > > & values ()
 
void add (const std::vector< T > &a_value)
 
void add (const std::vector< std::vector< T > > &a_vals)
 
void add_allocated (size_t &a_pos, const std::vector< T > &a_1, const std::vector< T > &a_2, const std::vector< T > &a_3)
 
void insert (const it_t &a_it, const std::vector< T > &a_value)
 
bool set_value (size_t a_index, const std::vector< T > &a_value)
 
void set_value (const std::vector< T > &a_value)
 
bool get_value (size_t a_index, std::vector< T > &a_value)
 
void clear ()
 
void set_values (const std::vector< std::vector< T > > &a_values)
 
bool setValues (size_t a_index, size_t a_num, const std::vector< T > *a_vs)
 
bool set1Value (size_t a_index, const std::vector< T > &a_value)
 
bool setValue (const std::vector< T > &a_value)
 
size_t getNum () const
 
std::vector< T > * getValues (size_t a_start)
 
- Public Member Functions inherited from tools::sg::field
virtual ~field ()
 
void touch ()
 
bool touched () const
 
void reset_touched ()
 

Static Public Member Functions

static const std::string & s_class ()
 
- Static Public Member Functions inherited from tools::sg::bmf< std::vector< T > >
static const std::string & s_class ()
 

Additional Inherited Members

- Public Types inherited from tools::sg::bmf< std::vector< T > >
typedef std::vector< std::vector< T > >::iterator it_t
 
- Protected Member Functions inherited from tools::sg::field
 field ()
 
 field (const field &)
 
fieldoperator= (const field &)
 
- Protected Attributes inherited from tools::sg::bmf< std::vector< T > >
std::vector< std::vector< T > > m_values
 
- Protected Attributes inherited from tools::sg::field
bool m_touched
 

Detailed Description

template<class T>
class tools::sg::mf_std_vec< T >

Definition at line 272 of file mf.

Constructor & Destructor Documentation

◆ mf_std_vec() [1/4]

template<class T >
tools::sg::mf_std_vec< T >::mf_std_vec ( )
inline

Definition at line 306 of file mf.

306 :parent(){}

◆ mf_std_vec() [2/4]

template<class T >
tools::sg::mf_std_vec< T >::mf_std_vec ( const T &  a_v)
inline

Definition at line 307 of file mf.

307 :parent(a_v){}

◆ mf_std_vec() [3/4]

template<class T >
tools::sg::mf_std_vec< T >::mf_std_vec ( const std::vector< T > &  a_v)
inline

Definition at line 308 of file mf.

308 :parent(a_v){}

◆ ~mf_std_vec()

template<class T >
virtual tools::sg::mf_std_vec< T >::~mf_std_vec ( )
inlinevirtual

Definition at line 309 of file mf.

309 {}

◆ mf_std_vec() [4/4]

template<class T >
tools::sg::mf_std_vec< T >::mf_std_vec ( const mf_std_vec< T > &  a_from)
inline

Definition at line 311 of file mf.

311 :parent(a_from){}

Member Function Documentation

◆ cast()

template<class T >
virtual void* tools::sg::mf_std_vec< T >::cast ( const std::string &  a_class) const
inlinevirtual

Reimplemented from tools::sg::bmf< std::vector< T > >.

Definition at line 279 of file mf.

279  {
280  if(void* p = cmp_cast< mf_std_vec<T> >(this,a_class)) {return p;}
281  return parent::cast(a_class);
282  }

◆ dump()

template<class T >
virtual bool tools::sg::mf_std_vec< T >::dump ( std::ostream &  a_out)
inlinevirtual

Implements tools::sg::field.

Definition at line 294 of file mf.

294  {
295  const std::vector< std::vector<T> >& vec = parent::m_values;
296  a_out << "size : " << vec.size() << std::endl;
297  typedef typename std::vector< std::vector<T> >::const_iterator cit_t;
298  for(cit_t it=vec.begin();it!=vec.end();++it) {
299  //a_out << " " << (*it) << std::endl;
300  }
301  return true;
302  }

◆ operator=()

template<class T >
mf_std_vec& tools::sg::mf_std_vec< T >::operator= ( const mf_std_vec< T > &  a_from)
inline

Definition at line 312 of file mf.

312  {
313  parent::operator=(a_from);
314  return *this;
315  }

◆ read()

template<class T >
virtual bool tools::sg::mf_std_vec< T >::read ( io::irbuf a_buffer)
inlinevirtual

Implements tools::sg::field.

Definition at line 290 of file mf.

290  {
291  std::vector< std::vector<T> >& vec = parent::m_values;
292  return a_buffer.read_std_vec_vec(vec);
293  }

◆ s2value()

template<class T >
virtual bool tools::sg::mf_std_vec< T >::s2value ( const std::string &  )
inlinevirtual

Implements tools::sg::field.

Definition at line 304 of file mf.

304 {return false;}

◆ s_class()

template<class T >
static const std::string& tools::sg::mf_std_vec< T >::s_class ( )
inlinestatic

Definition at line 275 of file mf.

275  {
276  static const std::string s_v("tools::sg::mf_std_vec<"+stype(T())+">");
277  return s_v;
278  }

◆ s_cls()

template<class T >
virtual const std::string& tools::sg::mf_std_vec< T >::s_cls ( ) const
inlinevirtual

Implements tools::sg::field.

Definition at line 283 of file mf.

283 {return s_class();}

◆ s_value()

template<class T >
virtual bool tools::sg::mf_std_vec< T >::s_value ( std::string &  a_s) const
inlinevirtual

Implements tools::sg::field.

Definition at line 303 of file mf.

303 {a_s.clear();return false;}

◆ write()

template<class T >
virtual bool tools::sg::mf_std_vec< T >::write ( io::iwbuf a_buffer)
inlinevirtual

Implements tools::sg::field.

Definition at line 285 of file mf.

285  {
286  //used in exlib/sg/text_freetype::unitext
287  const std::vector< std::vector<T> >& vec = parent::m_values;
288  return a_buffer.write_std_vec_vec(vec);
289  }

The documentation for this class was generated from the following file:
tools::sg::mf_std_vec::s_class
static const std::string & s_class()
Definition: mf:275
tools::sg::bmf< std::vector< T > >::operator=
bmf & operator=(const bmf &a_from)
Definition: bmf:42
tools::cmp_cast
void * cmp_cast(const TO *a_this, const std::string &a_class)
Definition: scast:15
tools::sg::bmf< std::vector< T > >::m_values
std::vector< std::vector< T > > m_values
Definition: bmf:163
tools::stype
const std::string & stype(const mat4f &)
Definition: mat4f:73
tools::sg::bmf< std::vector< T > >::cast
virtual void * cast(const std::string &a_class) const
Definition: bmf:30