g4tools  5.4.0
Public Member Functions | Static Public Member Functions | List of all members
tools::rroot::stl_vector_string Class Reference
Inheritance diagram for tools::rroot::stl_vector_string:
Inheritance graph
[legend]
Collaboration diagram for tools::rroot::stl_vector_string:
Collaboration graph
[legend]

Public Member Functions

virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const
 
virtual void * cast (cid a_class) const
 
virtual irocopy () const
 
virtual bool stream (buffer &a_buffer)
 
 stl_vector_string ()
 
virtual ~stl_vector_string ()
 
 stl_vector_string (const stl_vector_string &a_from)
 
stl_vector_stringoperator= (const stl_vector_string &a_from)
 
- Public Member Functions inherited from tools::rroot::iro
virtual ~iro ()
 

Static Public Member Functions

static const std::string & s_class ()
 
static cid id_class ()
 

Detailed Description

Definition at line 192 of file stl_vector.

Constructor & Destructor Documentation

◆ stl_vector_string() [1/2]

tools::rroot::stl_vector_string::stl_vector_string ( )
inline

Definition at line 247 of file stl_vector.

247  {
248 #ifdef TOOLS_MEM
249  mem::increment(s_class().c_str());
250 #endif
251  }

◆ ~stl_vector_string()

virtual tools::rroot::stl_vector_string::~stl_vector_string ( )
inlinevirtual

Definition at line 252 of file stl_vector.

252  {
253 #ifdef TOOLS_MEM
254  mem::decrement(s_class().c_str());
255 #endif
256  }

◆ stl_vector_string() [2/2]

tools::rroot::stl_vector_string::stl_vector_string ( const stl_vector_string a_from)
inline

Definition at line 258 of file stl_vector.

259  :iro(a_from)
260  ,std::vector<std::string>(a_from)
261  {
262 #ifdef TOOLS_MEM
263  mem::increment(s_class().c_str());
264 #endif
265  }

Member Function Documentation

◆ cast() [1/2]

virtual void* tools::rroot::stl_vector_string::cast ( cid  a_class) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 210 of file stl_vector.

210  {
211  if(void* p = cmp_cast<stl_vector_string>(this,a_class)) {return p;}
212  return 0;
213  }

◆ cast() [2/2]

virtual void* tools::rroot::stl_vector_string::cast ( const std::string &  a_class) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 203 of file stl_vector.

203  {
204  if(void* p = cmp_cast<stl_vector_string>(this,a_class)) return p;
205  return 0;
206  }

◆ copy()

virtual iro* tools::rroot::stl_vector_string::copy ( ) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 214 of file stl_vector.

214 {return new stl_vector_string(*this);}

◆ id_class()

static cid tools::rroot::stl_vector_string::id_class ( )
inlinestatic

Definition at line 209 of file stl_vector.

209 {return stl_vector_string_cid();}

◆ operator=()

stl_vector_string& tools::rroot::stl_vector_string::operator= ( const stl_vector_string a_from)
inline

Definition at line 266 of file stl_vector.

266  {
267  std::vector<std::string>::operator=(a_from);
268  return *this;
269  }

◆ s_class()

static const std::string& tools::rroot::stl_vector_string::s_class ( )
inlinestatic

Definition at line 198 of file stl_vector.

198  {
199  static const std::string s_v("tools::rroot::stl_vector_string");
200  return s_v;
201  }

◆ s_cls()

virtual const std::string& tools::rroot::stl_vector_string::s_cls ( ) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 207 of file stl_vector.

207 {return s_class();}

◆ stream()

virtual bool tools::rroot::stl_vector_string::stream ( buffer a_buffer)
inlinevirtual

Implements tools::rroot::iro.

Definition at line 215 of file stl_vector.

215  {
216  std::vector<std::string>::clear();
217 
218  //uint32 startpos = a_buffer.length();
219 
220  //WARNING : not tested yet.
221 
222  short v;
223  unsigned int s, c;
224  if(!a_buffer.read_version(v,s,c)) return false;
225 
226  //::printf("debug : stl_vector_string::stream : version %d, byte count %d\n",v,c);
227 
228  unsigned int num;
229  if(!a_buffer.read(num)) return false;
230 
231  //::printf("debug : stl_vector_string : %d\n",num);
232 
233  std::vector<std::string>::resize(num);
234  for(unsigned int index=0;index<num;index++) {
235  std::string& vs = std::vector<std::string>::operator[](index);
236  if(!a_buffer.read(vs)) {
237  std::vector<std::string>::clear();
238  return false;
239  }
240  }
241 
242  //a_buffer.set_offset(startpos+c+sizeof(unsigned int));
243 
244  return a_buffer.check_byte_count(s,c,s_store_class());
245  }

The documentation for this class was generated from the following file:
tools::rroot::stl_vector_string::s_class
static const std::string & s_class()
Definition: stl_vector:198
tools::rroot::stl_vector_string::stl_vector_string
stl_vector_string()
Definition: stl_vector:247
tools::rroot::stl_vector_string_cid
cid stl_vector_string_cid()
Definition: cids:37