Flow123d
3.9.0-3aaaea010
src
input
input_type.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 input_type.hh
15
* @brief
16
* @todo
17
* - explicit instantiation of templates in accessors - not so easy
18
*
19
* - TYPE is obligatory key of descendants of an Abstract, for consistent documentation it should be reported as
20
* a obligatory key in these Records, however it is quite complicated to have it there , and it is not necessary for
21
* check of the input since we shall look for it explicitely.
22
*
23
* - Documentation of Abstract should contain TYPE and common keys, descendants should report only nonderived keys.
24
*
25
* - better Doxygen doc
26
*
27
* - detailni popis pouziti deklaraci typu na systemu trid (v TypeBase)
28
*
29
* - Implementovat selection tak, aby typem Enum byla templatovana jen vnitrni datova struktura ( a pochopitelne access metody, ktere potrebuji
30
* presny typ, tj
31
* ...
32
*
33
* - have global list of Record and selection names and guarantee the they are unique, otherwise == can be incorrect.
34
*
35
* - when creating a "unique instance" of a lazy type we should check that its name is unique (in derived records we should
36
* distinguish short_name used in Abstract TYPE selection, and full_name that includes name of the parent Abstract.
37
* This is important to prevent Record derive from different local instances of Abstract.
38
*
39
* When C++11 specification become more supported, we can introduce class Key that should be constructed form
40
* constant string during compilation, in particular it should check validity of the key string and compute the hash.
41
* This can provide some speedup for reading if it will be needed (probably not).
42
*
43
* - under C++11 we can also construct Selection s from the enum type
44
*
45
* - Question: allow implicit value of the TYPE key (and selection the descendant) depending on the keys that appears on the input.
46
* - Question: Support keys with multiple possible types:
47
* we declare more keys like: region_set_INTEGER, region_set_STRING, region_set_ARRAY, but user specify just
48
* region_set=..., and appropriate key is used.
49
*
50
* - non-polymorph inheritance of Records, in fact just copy of keys of one record to another + posibility to extend them
51
*
52
* Notes:
53
* - copy constructors and usage of Pimpl idiom for more complex types is necessary due to usage of shared pointers - to create them we need copies
54
*/
55
56
#ifndef INPUTTYPE_HH_
57
#define INPUTTYPE_HH_
58
59
#include "
type_base.hh
"
60
#include "
input/attribute_lib.hh
"
61
#include "
type_selection.hh
"
62
#include "
type_record.hh
"
63
#include "
type_abstract.hh
"
64
#include "
type_generic.hh
"
65
#include "
type_tuple.hh
"
66
67
#endif
/* INPUTTYPE_HH_ */
type_abstract.hh
type_tuple.hh
type_base.hh
type_selection.hh
type_record.hh
attribute_lib.hh
type_generic.hh
Generated by
1.8.17