19 #ifndef INPUT_INTERFACE_HH_
20 #define INPUT_INTERFACE_HH_
24 #include <boost/type_traits.hpp>
25 #include <boost/mpl/if.hpp>
26 #include <boost/static_assert.hpp>
27 #include <boost/shared_ptr.hpp>
57 const char *
what ()
const throw ();
80 #define DECLARE_INPUT_EXCEPTION( ExcName, Format) \
81 struct ExcName : public virtual ::Input::Exception { \
82 virtual void print_info(std::ostringstream &out) const { \
83 using namespace internal; \
84 ::internal::ExcStream estream(out, *this); \
86 << "\nAt input address: " \
87 << ::Input::EI_Address::val; \
90 virtual ~ExcName() throw () {} \
109 <<
". Can not construct Iterator<T> with C++ type T=" << EI_CPPRequiredType::qval <<
";\n"
110 <<
"can not convert Type: " << EI_InputType::qval <<
" to: " << EI_RequiredType::qval
115 DECLARE_EXCEPTION( ExcAccessorForNullStorage, <<
"Can not create " << EI_AccessorName::val <<
" from StorageNull.");
119 DECLARE_EXCEPTION( ExcAddressNullPointer, <<
"NULL pointer in " << EI_ParamName::val <<
" parameter.");
144 operator int()
const {
return val_;}
145 operator unsigned int()
const {
return val_;}
242 ASSERT(
data_->actual_storage_,
"NULL pointer to storage in address object!!! \n");
244 return data_->actual_storage_;
259 boost::shared_ptr<AddressData>
data_;
342 inline const Ret
val(
const string &key)
const;
349 inline const Ret
val(
const string &key,
const Ret default_val)
const;
376 inline bool opt_val(
const string &key, Ret &value)
const;
548 template <
class ValueType>
559 inline unsigned int size()
const;
566 template <
class Container>
567 void copy_to(Container &out)
const;
678 inline operator bool()
const;
683 inline unsigned int idx()
const;
789 template<>
struct TD<short int> {
typedef int OT; };
790 template<>
struct TD<unsigned short int> {
typedef int OT; };
791 template<>
struct TD<unsigned int> {
typedef int OT; };
792 template<>
struct TD<char> {
typedef int OT; };
793 template<>
struct TD<float> {
typedef double OT; };
Dedicated class for storing path to input and output files.
Base of exceptions used in Flow123d.