Flow123d
master-3768d5dec
src
input
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
22
#include "
input/reader_internal_base.hh
"
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
*/
40
class
ReaderInternal
:
public
ReaderInternalBase
{
41
public
:
42
/// Constructor
43
ReaderInternal
();
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_ */
Input::StorageBase
Base class for nodes of a data storage tree.
Definition:
storage.hh:68
Input::Type::Bool
Class for declaration of the input of type Bool.
Definition:
type_base.hh:452
Input::int_type
@ int_type
Definition:
reader_to_storage.hh:72
Input
Abstract linear system class.
Definition:
balance.hh:40
Input::Type::Integer
Class for declaration of the integral input data.
Definition:
type_base.hh:483
Input::PathBase
Base abstract class used by ReaderToStorage class to iterate over the input tree.
Definition:
path_base.hh:41
Input::Type::Double
Class for declaration of the input data that are floating point numbers.
Definition:
type_base.hh:534
Armor::array
Array< double > array
Definition:
armor.hh:890
reader_internal_base.hh
Input::bool_type
@ bool_type
Definition:
reader_to_storage.hh:72
Input::Type::Selection
Template for classes storing finite set of named values.
Definition:
type_selection.hh:65
Input::Type::Array
Class for declaration of inputs sequences.
Definition:
type_base.hh:339
Input::Type::String
Class for declaration of the input data that are in string format.
Definition:
type_base.hh:582
std
Definition:
doxy_dummy_defs.hh:5
Input::Type::TypeBase
Base of classes for declaring structure of the input data.
Definition:
type_base.hh:92
Input::ReaderInternal
Creates storage of IST defined in JSON or YAML file.
Definition:
reader_internal.hh:40
Input::ReaderInternalBase
Internal part of IST reader.
Definition:
reader_internal_base.hh:42
Generated by
1.8.17