8 #ifndef ACCESSORS_IMPL_HH_
9 #define ACCESSORS_IMPL_HH_
24 ASSERT( key_it->default_.is_obligatory() || key_it->default_.has_value_at_declaration(),
25 "The key '%s' is declared as optional or with default value at read time,"
26 " you have to use Record::find instead.\n", key.c_str());
32 catch (Type::Record::ExcRecordKeyNotFound & e) {
35 catch (ExcTypeMismatch & e) {
36 e << EI_CPPRequiredType(
typeid(Ret).name()) << EI_KeyName(key);
39 catch (ExcStorageTypeMismatch &e) {
42 catch (ExcAccessorForNullStorage &e) {
50 inline const Ret
Record::val(
const string &key,
const Ret default_val )
const {
54 ASSERT( key_it->default_.has_value_at_read_time(),
55 "The key %s is not declared with default value at read time,"
56 " you have to use Record::val or Record::find instead.\n", key.c_str());
65 catch (Type::Record::ExcRecordKeyNotFound & e) {
68 catch (ExcTypeMismatch & e) {
69 e << EI_CPPRequiredType(
typeid(Ret).name()) << EI_KeyName(key);
72 catch (ExcStorageTypeMismatch &e) {
75 catch (ExcAccessorForNullStorage &e) {
89 catch (Type::Record::ExcRecordKeyNotFound & e) {
92 catch (ExcTypeMismatch & e) {
93 e << EI_CPPRequiredType(
typeid(Ret).name()) << EI_KeyName(key);
110 catch (Type::Record::ExcRecordKeyNotFound & e) {
113 catch (ExcTypeMismatch & e) {
114 e << EI_CPPRequiredType(
typeid(Ret).name()) << EI_KeyName(key);
126 template <
class ValueType>
131 catch (ExcTypeMismatch & e) {
132 e << EI_CPPRequiredType(
typeid(ValueType).name()) << EI_KeyName(
"begin()");
151 template <
class Container>
156 for(;it !=
end(); ++ it) {
172 {
return ! ( *
this == that ); }
176 inline IteratorBase::operator bool()
const {
178 return ( s && ! s->
is_null() );
212 Address a( * const_cast<Address *> (address_.down(index_)) );
222 (boost::is_same < Record, OutputType > ::value || boost::is_same < AbstractRecord, OutputType > ::value
223 || boost::is_same < Array, OutputType > ::value));
227 return &(temporary_value_);
235 return static_cast<const InputType &
>(type);
UnitSI operator*(const UnitSI &a, const UnitSI &b)
Product of two units.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.