Flow123d  JS_before_hm-2137-g84767e588
Namespaces | Classes | Typedefs | Enumerations | Functions
Input Namespace Reference

Abstract linear system class. More...

Namespaces

 internal
 
 Type
 

Classes

class  AbstractRecord
 Accessor to the polymorphic input data of a type given by an AbstracRecord object. More...
 
class  Address
 
class  Array
 Accessor to input data conforming to declared Array. More...
 
class  Enum
 
class  Exception
 Base of exceptions due to user input. More...
 
class  Factory
 This class implements more general factory mechanism to construct classes. More...
 
class  FullEnum
 
class  Iterator
 
class  IteratorBase
 
class  PathBase
 Base abstract class used by ReaderToStorage class to iterate over the input tree. More...
 
class  PathJSON
 Class used by ReaderToStorage class to iterate over the JSON tree provided by json_spirit library. More...
 
class  PathYAML
 Class used by ReaderToStorage class to iterate over the YAML tree provided by yaml-cpp library. More...
 
class  ReaderInternal
 Creates storage of IST defined in JSON or YAML file. More...
 
class  ReaderInternalBase
 Internal part of IST reader. More...
 
class  ReaderInternalCsvInclude
 Creates storage of part of subtree defined in CSV file. More...
 
class  ReaderInternalTranspose
 Creates storage of transposed subtree defined on input. More...
 
class  ReaderToStorage
 Reader for (slightly) modified input files. More...
 
class  Record
 Accessor to the data with type Type::Record. More...
 
class  StorageArray
 
class  StorageBase
 Base class for nodes of a data storage tree. More...
 
class  StorageBool
 
class  StorageDouble
 
class  StorageInt
 
class  StorageNull
 
class  StorageString
 
class  Tuple
 Accessor to the data with type Type::Tuple. More...
 
class  TypeRepository
 The Singleton class TypeRepository serves for handling the lazy-evaluated input types, derived from the base class Type::TypeBase. More...
 
struct  uncommenting_fsm
 

Typedefs

typedef io::finite_state_filter< uncommenting_fsmuncommenting_filter
 

Enumerations

enum  FileFormat { format_JSON, format_YAML }
 Possible formats of input files. More...
 
enum  ValueTypes {
  obj_type, array_type, str_type, bool_type,
  int_type, real_type, null_type, scalar_type,
  undef_type
}
 Enum of possible input types. More...
 

Functions

 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)
 
 TYPEDEF_ERR_INFO (EI_TypeName, const string)
 
 DECLARE_EXCEPTION (ExcNotRegistredClass,<< "Key "<< EI_KeyName::val<< " isn't registered in factory for type "<< EI_TypeName::val<< "!")
 
template<class ChildType , class... Arguments>
int register_class (string class_name)
 Function allows simplified call of registering class to factory. More...
 
 TYPEDEF_ERR_INFO (EI_Address, const std::string)
 Declaration of error info class for passing Input::Address through exceptions. More...
 
 DECLARE_INPUT_EXCEPTION (ExcInputMessage,<< EI_Message::val)
 Simple input exception that accepts just string message. More...
 
std::ostream & operator<< (std::ostream &stream, const PathJSON &path)
 Output operator for PathJSON. More...
 
std::ostream & operator<< (std::ostream &stream, const PathYAML &path)
 Output operator for PathYAML. More...
 
template ::Input::Record ReaderToStorage::get_root_interface<::Input::Record > () const
 
template ::Input::Array ReaderToStorage::get_root_interface<::Input::Array > () const
 
template ::Input::AbstractRecord ReaderToStorage::get_root_interface<::Input::AbstractRecord > () const
 
template ::Input::Tuple ReaderToStorage::get_root_interface<::Input::Tuple > () const
 
 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)
 

Detailed Description

Abstract linear system class.

Iterator - like intermediate class for access to the stored values. The storage is a tree where one node can hold:

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.

Linear system consists of Matrix, RHS and solution. It provides general methods for:

Method operates on the system as single object. But some methods for matrix only manipulation can be provided until we have matrix as separate class.

TODO:

Typedef Documentation

◆ uncommenting_filter

Declare an io filter based on FSM for filtering comments.

Definition at line 102 of file comment_filter.hh.

Enumeration Type Documentation

◆ FileFormat

Possible formats of input files.

Enumerator
format_JSON 
format_YAML 

Definition at line 59 of file reader_to_storage.hh.

◆ ValueTypes

Enum of possible input types.

Values in json_type_names must be stored in same order.

Enumerator
obj_type 
array_type 
str_type 
bool_type 
int_type 
real_type 
null_type 
scalar_type 
undef_type 

Definition at line 71 of file reader_to_storage.hh.

Function Documentation

◆ DECLARE_EXCEPTION() [1/5]

Input::DECLARE_EXCEPTION ( ExcAccessorForNullStorage  ,
<< "Can not create "<< EI_AccessorName::val<< " from StorageNull."   
)

◆ DECLARE_EXCEPTION() [2/5]

Input::DECLARE_EXCEPTION ( ExcAddressNullPointer  ,
<< "NULL pointer in "<< EI_ParamName::val<< " parameter."   
)

◆ DECLARE_EXCEPTION() [3/5]

Input::DECLARE_EXCEPTION ( ExcNotRegistredClass  ,
<< "Key "<< EI_KeyName::val<< " isn't registered in factory for type "<< EI_TypeName::val<< "!"   
)

◆ DECLARE_EXCEPTION() [4/5]

Input::DECLARE_EXCEPTION ( ExcStorageTypeMismatch  ,
<< "Storage type mismatch. You want value of type "<< EI_RequestedType::qval<< " but stored is value of type "<< EI_StoredType::qval   
)

◆ DECLARE_EXCEPTION() [5/5]

Input::DECLARE_EXCEPTION ( ExcTypeMismatch  )

◆ DECLARE_INPUT_EXCEPTION()

Input::DECLARE_INPUT_EXCEPTION ( ExcInputMessage  ,
<< EI_Message::val   
)

Simple input exception that accepts just string message.

◆ operator<<() [1/3]

std::ostream& Input::operator<< ( std::ostream &  stream,
const Address address 
)
inline

Address output operator.

Definition at line 252 of file accessors.hh.

◆ operator<<() [2/3]

std::ostream & Input::operator<< ( std::ostream &  stream,
const PathJSON path 
)

Output operator for PathJSON.

Mainly for debugging purposes and error messages.

Definition at line 335 of file path_json.cc.

◆ operator<<() [3/3]

std::ostream & Input::operator<< ( std::ostream &  stream,
const PathYAML path 
)

Output operator for PathYAML.

Mainly for debugging purposes and error messages.

Definition at line 238 of file path_yaml.cc.

◆ ReaderToStorage::get_root_interface<::Input::AbstractRecord >()

◆ ReaderToStorage::get_root_interface<::Input::Array >()

◆ ReaderToStorage::get_root_interface<::Input::Record >()

◆ ReaderToStorage::get_root_interface<::Input::Tuple >()

◆ register_class()

template<class ChildType , class... Arguments>
int Input::register_class ( string  class_name)

Function allows simplified call of registering class to factory.

It is used for declaration of registration variable.

See also
Factory

Example of usage:

const int SomeClass::reg =
Input::register_class< SomeClass >("SomeClass");

Definition at line 64 of file factory_impl.hh.

◆ TYPEDEF_ERR_INFO() [1/10]

Input::TYPEDEF_ERR_INFO ( EI_AccessorName  ,
const  string 
)

◆ TYPEDEF_ERR_INFO() [2/10]

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.

◆ TYPEDEF_ERR_INFO() [3/10]

Input::TYPEDEF_ERR_INFO ( EI_CPPRequiredType  ,
const  string 
)

◆ TYPEDEF_ERR_INFO() [4/10]

Input::TYPEDEF_ERR_INFO ( EI_InputType  ,
const  string 
)

◆ TYPEDEF_ERR_INFO() [5/10]

Input::TYPEDEF_ERR_INFO ( EI_KeyName  ,
const  string 
)

◆ TYPEDEF_ERR_INFO() [6/10]

Input::TYPEDEF_ERR_INFO ( EI_ParamName  ,
const  string 
)

◆ TYPEDEF_ERR_INFO() [7/10]

Input::TYPEDEF_ERR_INFO ( EI_RequestedType  ,
const std::string   
)

◆ TYPEDEF_ERR_INFO() [8/10]

Input::TYPEDEF_ERR_INFO ( EI_RequiredType  ,
const  string 
)

◆ TYPEDEF_ERR_INFO() [9/10]

Input::TYPEDEF_ERR_INFO ( EI_StoredType  ,
const std::string   
)

◆ TYPEDEF_ERR_INFO() [10/10]

Input::TYPEDEF_ERR_INFO ( EI_TypeName  ,
const  string 
)