|
| TYPEDEF_ERR_INFO (EI_Address, const std::string) |
|
| DECLARE_INPUT_EXCEPTION (ExcInputMessage,<< EI_Message::val) |
|
| TYPEDEF_ERR_INFO (EI_InputType, const string) |
|
| TYPEDEF_ERR_INFO (EI_RequiredType, const string) |
|
| TYPEDEF_ERR_INFO (EI_CPPRequiredType, const string) |
|
| TYPEDEF_ERR_INFO (EI_KeyName, const string) |
|
| DECLARE_EXCEPTION (ExcTypeMismatch,<< "Key:"<< EI_KeyName::qval<< ". Can not construct Iterator<T> with C++ type T="<< EI_CPPRequiredType::qval<< ";\n"<< "can not convert Type: "<< EI_InputType::qval<< " to: "<< EI_RequiredType::qval) |
|
| TYPEDEF_ERR_INFO (EI_AccessorName, const string) |
|
| DECLARE_EXCEPTION (ExcAccessorForNullStorage,<< "Can not create "<< EI_AccessorName::val<< " from StorageNull.") |
|
| TYPEDEF_ERR_INFO (EI_ParamName, const string) |
|
| DECLARE_EXCEPTION (ExcAddressNullPointer,<< "NULL pointer in "<< EI_ParamName::val<< " parameter.") |
|
std::ostream & | operator<< (std::ostream &stream, const Address &address) |
|
std::ostream & | operator<< (std::ostream &stream, const JSONPath &path) |
|
| TYPEDEF_ERR_INFO (EI_RequestedType, const std::string) |
|
| TYPEDEF_ERR_INFO (EI_StoredType, const std::string) |
|
| DECLARE_EXCEPTION (ExcStorageTypeMismatch,<< "Storage type mismatch. You want value of type "<< EI_RequestedType::qval<< " but stored is value of type "<< EI_StoredType::qval) |
|
Iterator - like intermediate class for access to the stored values. The storage is a tree where one node can hold:
- int, double, bool
- pointer to string
- pointer to array of storages
- special state: NULL (no data) INCLUDE (have to read another file to provide the value, this may be possible only through particular readers) ...
json_spirit use boost::variant for storing JSON tree and arrays are stored as vectors of these variants not pointers to variants. This is probably more effective, but do not allow effective modifications of the tree and also construction not involving copies is not very intuitive. Therefore we use our own storage and copy the json_spirit tree into it.
type_output.cc
Input::TYPEDEF_ERR_INFO |
( |
EI_Address |
, |
|
|
const std::string |
|
|
) |
| |
Declaration of error info class for passing Input::Address through exceptions. Is returned by input accessors : Input::Record, Input::Array, etc.
Use case example: Input::Record input = ...; string name=input.val("name"); if (name.size() > STR_LIMIT) THROW(ExcToLongStr() << EI_Address( input.address_string() ));
TODO: if Address class is persistent (every copy is self contented, we can use Address instead of std::string. see also ei_address methods.