Flow123d  DF_patch_fe_data_tables-22c8b57
reader_internal.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file reader_internal.hh
15  * @brief
16  */
17 
18 #ifndef READER_INTERNAL_HH_
19 #define READER_INTERNAL_HH_
20 
21 
23 
24 
25 namespace Input {
26 
27 using namespace std;
28 
29 
30 /**
31  * @brief Creates storage of IST defined in JSON or YAML file.
32  *
33  * This class works like start point of creating IST storage. Allows to use other descendants
34  * of ReaderInternalBase to construct storage of special parts of IST:
35  * - transposition of Type::Array type
36  * - subtree included in CSV file
37  *
38  * @ingroup input
39  */
41 public:
42  /// Constructor
44 
45  /// Create storage of given @p type.
46  StorageBase * read_storage(PathBase &p, const Type::TypeBase *type);
47 
48 protected:
49  StorageBase * make_sub_storage(PathBase &p, const Type::Array *array) override; ///< Create storage of Type::Array type
50  StorageBase * make_sub_storage(PathBase &p, const Type::Selection *selection) override; ///< Create storage of Type::Selection type
51  StorageBase * make_sub_storage(PathBase &p, const Type::Bool *bool_type) override; ///< Create storage of Type::Bool type
52  StorageBase * make_sub_storage(PathBase &p, const Type::Integer *int_type) override; ///< Create storage of Type::Integer type
53  StorageBase * make_sub_storage(PathBase &p, const Type::Double *double_type) override; ///< Create storage of Type::Double type
54  StorageBase * make_sub_storage(PathBase &p, const Type::String *string_type) override; ///< Create storage of Type::String type
55 
56 };
57 
58 
59 } // namespace Input
60 
61 
62 
63 #endif /* READER_INTERNAL_HH_ */
Base abstract class used by ReaderToStorage class to iterate over the input tree.
Definition: path_base.hh:41
Internal part of IST reader.
Creates storage of IST defined in JSON or YAML file.
Base class for nodes of a data storage tree.
Definition: storage.hh:68
Class for declaration of inputs sequences.
Definition: type_base.hh:339
Class for declaration of the input of type Bool.
Definition: type_base.hh:452
Class for declaration of the input data that are floating point numbers.
Definition: type_base.hh:534
Class for declaration of the integral input data.
Definition: type_base.hh:483
Template for classes storing finite set of named values.
Class for declaration of the input data that are in string format.
Definition: type_base.hh:582
Base of classes for declaring structure of the input data.
Definition: type_base.hh:92
Array< double > array
Definition: armor.hh:938
Abstract linear system class.
Definition: balance.hh:40