24 #include <boost/functional/hash.hpp> 37 : child_data_(
std::make_shared<
ChildData>(
"EmptyAbstract",
"" ) )
59 boost::hash_combine(seed,
"Abstract");
61 boost::hash_combine(seed,
child_data_->description_);
63 boost::hash_combine(seed, param.first );
64 boost::hash_combine(seed, param.second );
144 THROW( ExcGenericWithoutInstance() << EI_Object(child.type_name()) );
145 child.finish(finish_type);
146 ASSERT(child.is_finished()).error();
153 }
catch (ExcWrongDefault & e) {
154 e << EI_Desc(
"Default value for TYPE key do not match any descendant of Abstract.")
157 }
catch (ExcWrongDefaultJSON & e) {
158 e << EI_DefaultStr(
child_data_->selection_default_.value() ) << EI_TypeName(this->
type_name());
201 if ( !
child_data_->selection_default_.is_obligatory() ) {
202 if (
child_data_->selection_default_.has_value_at_declaration() ) {
217 abstract.child_data_->closed_ =
true;
221 abstract.add_child( static_cast<Record &>( *(inst.first) ) );
223 parameter_map.insert(other_map.begin(), other_map.end());
226 abstract.child_data_->closed_ =
false;
229 abstract.parameter_map_ = parameter_map;
233 return std::make_pair( std::make_shared<Abstract>(
abstract.
close()), parameter_map );
239 abstract.child_data_ = std::make_shared<Abstract::ChildData>(*this->
child_data_);
240 abstract.child_data_->closed_ =
false;
242 abstract.child_data_->list_of_childs.clear();
243 abstract.child_data_->selection_of_childs = std::make_shared<Selection>(this->
type_name() +
"_TYPE_selection");
285 :
Abstract(
"Derived AdHocAbstract",
"This description doesn't have print out."),
330 boost::hash_combine(seed,
"AdHocAbstract");
332 boost::hash_combine(seed,
child_data_->description_);
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
static constexpr bool value
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.