CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
CYamlNode Class Reference

Simple YAML node class to represent parsed values. More...

#include <yaml_parser.h>

Public Member Functions

 CYamlNode ()
 
 ~CYamlNode ()
 
void SetValue (string const &strValue)
 
void AddChild (string const &strKey, CYamlNode const &node)
 
void AddSequenceItem (CYamlNode const &node)
 
string GetValue () const
 
bool HasChild (string const &strKey) const
 
CYamlNode GetChild (string const &strKey) const
 
vector< CYamlNodeGetSequence () const
 
bool IsSequence () const
 
int GetSequenceSize () const
 
int GetIntValue (int nDefault=0) const
 
double GetDoubleValue (double dDefault=0.0) const
 
bool GetBoolValue (bool bDefault=false) const
 
vector< stringGetStringSequence () const
 

Private Attributes

string m_strValue
 
map< string, CYamlNodem_mapChildren
 
vector< CYamlNodem_vecChildren
 
bool m_bIsSequence
 

Detailed Description

Simple YAML node class to represent parsed values.

Definition at line 38 of file yaml_parser.h.

Constructor & Destructor Documentation

◆ CYamlNode()

CYamlNode::CYamlNode ( )

Definition at line 41 of file yaml_parser.cpp.

Referenced by AddChild(), AddSequenceItem(), and GetChild().

◆ ~CYamlNode()

CYamlNode::~CYamlNode ( )

Definition at line 45 of file yaml_parser.cpp.

Member Function Documentation

◆ AddChild()

void CYamlNode::AddChild ( string const & strKey,
CYamlNode const & node )

Definition at line 54 of file yaml_parser.cpp.

Referenced by CYamlParser::ParseSection().

◆ AddSequenceItem()

void CYamlNode::AddSequenceItem ( CYamlNode const & node)

Definition at line 59 of file yaml_parser.cpp.

Referenced by CYamlParser::ParseSection().

◆ GetBoolValue()

bool CYamlNode::GetBoolValue ( bool bDefault = false) const

Definition at line 126 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ GetChild()

CYamlNode CYamlNode::GetChild ( string const & strKey) const

Definition at line 75 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ GetDoubleValue()

double CYamlNode::GetDoubleValue ( double dDefault = 0.0) const

Definition at line 112 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ GetIntValue()

int CYamlNode::GetIntValue ( int nDefault = 0) const

Definition at line 98 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ GetSequence()

vector< CYamlNode > CYamlNode::GetSequence ( ) const

Definition at line 83 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ GetSequenceSize()

int CYamlNode::GetSequenceSize ( ) const

Definition at line 93 of file yaml_parser.cpp.

◆ GetStringSequence()

vector< string > CYamlNode::GetStringSequence ( ) const

Definition at line 142 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ GetValue()

string CYamlNode::GetValue ( ) const

Definition at line 65 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ HasChild()

bool CYamlNode::HasChild ( string const & strKey) const

Definition at line 70 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ IsSequence()

bool CYamlNode::IsSequence ( ) const

Definition at line 88 of file yaml_parser.cpp.

Referenced by CSimulation::bConfigureFromYamlFile().

◆ SetValue()

void CYamlNode::SetValue ( string const & strValue)

Definition at line 49 of file yaml_parser.cpp.

Referenced by CYamlParser::ParseSection().

Field Documentation

◆ m_bIsSequence

bool CYamlNode::m_bIsSequence
private

Definition at line 44 of file yaml_parser.h.

Referenced by AddSequenceItem(), CYamlNode(), and IsSequence().

◆ m_mapChildren

map<string, CYamlNode> CYamlNode::m_mapChildren
private

Definition at line 42 of file yaml_parser.h.

Referenced by AddChild(), GetChild(), and HasChild().

◆ m_strValue

string CYamlNode::m_strValue
private

Definition at line 41 of file yaml_parser.h.

Referenced by GetBoolValue(), GetDoubleValue(), GetIntValue(), GetValue(), and SetValue().

◆ m_vecChildren

vector<CYamlNode> CYamlNode::m_vecChildren
private

Definition at line 43 of file yaml_parser.h.

Referenced by AddSequenceItem(), GetSequence(), GetSequenceSize(), and GetStringSequence().


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