Flow123d  JS_before_hm-2-g912b55d
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Input::Type::FileName Class Reference

Class for declaration of the input data that are file names. More...

#include <type_base.hh>

Inheritance diagram for Input::Type::FileName:
Inheritance graph
[legend]
Collaboration diagram for Input::Type::FileName:
Collaboration graph
[legend]

Public Member Functions

TypeHash content_hash () const override
 Implements TypeBase::content_hash. More...
 
string type_name () const override
 Implements Type::TypeBase::type_name. More...
 
string class_name () const override
 Override Type::TypeBase::class_name. More...
 
bool operator== (const TypeBase &other) const override
 Comparison of types. More...
 
bool match (const string &str) const override
 Checks relative output paths. More...
 
::FilePath::FileType get_file_type () const
 Returns type of the file input/output. More...
 
MakeInstanceReturnType make_instance (std::vector< ParameterPair > vec=std::vector< ParameterPair >()) override
 Implements TypeBase::make_instance. More...
 
- Public Member Functions inherited from Input::Type::TypeBase
virtual FinishStatus finish_status () const
 Returns true if the type is fully specified and ready for read access. More...
 
virtual bool is_finished () const
 
virtual bool is_closed () const
 Returns true if the type is closed. More...
 
string desc () const
 Returns string with Type extensive documentation. More...
 
bool operator!= (const TypeBase &other) const
 Comparison of types. More...
 
virtual ~TypeBase ()
 Destructor. More...
 
virtual FinishStatus finish (FinishStatus finish_type=FinishStatus::regular_)
 Finish method. Finalize construction of "Lazy types": Record, Selection, Abstract and generic type. More...
 
std::string hash_str () const
 Format the hash of this type. More...
 
virtual MakeInstanceReturnType make_instance (ParameterVector vec=ParameterVector())=0
 
bool is_root_of_generic_subtree () const
 Indicates if type is marked with flag root_of_generic_subtree_. More...
 

Static Public Member Functions

static FileName input ()
 The factory function for declaring type FileName for input files. More...
 
static FileName output ()
 The factory function for declaring type FileName for input files. More...
 
- Static Public Member Functions inherited from Input::Type::TypeBase
static void delete_unfinished_types ()
 Finishes and marks all types registered in type repositories and unused in IST. More...
 
static std::string hash_str (TypeHash hash)
 Format given hash for output. More...
 

Private Member Functions

 FileName ()
 Forbids default constructor. More...
 
 FileName (enum::FilePath::FileType type)
 Forbids direct construction. More...
 

Private Attributes

::FilePath::FileType type_
 The type of file (input or output). More...
 

Additional Inherited Members

- Public Types inherited from Input::Type::TypeBase
typedef std::size_t TypeHash
 Type returned by content_hash methods. More...
 
typedef std::string json_string
 String stored in JSON format. More...
 
typedef std::map< std::string, json_stringattribute_map
 Defines map of Input::Type attributes. More...
 
typedef std::pair< std::string, std::shared_ptr< TypeBase > > ParameterPair
 Defines pairs of (name, Input::Type), that are used for replace of parameters in generic types. More...
 
typedef std::vector< ParameterPairParameterVector
 Define vector of parameters passed to the overloaded make_instance method. More...
 
typedef std::map< std::string, TypeHashParameterMap
 Defines map of used parameters. More...
 
typedef std::pair< std::shared_ptr< TypeBase >, ParameterMapMakeInstanceReturnType
 Return type of make_instance methods, contains instance of generic type and map of used parameters. More...
 
- Static Public Attributes inherited from Input::Type::TypeBase
static const TypeHash none_hash = std::numeric_limits<TypeHash>::max()
 
- Protected Types inherited from Input::Type::TypeBase
typedef string KeyHash
 The type of hash values used in associative array that translates key names to indices in Record and Selection. More...
 
- Protected Member Functions inherited from Input::Type::TypeBase
 TypeBase ()
 The default constructor. More...
 
 TypeBase (const TypeBase &other)
 Copy constructor. More...
 
void add_attribute_ (std::string name, json_string val)
 Add attribute of given name to attribute map. More...
 
bool validate_json (json_string str) const
 Check if str is valid JSON string. More...
 
json_string print_parameter_map_to_json (ParameterMap parameter_map) const
 Create JSON output from parameter_map formatted as value of attribute. More...
 
json_string print_parameter_map_keys_to_json (ParameterMap param_map) const
 
void set_generic_attributes (ParameterMap param_map)
 
void copy_attributes (attribute_map other_attributes)
 
- Static Protected Member Functions inherited from Input::Type::TypeBase
static KeyHash key_hash (const string &str)
 Hash function. More...
 
static bool is_valid_identifier (const string &key)
 Check that a key is valid identifier. More...
 
- Protected Attributes inherited from Input::Type::TypeBase
std::shared_ptr< attribute_mapattributes_
 map of type attributes (e. g. input_type, name etc.) More...
 
bool root_of_generic_subtree_
 flag is true if type should be root of generic subtree More...
 
TypeHash generic_type_hash_
 hash string of generic type if type is derived, or empty string More...
 
ParameterMap parameter_map_
 map of parameters if type is part of generic subtree More...
 

Detailed Description

Class for declaration of the input data that are file names.

We strictly distinguish filenames for input and output files.

Definition at line 619 of file type_base.hh.

Constructor & Destructor Documentation

Input::Type::FileName::FileName ( )
private

Forbids default constructor.

Definition at line 516 of file type_base.cc.

Here is the caller graph for this function:

Input::Type::FileName::FileName ( enum::FilePath::FileType  type)
private

Forbids direct construction.

Definition at line 520 of file type_base.cc.

Member Function Documentation

string Input::Type::FileName::class_name ( ) const
overridevirtual

Override Type::TypeBase::class_name.

Reimplemented from Input::Type::String.

Definition at line 564 of file type_base.cc.

TypeBase::TypeHash Input::Type::FileName::content_hash ( ) const
overridevirtual

Implements TypeBase::content_hash.

Reimplemented from Input::Type::String.

Definition at line 540 of file type_base.cc.

Here is the caller graph for this function:

FilePath::FileType Input::Type::FileName::get_file_type ( ) const

Returns type of the file input/output.

Definition at line 582 of file type_base.cc.

Here is the caller graph for this function:

FileName Input::Type::FileName::input ( )
static

The factory function for declaring type FileName for input files.

Definition at line 526 of file type_base.cc.

Here is the caller graph for this function:

TypeBase::MakeInstanceReturnType Input::Type::FileName::make_instance ( std::vector< ParameterPair vec = std::vector<ParameterPair>())
overridevirtual

Implements TypeBase::make_instance.

Reimplemented from Input::Type::String.

Definition at line 576 of file type_base.cc.

bool Input::Type::FileName::match ( const string &  str) const
overridevirtual

Checks relative output paths.

Reimplemented from Input::Type::String.

Definition at line 570 of file type_base.cc.

bool Input::Type::FileName::operator== ( const TypeBase other) const
overridevirtual

Comparison of types.

Reimplemented from Input::Type::TypeBase.

Definition at line 589 of file type_base.cc.

FileName Input::Type::FileName::output ( )
static

The factory function for declaring type FileName for input files.

Definition at line 533 of file type_base.cc.

Here is the caller graph for this function:

string Input::Type::FileName::type_name ( ) const
overridevirtual

Implements Type::TypeBase::type_name.

Name has form FileName_input or FileName_output

Reimplemented from Input::Type::String.

Definition at line 552 of file type_base.cc.

Here is the caller graph for this function:

Member Data Documentation

::FilePath::FileType Input::Type::FileName::type_
private

The type of file (input or output).

Definition at line 663 of file type_base.hh.


The documentation for this class was generated from the following files: