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

Public Member Functions

virtual std::ostream & out () const
 
virtual bool visit (bool &a_v)
 
virtual bool visit (char &a_v)
 
virtual bool visit (short &a_v)
 
virtual bool visit (int &a_v)
 
virtual bool visit (unsigned int &a_v)
 
virtual bool visit (int64 &)
 
virtual bool visit (uint64 &)
 
virtual bool visit (float &a_v)
 
virtual bool visit (double &a_v)
 
virtual bool visit (std::string &a_v)
 
virtual bool visit (std::vector< bool > &a_v)
 
virtual bool visit (std::vector< char > &a_v)
 
virtual bool visit (std::vector< short > &a_v)
 
virtual bool visit (std::vector< int > &a_v)
 
virtual bool visit (std::vector< int64 > &)
 
virtual bool visit (std::vector< float > &a_v)
 
virtual bool visit (std::vector< double > &a_v)
 
virtual bool visit (std::vector< unsigned char > &a_v)
 
virtual bool visit (std::vector< std::string > &a_v)
 
virtual bool visit (std::vector< std::vector< double > > &a_v)
 
 member_reader (buffer &a_buf)
 
virtual ~member_reader ()
 
- Public Member Functions inherited from tools::iobj_visitor
virtual ~iobj_visitor ()
 

Protected Attributes

bufferm_buf
 

Detailed Description

Definition at line 14 of file member_reader.

Constructor & Destructor Documentation

◆ member_reader()

tools::rroot::member_reader::member_reader ( buffer a_buf)
inline

Definition at line 85 of file member_reader.

85 :m_buf(a_buf){}

◆ ~member_reader()

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

Definition at line 86 of file member_reader.

86 {}

Member Function Documentation

◆ out()

virtual std::ostream& tools::rroot::member_reader::out ( ) const
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 16 of file member_reader.

16 {return m_buf.out();}

◆ visit() [1/20]

virtual bool tools::rroot::member_reader::visit ( bool &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 18 of file member_reader.

18 {return m_buf.read(a_v);}

◆ visit() [2/20]

virtual bool tools::rroot::member_reader::visit ( char &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 19 of file member_reader.

19 {return m_buf.read(a_v);}

◆ visit() [3/20]

virtual bool tools::rroot::member_reader::visit ( double &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 38 of file member_reader.

38 {return m_buf.read(a_v);}

◆ visit() [4/20]

virtual bool tools::rroot::member_reader::visit ( float &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 37 of file member_reader.

37 {return m_buf.read(a_v);}

◆ visit() [5/20]

virtual bool tools::rroot::member_reader::visit ( int &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 21 of file member_reader.

21 {return m_buf.read(a_v);}

◆ visit() [6/20]

virtual bool tools::rroot::member_reader::visit ( int64 )
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 25 of file member_reader.

25  {
26  m_buf.out() << "tools::rroot::member_reader::visit(int64) :"
27  << " dummy." << std::endl;
28  return false; //FIXME
29  }

◆ visit() [7/20]

virtual bool tools::rroot::member_reader::visit ( short &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 20 of file member_reader.

20 {return m_buf.read(a_v);}

◆ visit() [8/20]

virtual bool tools::rroot::member_reader::visit ( std::string &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 40 of file member_reader.

40 {return m_buf.read(a_v);}

◆ visit() [9/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< bool > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 46 of file member_reader.

46  {
47  std::vector<unsigned char> data;
48  if(!m_buf.read_array(data)) {a_v.clear();return false;}
49  size_t number = data.size();
50  a_v.resize(number);
51  for(size_t index=0;index<number;index++) {
52  a_v[index] = (data[index]==1?true:false);
53  }
54  return true;
55  }

◆ visit() [10/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< char > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 57 of file member_reader.

57 {return m_buf.read_array(a_v);}

◆ visit() [11/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< double > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 72 of file member_reader.

72 {return m_buf.read_array(a_v);}

◆ visit() [12/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< float > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 70 of file member_reader.

70 {return m_buf.read_array(a_v);}

◆ visit() [13/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< int > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 61 of file member_reader.

61 {return m_buf.read_array(a_v);}

◆ visit() [14/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< int64 > &  )
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 63 of file member_reader.

63  {
64  //FIXME return ::Rio::writeArray<Slash::int64>(fBuffer,a_v);
65  m_buf.out() << "tools::rroot::member_reader::visit(vector<int64>) :"
66  << " dummy." << std::endl;
67  return false;
68  }

◆ visit() [15/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< short > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 59 of file member_reader.

59 {return m_buf.read_array(a_v);}

◆ visit() [16/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< std::string > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 78 of file member_reader.

78 {return m_buf.read(a_v);}

◆ visit() [17/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< std::vector< double > > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 80 of file member_reader.

80  {
81  return m_buf.read_array2(a_v);
82  }

◆ visit() [18/20]

virtual bool tools::rroot::member_reader::visit ( std::vector< unsigned char > &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 74 of file member_reader.

74  {
75  return m_buf.read_array(a_v);
76  }

◆ visit() [19/20]

virtual bool tools::rroot::member_reader::visit ( uint64 )
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 31 of file member_reader.

31  {
32  m_buf.out() << "tools::rroot::member_reader::visit(uint64) :"
33  << " dummy." << std::endl;
34  return false; //FIXME
35  }

◆ visit() [20/20]

virtual bool tools::rroot::member_reader::visit ( unsigned int &  a_v)
inlinevirtual

Implements tools::iobj_visitor.

Definition at line 23 of file member_reader.

23 {return m_buf.read(a_v);}

Member Data Documentation

◆ m_buf

buffer& tools::rroot::member_reader::m_buf
protected

Definition at line 94 of file member_reader.


The documentation for this class was generated from the following file:
tools::rroot::rbuf::read_array2
bool read_array2(std::vector< std::vector< T > > &a_v)
Definition: rbuf:365
tools::rroot::member_reader::m_buf
buffer & m_buf
Definition: member_reader:94
tools::rroot::rbuf::read_array
bool read_array(uint32 a_sz, T *&a_a, uint32 &a_n)
Definition: rbuf:314
tools::rroot::rbuf::out
std::ostream & out() const
Definition: rbuf:125
tools::rroot::rbuf::read
bool read(unsigned char &a_x)
Definition: rbuf:146