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

List of all members.

Public Member Functions

virtual const std::string & store_cls () const
virtual bool stream (buffer &a_buffer) const
virtual bool fill_basket (buffer &a_buffer) const
 leaf (std::ostream &a_out, wroot::branch &a_branch, const std::string &a_name, const std::string &a_title)
virtual ~leaf ()
void fill (const T &a_value)

Protected Member Functions

 leaf (const leaf &a_from)
leafoperator= (const leaf &)

Protected Attributes

m_min
m_max
m_value

Detailed Description

template<class T>
class inlib::wroot::leaf< T >

Definition at line 34 of file leaf.


Constructor & Destructor Documentation

template<class T>
inlib::wroot::leaf< T >::leaf ( std::ostream &  a_out,
wroot::branch a_branch,
const std::string &  a_name,
const std::string &  a_title 
) [inline]

Definition at line 53 of file leaf.

  : base_leaf(a_out,a_branch,a_name,a_title)
  ,m_min(T()),m_max(T())
  ,m_value(T())
  {
    m_length = 1;
    m_length_type = sizeof(T);
  }
template<class T>
virtual inlib::wroot::leaf< T >::~leaf ( ) [inline, virtual]

Definition at line 64 of file leaf.

{}
template<class T>
inlib::wroot::leaf< T >::leaf ( const leaf< T > &  a_from) [inline, protected]

Definition at line 66 of file leaf.

: base_leaf(a_from){}

Member Function Documentation

template<class T>
void inlib::wroot::leaf< T >::fill ( const T &  a_value) [inline]

Definition at line 69 of file leaf.

{m_value = a_value;}
template<class T>
virtual bool inlib::wroot::leaf< T >::fill_basket ( buffer a_buffer) const [inline, virtual]

Implements inlib::wroot::base_leaf.

Definition at line 49 of file leaf.

                                                   {
    return a_buffer.write<T>(m_value);
  }
template<class T>
leaf& inlib::wroot::leaf< T >::operator= ( const leaf< T > &  ) [inline, protected]

Definition at line 67 of file leaf.

{return *this;}
template<class T>
virtual const std::string& inlib::wroot::leaf< T >::store_cls ( ) const [inline, virtual]

Implements inlib::wroot::ibo.

Definition at line 36 of file leaf.

                                             {
    return leaf_store_class(T());
  }
template<class T>
virtual bool inlib::wroot::leaf< T >::stream ( buffer a_buffer) const [inline, virtual]

Reimplemented from inlib::wroot::base_leaf.

Definition at line 39 of file leaf.

                                              {
    unsigned int c;
    if(!a_buffer.write_version(1,c)) return false;
    if(!base_leaf::stream(a_buffer)) return false;
    if(!a_buffer.write(m_min)) return false;
    if(!a_buffer.write(m_max)) return false;
    if(!a_buffer.set_byte_count(c)) return false;
    return true;
  }

Member Data Documentation

template<class T>
T inlib::wroot::leaf< T >::m_max [protected]

Definition at line 72 of file leaf.

template<class T>
T inlib::wroot::leaf< T >::m_min [protected]

Definition at line 71 of file leaf.

template<class T>
T inlib::wroot::leaf< T >::m_value [protected]

Definition at line 73 of file leaf.


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