Documentation for OpenFLUID 2.2.2
Loading...
Searching...
No Matches
TreeValue.hpp
Go to the documentation of this file.
1/*
2
3 This file is part of OpenFLUID software
4 Copyright(c) 2021-2026, INRAE
5
6
7 == GNU General Public License Usage ==
8
9 OpenFLUID is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OpenFLUID is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21
22
23 == Other Usage ==
24
25 Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26 license, and requires a written agreement between You and INRA.
27 Licensees for Other Usage of OpenFLUID may use this file in accordance
28 with the terms contained in the written agreement between You and INRA.
29
30*/
31
32
33/**
34 @file TreeValue.hpp
35
36 @author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37*/
38
39
40#ifndef __OPENFLUID_CORE_TREEVALUE_HPP__
41#define __OPENFLUID_CORE_TREEVALUE_HPP__
42
43
44#include <string>
45
49
50
51namespace openfluid { namespace core {
52
53/**
54 TreeValue is a container for a hierarchical tree of signed double precision floating point values.\n
55
56 @cond OpenFLUID:completion
57 {
58 "contexts" : ["ANYWARE"],
59 "menupath" : ["Types", "Values"],
60 "title" : "TreeValue",
61 "text" : "openfluid::core::TreeValue %%SEL_START%%Val%%SEL_END%%"
62 }
63 @endcond
64*/
65class OPENFLUID_API TreeValue : public CompoundValue, public Tree<std::string,double>
66{
67
68 public:
69
70 /**
71 Default constructor
72 */
73 TreeValue() : CompoundValue(), Tree<std::string,double>()
74 { }
75
76 /**
77 Copy constructor
78 */
79 TreeValue(const TreeValue& Val) :
81 Tree<std::string,double>(static_cast<const Tree<std::string,double>& >(Val))
82 { }
83
84 TreeValue& operator=(const Value& Other) override;
85
87
88 virtual ~TreeValue()
89 { }
90
91 inline Type getType() const override
92 {
93 return Value::TREE;
94 }
95
96 Value* clone() const override
97 {
98 return new TreeValue(*this);
99 };
100
101 void writeToStream(std::ostream& OutStm) const override;
102
103 void writeQuotedToStream(std::ostream& OutStm) const override
104 {
105 writeToStream(OutStm);
106 }
107
108};
109
110
111} } // namespaces
112
113
114#endif /* __OPENFLUID_CORE_TREEVALUE_HPP__ */
Definition CompoundValue.hpp:52
Definition TreeValue.hpp:66
TreeValue & operator=(const Value &Other) override
TreeValue(const TreeValue &Val)
Definition TreeValue.hpp:79
TreeValue & operator=(const TreeValue &Other)
Type getType() const override
Definition TreeValue.hpp:91
Value * clone() const override
Definition TreeValue.hpp:96
TreeValue()
Definition TreeValue.hpp:73
virtual ~TreeValue()
Definition TreeValue.hpp:88
void writeToStream(std::ostream &OutStm) const override
void writeQuotedToStream(std::ostream &OutStm) const override
Definition TreeValue.hpp:103
Definition Tree.hpp:56
Definition Value.hpp:63
Type
Definition Value.hpp:66
#define OPENFLUID_API
Definition dllexport.hpp:86
Definition ApplicationException.hpp:47