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

Public Member Functions

virtual bool begin (const istorable &, const std::string &, local_func)
 
virtual bool end (const istorable &)
 
virtual bool visit (const std::string &, bool a_v)
 
virtual bool visit (const std::string &, char a_v)
 
virtual bool visit (const std::string &, short a_v)
 
virtual bool visit (const std::string &, int a_v)
 
virtual bool visit (const std::string &, unsigned int a_v)
 
virtual bool visit (const std::string &, int64)
 
virtual bool visit (const std::string &, uint64)
 
virtual bool visit (const std::string &, float a_v)
 
virtual bool visit (const std::string &, double a_v)
 
virtual bool visit (const std::string &, const std::string &a_v)
 
virtual bool visit (const std::string &, const std::vector< bool > &a_v)
 
virtual bool visit (const std::string &, const std::vector< char > &a_v)
 
virtual bool visit (const std::string &, const std::vector< short > &a_v)
 
virtual bool visit (const std::string &, const std::vector< int > &a_v)
 
virtual bool visit (const std::string &, const std::vector< int64 > &)
 
virtual bool visit (const std::string &, const std::vector< float > &a_v)
 
virtual bool visit (const std::string &, const std::vector< double > &a_v)
 
virtual bool visit (const std::string &, const std::vector< std::string > &a_v)
 
virtual bool visit (const std::string &, const std::vector< std::vector< double > > &a_v)
 
virtual bool visit (const std::string &, const istorable &a_v)
 
 member_writer (buffer &a_buf)
 
virtual ~member_writer ()
 
- Public Member Functions inherited from tools::iobj_const_visitor
virtual ~iobj_const_visitor ()
 

Protected Attributes

bufferm_buf
 

Additional Inherited Members

- Public Types inherited from tools::iobj_const_visitor
typedef bool(* local_func) (const istorable &, iobj_const_visitor &)
 

Detailed Description

Definition at line 14 of file member_writer.

Constructor & Destructor Documentation

◆ member_writer()

tools::wroot::member_writer::member_writer ( buffer a_buf)
inline

Definition at line 88 of file member_writer.

88 :m_buf(a_buf){}

◆ ~member_writer()

virtual tools::wroot::member_writer::~member_writer ( )
inlinevirtual

Definition at line 89 of file member_writer.

89 {}

Member Function Documentation

◆ begin()

virtual bool tools::wroot::member_writer::begin ( const istorable ,
const std::string &  ,
local_func   
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 16 of file member_writer.

16 {return true;}

◆ end()

virtual bool tools::wroot::member_writer::end ( const istorable )
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 17 of file member_writer.

17 {return true;}

◆ visit() [1/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
bool  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 19 of file member_writer.

19 {return m_buf.write(a_v);}

◆ visit() [2/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
char  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 20 of file member_writer.

20 {return m_buf.write(a_v);}

◆ visit() [3/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const istorable a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 81 of file member_writer.

81  {
82  // WARNING : can't be called in a object.visit()
83  // over a a_v being a "super" of "object" .
84  if(!a_v.visit(*this)) return false;
85  return true;
86  }

◆ visit() [4/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::string &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 41 of file member_writer.

41 {return m_buf.write(a_v);}

◆ visit() [5/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< bool > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 47 of file member_writer.

47  {
48  size_t number = a_v.size();
49  std::vector<unsigned char> data(number);
50  for(size_t index=0;index<number;index++) {
51  data[index] = (unsigned char)a_v[index];
52  }
53  return m_buf.write_array<unsigned char>(data);
54  }

◆ visit() [6/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< char > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 56 of file member_writer.

56 {return m_buf.write_array(a_v);}

◆ visit() [7/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< double > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 71 of file member_writer.

71 {return m_buf.write_array(a_v);}

◆ visit() [8/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< float > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 69 of file member_writer.

69 {return m_buf.write_array(a_v);}

◆ visit() [9/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< int > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 60 of file member_writer.

60 {return m_buf.write_array(a_v);}

◆ visit() [10/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< int64 > &   
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 62 of file member_writer.

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

◆ visit() [11/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< short > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 58 of file member_writer.

58 {return m_buf.write_array(a_v);}

◆ visit() [12/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< std::string > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 75 of file member_writer.

75 {return m_buf.write(a_v);}

◆ visit() [13/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
const std::vector< std::vector< double > > &  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 77 of file member_writer.

77  {
78  return m_buf.write_array2(a_v);
79  }

◆ visit() [14/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
double  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 39 of file member_writer.

39 {return m_buf.write(a_v);}

◆ visit() [15/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
float  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 38 of file member_writer.

38 {return m_buf.write(a_v);}

◆ visit() [16/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
int  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 22 of file member_writer.

22 {return m_buf.write(a_v);}

◆ visit() [17/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
int64   
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 26 of file member_writer.

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

◆ visit() [18/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
short  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 21 of file member_writer.

21 {return m_buf.write(a_v);}

◆ visit() [19/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
uint64   
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 32 of file member_writer.

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

◆ visit() [20/20]

virtual bool tools::wroot::member_writer::visit ( const std::string &  ,
unsigned int  a_v 
)
inlinevirtual

Implements tools::iobj_const_visitor.

Definition at line 24 of file member_writer.

24 {return m_buf.write(a_v);}

Member Data Documentation

◆ m_buf

buffer& tools::wroot::member_writer::m_buf
protected

Definition at line 97 of file member_writer.


The documentation for this class was generated from the following file:
tools::wroot::member_writer::m_buf
buffer & m_buf
Definition: member_writer:97
tools::wroot::buffer::write_array
bool write_array(const T *a_a, uint32 a_n)
Definition: buffer:148
tools::wroot::buffer::write
bool write(T x)
Definition: buffer:97
tools::wroot::buffer::out
std::ostream & out() const
Definition: buffer:83
tools::wroot::buffer::write_array2
bool write_array2(const std::vector< std::vector< T > > a_v)
Definition: buffer:160