inlib
1.2.0
|
Public Member Functions | |
ObjArray (bool a_owner) | |
virtual | ~ObjArray () |
void | cleanup () |
bool | stream (buffer &a_buffer, ifac &a_fac, const ifac::args &a_args, bool a_accept_null=false) |
Protected Member Functions | |
ObjArray (const ObjArray &) | |
ObjArray & | operator= (const ObjArray &) |
void | _clear () |
Protected Attributes | |
bool | m_owner |
inlib::rroot::ObjArray< T >::ObjArray | ( | bool | a_owner | ) | [inline] |
virtual inlib::rroot::ObjArray< T >::~ObjArray | ( | ) | [inline, virtual] |
inlib::rroot::ObjArray< T >::ObjArray | ( | const ObjArray< T > & | ) | [inline, protected] |
void inlib::rroot::ObjArray< T >::_clear | ( | ) | [inline, protected] |
Definition at line 149 of file named.
{ if(m_owner) { inlib::clear<T>(*this); } else { std::vector<T*>::clear(); } }
void inlib::rroot::ObjArray< T >::cleanup | ( | ) | [inline] |
ObjArray& inlib::rroot::ObjArray< T >::operator= | ( | const ObjArray< T > & | ) | [inline, protected] |
bool inlib::rroot::ObjArray< T >::stream | ( | buffer & | a_buffer, |
ifac & | a_fac, | ||
const ifac::args & | a_args, | ||
bool | a_accept_null = false |
||
) | [inline] |
Definition at line 100 of file named.
{ _clear(); short v; unsigned int s, c; if(!a_buffer.read_version(v,s,c)) return false; //::printf("debug : ObjArray::stream : version %d count %d\n",v,c); {uint32 id,bits; if(!Object_stream(a_buffer,id,bits)) return false;} std::string name; if(!a_buffer.read(name)) return false; int nobjects; if(!a_buffer.read(nobjects)) return false; int lowerBound; if(!a_buffer.read(lowerBound)) return false; //::printf("debug : ObjArray : nobject \"%s\" %d %d\n", // name.c_str(),nobjects,lowerBound); for (int i=0;i<nobjects;i++) { //::printf("debug : ObjArray : n=%d i=%d ...\n",nobjects,i); iro* obj; if(!a_buffer.read_object(a_fac,a_args,obj)){ a_buffer.out() << "inlib::rroot::ObjArray::stream :" << " can't read object." << std::endl; return false; } //::printf("debug : ObjArray : n=%d i=%d : ok\n",nobjects,i); if(obj) { T* to = inlib::cast<iro,T>(*obj); if(!to) { a_buffer.out() << "inlib::rroot::ObjArray::stream :" << " inlib::cast failed." << std::endl; } else { push_back(to); } } else { //a_accept_null for branch::stream m_baskets. if(a_accept_null) this->push_back(0); } } return a_buffer.check_byte_count(s,c,"TObjArray"); }
bool inlib::rroot::ObjArray< T >::m_owner [protected] |