Go to the documentation of this file.
19 #include <boost/lexical_cast.hpp>
33 converter <<
"--------------------------------------------------------" << std::endl;
34 converter <<
"User Error: ";
36 #ifdef FLOW123D_DEBUG_MESSAGES
37 converter <<
"\n** Diagnosting info **\n" ;
38 converter << boost::diagnostic_information_what( *
this );
41 converter << std::endl <<
"--------------------------------------------------------" << std::endl;
57 data_->root_type_ =
nullptr;
59 data_->descendant_order_ = 0;
68 THROW( ExcAddressNullPointer() << EI_AccessorName(
"storage_root") );
70 THROW( ExcAddressNullPointer() << EI_AccessorName(
"type_root") );
72 data_->root_type_ = type_root;
73 data_->root_storage_ = storage_root;
74 data_->descendant_order_ = 0;
75 data_->actual_storage_ = storage_root;
96 auto addr = std::make_shared<Address>(this->
data_->root_storage_, this->data_->root_type_);
97 addr->data_->parent_ = this->
data_;
98 addr->data_->descendant_order_ = idx;
99 addr->data_->actual_storage_ =
data_->actual_storage_->get_item(idx);
107 std::shared_ptr<AddressData> address_data =
data_;
108 while (address_data->parent_ != NULL) {
109 path.push_back(address_data->descendant_order_);
110 address_data = address_data->parent_;
114 if (path.size() == 0) {
118 const StorageBase * storage = address_data->root_storage_;
120 std::string address =
"";
121 int i = path.size()-1;
127 storage = storage->
get_item(path[i]);
130 address = address +
"/" +
it->key_;
131 input_type =
it->type_.get();
140 storage = storage->
get_item(path[i]);
142 address = address +
"/" + boost::lexical_cast<std::string>(path[i]);
159 : address_(
Address() ), record_type_()
165 : address_(rec.address_), record_type_(rec.record_type_)
171 : address_(address), record_type_(type)
174 THROW( ExcAccessorForNullStorage() << EI_AccessorName(
"Record") );
215 :
Record(tpl), tuple_type_(tpl.tuple_type_)
227 THROW( ExcAccessorForNullStorage() << EI_AccessorName(
"Tuple") );
248 : abstract_type_(), address_(
Address() )
254 : abstract_type_(rec.abstract_type_), address_(rec.address_)
260 : abstract_type_(type), address_(address)
263 THROW( ExcAccessorForNullStorage() << EI_AccessorName(
"AbstractRecord") );
269 {
return Record(address_,type()); }
297 : array_type_(Type::Bool()), address_(
Address() )
302 : array_type_(ar.array_type_), address_(ar.address_)
307 : array_type_(type), address_(address)
310 THROW( ExcAccessorForNullStorage() << EI_AccessorName(
"Array") );
337 : address_(address), index_(index)
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
virtual void print_info(std::ostringstream &out) const =0
void print_stacktrace(std::ostream &out) const
Prints formated stacktrace into given stream out.