Go to the documentation of this file.
4 #ifndef tools_wroot_leaf
5 #define tools_wroot_leaf
16 static const std::string s_v(
"TLeafB");
20 static const std::string s_v(
"TLeafS");
24 static const std::string s_v(
"TLeafI");
28 static const std::string s_v(
"TLeafF");
32 static const std::string s_v(
"TLeafD");
36 static const std::string s_v(
"TLeafC");
40 static const std::string s_v(
"TLeafElement");
44 static const std::string s_v(
"TLeafObject");
54 if(
void* p = cmp_cast<leaf_ref>(
this,a_class)) {
return p;}
80 leaf_ref(std::ostream& a_out,
const std::string& a_name,
const T& a_ref)
81 :
parent(a_out,a_name,a_name)
110 if(
void* p = cmp_cast<leaf>(
this,a_class)) {
return p;}
115 leaf(std::ostream& a_out,
const std::string& a_name)
134 if(
void* p = cmp_cast<leaf_string_ref>(
this,a_class)) {
return p;}
152 size_t len = ::strlen(
m_ref.c_str());
153 if(len >= (
size_t)
m_max)
self.m_max = int(len)+1;
156 if(!a_buffer.
write<
unsigned char>((
unsigned char)len))
return false;
158 if(!a_buffer.
write<
unsigned char>(255))
return false;
165 leaf_string_ref(std::ostream& a_out,
const std::string& a_name,
const std::string& a_ref)
166 :
parent(a_out,a_name,a_name)
193 if(
void* p = cmp_cast<leaf_string>(
this,a_class)) {
return p;}
218 if(
void* p = cmp_cast<leaf_std_vector_ref>(
this,a_class)) {
return p;}
240 base_leaf& a_leaf_count,
const std::vector<T>& a_ref)
241 :
parent(a_out,a_name,a_name)
271 if(
void* p = cmp_cast<leaf_element>(
this,a_class)) {
return p;}
282 if(!a_buffer.
write(
fID))
return false;
290 m_out <<
"tools::wroot::leaf_element::fill_buffer : dummy." << std::endl;
294 leaf_element(std::ostream& a_out,
const std::string& a_name,
int a_id,
int a_type)
295 :
parent(a_out,a_name,a_name)
323 if(
void* p = cmp_cast<leaf_object>(
this,a_class)) {
return p;}
341 if(_class.size()>255)
return false;
342 unsigned char n = (
unsigned char)_class.size();
343 if(!a_buffer.
write(n))
return false;
350 :
parent(a_out,a_name,a_obj.store_class_name())