Manual for OpenFLUID 2.1.11

Public Member Functions | List of all members
openfluid::core::TreeValue Class Reference

Detailed Description

TreeValue is a container for a hierarchical tree of signed double precision floating point values.

#include <core/TreeValue.hpp>

Public Member Functions

 TreeValue ()
 
 TreeValue (const TreeValue &Val)
 
TreeValue & operator= (const Value &Other) override
 
TreeValue & operator= (const TreeValue &Other)
 
virtual ~TreeValue ()
 
Type getType () const override
 
Value * clone () const override
 
void writeToStream (std::ostream &OutStm) const override
 
void writeQuotedToStream (std::ostream &OutStm) const override
 
- Public Member Functions inherited from openfluid::core::CompoundValue
bool isSimple () const override
 
bool isCompound () const override
 
- Public Member Functions inherited from openfluid::core::Value
 Value ()=default
 
 Value (const Value &)=default
 
 Value (Value &&)=default
 
virtual Value & operator= (Value &&)
 
virtual ~Value ()=default
 
virtual bool convert (Value &) const
 
bool isDoubleValue () const
 
const DoubleValue & asDoubleValue () const
 
DoubleValue & asDoubleValue ()
 
bool isIntegerValue () const
 
const IntegerValue & asIntegerValue () const
 
IntegerValue & asIntegerValue ()
 
bool isBooleanValue () const
 
const BooleanValue & asBooleanValue () const
 
BooleanValue & asBooleanValue ()
 
bool isStringValue () const
 
const StringValue & asStringValue () const
 
StringValue & asStringValue ()
 
bool isNullValue () const
 
const NullValue & asNullValue () const
 
NullValue & asNullValue ()
 
bool isVectorValue () const
 
const VectorValue & asVectorValue () const
 
VectorValue & asVectorValue ()
 
bool isMatrixValue () const
 
const MatrixValue & asMatrixValue () const
 
MatrixValue & asMatrixValue ()
 
bool isMapValue () const
 
const MapValue & asMapValue () const
 
MapValue & asMapValue ()
 
bool isTreeValue () const
 
const TreeValue & asTreeValue () const
 
TreeValue & asTreeValue ()
 
std::string toString () const
 
- Public Member Functions inherited from openfluid::core::Tree< std::string, double >
 Tree ()
 
double getValue () const
 
double getValue (const double &DefaultVal) const
 
void setValue (const double &Val)
 
bool hasValue () const
 
Children_t & children ()
 
const Children_t & children () const
 
Tree< std::string, double > & child (const std::string &Key)
 
const Tree< std::string, double > & child (const std::string &Key) const
 
double getChildValue (const std::string &Key, const double &DefaultVal) const
 
bool hasChild (const std::string &Key) const
 
Tree< std::string, double > & addChild (const std::string &Key, const double &Val)
 
Tree< std::string, double > & addChild (const std::string &Key)
 
void deleteChild (const std::string &Key)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void clear ()
 
unsigned int size () const
 
void writeToStreamHierarchically (std::ostream &OutStm, unsigned int Indent=0) const
 
void writeToStreamFlat (std::ostream &OutStm) const
 

Additional Inherited Members

- Public Types inherited from openfluid::core::Value
enum  Type {
  NONE, BOOLEAN, INTEGER, DOUBLE,
  STRING, VECTOR, MATRIX, MAP,
  TREE, NULLL
}
 
- Public Types inherited from openfluid::core::Tree< std::string, double >
typedef std::map< std::string, Tree< std::string, double > > Children_t
 
typedef Children_t::iterator iterator
 
typedef Children_t::const_iterator const_iterator
 
- Static Public Member Functions inherited from openfluid::core::Value
static bool getValueTypeFromString (const std::string &ValueTypeString, Value::Type &ValueType)
 
static std::string getStringFromValueType (const Value::Type ValueType)
 
- Protected Member Functions inherited from openfluid::core::Tree< std::string, double >
std::string keyToStr (const std::string &Key) const
 
- Protected Attributes inherited from openfluid::core::Tree< std::string, double >
double m_Value
 
Children_t m_Children
 
bool m_HasValue
 
Inheritance diagram for openfluid::core::TreeValue:
Inheritance graph
[legend]
Collaboration diagram for openfluid::core::TreeValue:
Collaboration graph
[legend]

Constructor & Destructor Documentation

◆ TreeValue() [1/2]

openfluid::core::TreeValue::TreeValue ( )
inline

Default constructor

◆ TreeValue() [2/2]

openfluid::core::TreeValue::TreeValue ( const TreeValue &  Val)
inline

Copy constructor

◆ ~TreeValue()

virtual openfluid::core::TreeValue::~TreeValue ( )
inlinevirtual

Member Function Documentation

◆ clone()

Value* openfluid::core::TreeValue::clone ( ) const
inlineoverridevirtual

Reimplemented from openfluid::core::Value.

◆ getType()

Type openfluid::core::TreeValue::getType ( ) const
inlineoverridevirtual

◆ operator=() [1/2]

TreeValue& openfluid::core::TreeValue::operator= ( const TreeValue &  Other)

◆ operator=() [2/2]

TreeValue& openfluid::core::TreeValue::operator= ( const Value &  )
overridevirtual

Assignment operator

Reimplemented from openfluid::core::Value.

◆ writeQuotedToStream()

void openfluid::core::TreeValue::writeQuotedToStream ( std::ostream &  OutStm) const
inlineoverridevirtual

◆ writeToStream()

void openfluid::core::TreeValue::writeToStream ( std::ostream &  OutStm) const
overridevirtual

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