8 #define SCARAB_API_EXPORTS 12 using std::stringstream;
35 add( it->first, it->second->clone() );
49 this->
replace( it->first, *it->second );
56 if( ! a_subset.
is_node() )
return false;
59 for( contents::const_iterator t_subset_it = t_subset_node.
f_contents.begin(); t_subset_it != t_subset_node.
f_contents.end(); ++t_subset_it )
61 if( !
has( t_subset_it->first ) )
return false;
62 if( !
f_contents.at( t_subset_it->first )->has_subset( *t_subset_it->second ) )
return false;
70 for( contents::const_iterator it = a_object.
f_contents.begin(); it != a_object.
f_contents.end(); ++it )
72 if( !
has( it->first ) )
75 add( it->first, *it->second );
78 param& t_param = (*this)[ it->first ];
82 replace( it->first, *it->second );
85 if( t_param.
is_node() && it->second->is_node() )
91 if( t_param.
is_array() && it->second->is_array() )
98 this->
replace( it->first, *it->second );
108 out <<
'\n' << indentation <<
"{\n";
109 param::s_indent_level++;
112 out << indentation <<
" " << it->first <<
" : " << *(it->second) <<
'\n';
114 param::s_indent_level--;
115 out << indentation <<
"}\n";
virtual bool is_node() const
void replace(const std::string &a_name, const param &a_value)
creates a copy of a_value
void merge(const param_node &a_object)
virtual bool has_subset(const param &a_subset) const
virtual bool is_value() const
static unsigned s_indent_level
bool has(const std::string &a_name) const
param_node & operator=(const param_node &rhs)
void append(const param_array &an_array)
virtual std::string to_string() const
SCARAB_API std::ostream & operator<<(std::ostream &out, const param_array &a_value)
bool add(const std::string &a_name, const param &a_value)
creates a copy of a_value
virtual bool is_array() const