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

Public Member Functions

virtual const std::string & store_cls () const
 
virtual bool stream (buffer &a_buffer) const
 
 obj_list ()
 
virtual ~obj_list ()
 
- Public Member Functions inherited from tools::wroot::ibo
virtual ~ibo ()
 

Protected Member Functions

 obj_list (const obj_list &a_from)
 
obj_listoperator= (const obj_list &)
 

Detailed Description

template<class T>
class tools::wroot::obj_list< T >

Definition at line 90 of file named.

Constructor & Destructor Documentation

◆ obj_list() [1/2]

template<class T >
tools::wroot::obj_list< T >::obj_list ( )
inline

Definition at line 117 of file named.

117 {}

◆ ~obj_list()

template<class T >
virtual tools::wroot::obj_list< T >::~obj_list ( )
inlinevirtual

Definition at line 118 of file named.

118 {safe_clear<T>(*this);}

◆ obj_list() [2/2]

template<class T >
tools::wroot::obj_list< T >::obj_list ( const obj_list< T > &  a_from)
inlineprotected

Definition at line 120 of file named.

120 :ibo(a_from),std::vector<T*>(){}

Member Function Documentation

◆ operator=()

template<class T >
obj_list& tools::wroot::obj_list< T >::operator= ( const obj_list< T > &  )
inlineprotected

Definition at line 121 of file named.

121 {return *this;}

◆ store_cls()

template<class T >
virtual const std::string& tools::wroot::obj_list< T >::store_cls ( ) const
inlinevirtual

Implements tools::wroot::ibo.

Definition at line 92 of file named.

92  {
93  static const std::string s_v("TList");
94  return s_v;
95  }

◆ stream()

template<class T >
virtual bool tools::wroot::obj_list< T >::stream ( buffer a_buffer) const
inlinevirtual

Implements tools::wroot::ibo.

Definition at line 96 of file named.

96  {
97  unsigned int c;
98  if(!a_buffer.write_version(4,c)) return false;
99  if(!Object_stream(a_buffer)) return false;
100  if(!a_buffer.write(std::string(""))) return false; //fName
101  int nobjects = int(std::vector<T*>::size());
102  if(!a_buffer.write(nobjects)) return false;
103 
104  typedef typename std::vector<T*>::const_iterator it_t;
105  it_t it;
106  for(it=std::vector<T*>::begin();it!=std::vector<T*>::end();++it) {
107  if(!a_buffer.write_object(*(*it))) return false;
108  std::string opt;
109  unsigned char nch = (unsigned char)opt.size();
110  if(!a_buffer.write(nch)) return false;
111  if(!a_buffer.write_fast_array<char>(opt.c_str(),nch)) return false;
112  }
113  if(!a_buffer.set_byte_count(c)) return false;
114  return true;
115  }

The documentation for this class was generated from the following file:
tools::waxml::begin
void begin(std::ostream &a_writer)
Definition: begend:15
tools::file::size
bool size(const std::string &a_file, long &a_size)
Definition: fsize:13
tools::wroot::Object_stream
bool Object_stream(buffer &a_buffer)
Definition: named:14
tools::waxml::end
void end(std::ostream &a_writer)
Definition: begend:31