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());
206 if ( !
child_data_->selection_default_.is_obligatory() ) {
207 if (
child_data_->selection_default_.has_value_at_declaration() ) {
222 abstract.child_data_->closed_ =
true;
226 abstract.add_child( static_cast<Record &>( *(inst.first) ) );
228 parameter_map.insert(other_map.begin(), other_map.end());
231 abstract.child_data_->closed_ =
false;
234 abstract.parameter_map_ = parameter_map;
238 return std::make_pair( std::make_shared<Abstract>(
abstract.
close()), parameter_map );
244 abstract.child_data_ = std::make_shared<Abstract::ChildData>(*this->
child_data_);
245 abstract.child_data_->closed_ =
false;
247 abstract.child_data_->list_of_childs.clear();
248 abstract.child_data_->selection_of_childs = std::make_shared<Selection>(this->
type_name() +
"_TYPE_selection");
286 : selection_of_childs(
std::make_shared<
Selection> (name +
"_TYPE_selection") ),
287 description_(description),
291 selection_default_(
Default::obligatory())
300 :
Abstract(
"Derived AdHocAbstract",
"This description doesn't have print out."),
345 boost::hash_combine(seed,
"AdHocAbstract");
347 boost::hash_combine(seed,
child_data_->description_);
355 return "AdHocAbstract";
#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.