Cantera  2.5.1
Public Member Functions | Protected Attributes | Friends | List of all members
AnyBase Class Reference

Base class defining common data possessed by both AnyMap and AnyValue objects. More...

#include <AnyMap.h>

Inheritance diagram for AnyBase:
[legend]

Public Member Functions

void setLoc (int line, int column)
 For values which are derived from an input file, set the line and column of this value in that file. More...
 
const AnyValuegetMetadata (const std::string &key) const
 Get a value from the metadata applicable to the AnyMap tree containing this node. More...
 

Protected Attributes

int m_line
 Line where this node occurs in the input file. More...
 
int m_column
 Column where this node occurs in the input file. More...
 
shared_ptr< AnyMapm_metadata
 Metadata relevant to an entire AnyMap tree, such as information about. More...
 

Friends

class InputFileError
 

Detailed Description

Base class defining common data possessed by both AnyMap and AnyValue objects.

Definition at line 30 of file AnyMap.h.

Member Function Documentation

◆ setLoc()

void setLoc ( int  line,
int  column 
)

For values which are derived from an input file, set the line and column of this value in that file.

Used for providing context for some error messages.

Definition at line 283 of file AnyMap.cpp.

References AnyBase::m_column, and AnyBase::m_line.

Referenced by AnyMap::fromYamlFile(), AnyMap::fromYamlString(), and AnyMap::operator[]().

◆ getMetadata()

const AnyValue & getMetadata ( const std::string &  key) const

Get a value from the metadata applicable to the AnyMap tree containing this node.

Definition at line 289 of file AnyMap.cpp.

References AnyBase::m_metadata.

Member Data Documentation

◆ m_line

int m_line
protected

Line where this node occurs in the input file.

Definition at line 46 of file AnyMap.h.

Referenced by AnyMap::operator[](), and AnyBase::setLoc().

◆ m_column

int m_column
protected

Column where this node occurs in the input file.

Definition at line 49 of file AnyMap.h.

Referenced by AnyMap::operator[](), and AnyBase::setLoc().

◆ m_metadata

shared_ptr<AnyMap> m_metadata
protected

Metadata relevant to an entire AnyMap tree, such as information about.

Definition at line 53 of file AnyMap.h.

Referenced by AnyBase::getMetadata(), AnyMap::operator[](), AnyValue::propagateMetadata(), AnyMap::propagateMetadata(), and AnyMap::setMetadata().


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