Flow123d
JS_before_hm-1804-gf2ad740aa
|
Go to the documentation of this file.
24 #include <boost/functional/hash.hpp>
30 #include <boost/functional/hash/hash.hpp>
58 : child_data_(
std::make_shared<
ChildData>(
"EmptyAbstract",
"" ) )
67 :
TypeBase( other ), child_data_(other.child_data_)
73 : child_data_(
std::make_shared<
ChildData>( type_name_in, description ) )
80 boost::hash_combine(seed,
"Abstract");
82 boost::hash_combine(seed,
child_data_->description_);
84 boost::hash_combine(seed, param.first );
85 boost::hash_combine(seed, param.second );
165 THROW( ExcGenericWithoutInstance() << EI_Object(child.type_name()) );
166 child.finish(finish_type);
167 ASSERT(child.is_finished()).error();
174 }
catch (ExcWrongDefault & e) {
175 e << EI_Desc(
"Default value for TYPE key do not match any descendant of Abstract.")
178 }
catch (ExcWrongDefaultJSON & e) {
179 e << EI_DefaultStr(
child_data_->selection_default_.value() ) << EI_TypeName(this->
type_name());
227 if ( !
child_data_->selection_default_.is_obligatory() ) {
228 if (
child_data_->selection_default_.has_value_at_declaration() ) {
243 abstract.child_data_->closed_ =
true;
247 abstract.add_child(
static_cast<Record &
>( *(inst.first) ) );
249 parameter_map.insert(other_map.begin(), other_map.end());
252 abstract.child_data_->closed_ =
false;
255 abstract.parameter_map_ = parameter_map;
259 return std::make_pair( std::make_shared<Abstract>(
abstract.
close()), parameter_map );
265 abstract.child_data_ = std::make_shared<Abstract::ChildData>(*this->
child_data_);
266 abstract.child_data_->closed_ =
false;
268 abstract.child_data_->list_of_childs.clear();
269 abstract.child_data_->selection_of_childs = std::make_shared<Selection>(this->
type_name() +
"_TYPE_selection");
307 : selection_of_childs(
std::make_shared<
Selection> (name +
"_TYPE_selection") ),
308 description_(description),
312 selection_default_(
Default::obligatory())
321 :
Abstract(
"Derived AdHocAbstract",
"This description doesn't have print out."),
366 boost::hash_combine(seed,
"AdHocAbstract");
368 boost::hash_combine(seed,
child_data_->description_);
376 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.