19 #ifndef INPUT_INTERFACE_HH_
20 #define INPUT_INTERFACE_HH_
25 #include <boost/type_traits.hpp>
26 #include <boost/mpl/if.hpp>
27 #include <boost/static_assert.hpp>
58 const char *
what ()
const throw ();
88 #define DECLARE_INPUT_EXCEPTION( ExcName, Format) \
89 struct ExcName : public virtual ::Input::Exception { \
90 virtual void print_info(std::ostringstream &out) const { \
91 using namespace internal; \
92 ::internal::ExcStream estream(out, *this); \
94 << "\nAt input address: " \
95 << ::Input::EI_Address::val; \
98 virtual ~ExcName() throw () {} \
117 <<
". Can not construct Iterator<T> with C++ type T=" << EI_CPPRequiredType::qval <<
";\n"
118 <<
"can not convert Type: " << EI_InputType::qval <<
" to: " << EI_RequiredType::qval
123 DECLARE_EXCEPTION( ExcAccessorForNullStorage, <<
"Can not create " << EI_AccessorName::val <<
" from StorageNull.");
127 DECLARE_EXCEPTION( ExcAddressNullPointer, <<
"NULL pointer in " << EI_ParamName::val <<
" parameter.");
152 operator int()
const {
return val_;}
153 operator unsigned int()
const {
return val_;}
162 operator int()
const {
return this->
val_;}
163 operator unsigned int()
const {
return this->
val_;}
255 std::shared_ptr<Address>
down(
unsigned int idx)
const;
261 ASSERT(
data_->actual_storage_,
"NULL pointer to storage in address object!!! \n");
263 return data_->actual_storage_;
278 boost::shared_ptr<AddressData>
data_;
361 inline const Ret
val(
const string &key)
const;
368 inline const Ret
val(
const string &key,
const Ret default_val)
const;
395 inline bool opt_val(
const string &key, Ret &value)
const;
585 template <
class ValueType>
596 inline unsigned int size()
const;
603 template <
class Container>
604 void copy_to(Container &out)
const;
715 inline operator bool()
const;
720 inline unsigned int idx()
const;
826 template<>
struct TD<char> {
typedef int OT; };
827 template<>
struct TD<unsigned char> {
typedef int OT; };
828 template<>
struct TD<short int> {
typedef int OT; };
829 template<>
struct TD<unsigned short int> {
typedef int OT; };
830 template<>
struct TD<int> {
typedef int OT; };
831 template<>
struct TD<unsigned int> {
typedef int OT; };
832 template<>
struct TD<float> {
typedef double OT; };
833 template<>
struct TD<double> {
typedef double OT; };
Dedicated class for storing path to input and output files.
Base of exceptions used in Flow123d.