inlib  1.2.0
Public Types | Public Member Functions | Protected Attributes
inlib::sg::bmf< T > Class Template Reference
Inheritance diagram for inlib::sg::bmf< T >:
Inheritance graph
[legend]
Collaboration diagram for inlib::sg::bmf< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< T >::iterator it_t

Public Member Functions

 bmf ()
virtual ~bmf ()
 bmf (const bmf &a_from)
bmfoperator= (const bmf &a_from)
bmfoperator= (const std::vector< T > &a_from)
bool operator== (const bmf &a_from) const
bool operator!= (const bmf &a_from) const
const T & operator[] (unsigned int a_index) const
T & operator[] (unsigned int a_index)
unsigned int size () const
bool empty () const
const std::vector< T > & values () const
std::vector< T > & values ()
void add (const T &a_value)
void insert (const it_t &a_it, const T &a_value)
bool set_value (unsigned int a_index, const T &a_value)
bool get_value (unsigned int a_index, T &a_value)
void clear ()

Protected Attributes

std::vector< T > m_values

Detailed Description

template<class T>
class inlib::sg::bmf< T >

Definition at line 18 of file mf.


Member Typedef Documentation

template<class T>
typedef std::vector<T>::iterator inlib::sg::bmf< T >::it_t

Definition at line 64 of file mf.


Constructor & Destructor Documentation

template<class T>
inlib::sg::bmf< T >::bmf ( ) [inline]

Definition at line 23 of file mf.

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

Definition at line 25 of file mf.

{m_values.clear();}
template<class T>
inlib::sg::bmf< T >::bmf ( const bmf< T > &  a_from) [inline]

Definition at line 27 of file mf.

:field(a_from),m_values(a_from.m_values){}

Member Function Documentation

template<class T>
void inlib::sg::bmf< T >::add ( const T &  a_value) [inline]

Definition at line 60 of file mf.

                             {
    m_values.push_back(a_value);
    m_touched = true;
  }
template<class T>
void inlib::sg::bmf< T >::clear ( ) [inline]

Definition at line 80 of file mf.

               {
    if(m_values.size()) m_touched = true;
    m_values.clear();
  }
template<class T>
bool inlib::sg::bmf< T >::empty ( ) const [inline]

Definition at line 57 of file mf.

{return m_values.empty();}
template<class T>
bool inlib::sg::bmf< T >::get_value ( unsigned int  a_index,
T &  a_value 
) [inline]

Definition at line 75 of file mf.

                                                  {
    if(a_index>=m_values.size()) {a_value=T();return false;}
    a_value = m_values[a_index];
    return true;
  }
template<class T>
void inlib::sg::bmf< T >::insert ( const it_t a_it,
const T &  a_value 
) [inline]

Definition at line 65 of file mf.

                                                 {
    m_values.insert(a_it,a_value);
    m_touched = true;
  }
template<class T>
bool inlib::sg::bmf< T >::operator!= ( const bmf< T > &  a_from) const [inline]

Definition at line 43 of file mf.

                                           { 
    return !operator==(a_from);
  }
template<class T>
bmf& inlib::sg::bmf< T >::operator= ( const bmf< T > &  a_from) [inline]

Definition at line 28 of file mf.

                                   {
    field::operator=(a_from);
    if(a_from.m_values!=m_values) m_touched = true;
    m_values = a_from.m_values;
    return *this;
  }
template<class T>
bmf& inlib::sg::bmf< T >::operator= ( const std::vector< T > &  a_from) [inline]

Reimplemented in inlib::sg::mf_string, and inlib::sg::mf< T >.

Definition at line 35 of file mf.

                                            {
    if(a_from!=m_values) m_touched = true;
    m_values = a_from;
    return *this;
  }
template<class T>
bool inlib::sg::bmf< T >::operator== ( const bmf< T > &  a_from) const [inline]

Definition at line 40 of file mf.

                                           {
    return m_values==a_from.m_values;
  }
template<class T>
const T& inlib::sg::bmf< T >::operator[] ( unsigned int  a_index) const [inline]

Definition at line 46 of file mf.

                                                  {
    //WARNING : no check is done on a_index.
    return m_values[a_index];    
  }
template<class T>
T& inlib::sg::bmf< T >::operator[] ( unsigned int  a_index) [inline]

Definition at line 50 of file mf.

                                      {
    //WARNING : no check is done on a_index.
    return m_values[a_index];    
  }
template<class T>
bool inlib::sg::bmf< T >::set_value ( unsigned int  a_index,
const T &  a_value 
) [inline]

Definition at line 69 of file mf.

                                                        {
    if(a_index>=m_values.size()) return false;
    if(m_values[a_index]!=a_value) m_touched = true;
    m_values[a_index] = a_value;
    return true;
  }
template<class T>
unsigned int inlib::sg::bmf< T >::size ( ) const [inline]

Definition at line 56 of file mf.

{return m_values.size();}
template<class T>
const std::vector<T>& inlib::sg::bmf< T >::values ( ) const [inline]

Definition at line 58 of file mf.

{return m_values;}
template<class T>
std::vector<T>& inlib::sg::bmf< T >::values ( ) [inline]

Definition at line 59 of file mf.

{return m_values;}

Member Data Documentation

template<class T>
std::vector<T> inlib::sg::bmf< T >::m_values [protected]

Definition at line 89 of file mf.


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