Go to the documentation of this file.
4 #ifndef tools_rroot_obj_list
5 #define tools_rroot_obj_list
20 class obj_list :
public virtual iro,
protected std::vector<iro*> {
21 typedef std::vector<iro*> parent;
24 static const std::string s_v(
"TList");
29 static const std::string s_v(
"tools::rroot::obj_list");
33 virtual void*
cast(
const std::string& a_class)
const {
34 if(
void* p = cmp_cast<obj_list>(
this,a_class))
return p;
41 if(
void* p = cmp_cast<obj_list>(
this,a_class)) {
return p;}
60 if(!a_buffer.
read(name))
return false;
62 if(!a_buffer.
read(nobjects))
return false;
68 for (
int i=0;i<nobjects;i++) {
74 a_buffer.
out() <<
"tools::rroot::obj_list::stream : can't read object." << std::endl;
79 if(!a_buffer.
read(nch))
return false;
87 parent::push_back(obj);
90 parent::push_back(obj);
103 mem::increment(
s_class().c_str());
109 mem::decrement(
s_class().c_str());
119 mem::increment(
s_class().c_str());
122 parent::push_back((*it)->copy());
127 if(&a_from==
this)
return *
this;
132 parent::push_back((*it)->copy());
144 bool empty()
const {
return parent::empty();}
147 parent::push_back(a_obj);
152 T*
get_entry(std::ostream& a_out,
size_t a_index)
const {
153 if(a_index>=
size())
return 0;
154 iro* _obj = parent::operator[](a_index);
156 T* od = id_cast<iro,T>(*_obj);
158 a_out <<
"tools::rroot::obj_list::get_entry :"
159 <<
" object of class " <<
sout(_obj->
s_cls()) <<
" not a " << T::s_class() << std::endl;
166 typedef parent::iterator it_t;
167 typedef std::vector<bool>::iterator itb_t;
168 while(!parent::empty()) {
170 itb_t itb =
m_owns.begin();
175 if(own)
delete entry;
#define tools_vforcit(a__T, a__v, a__it)