Choreonoid  1.5
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cnoid::ValueNode Class Reference

#include <ValueTree.h>

Inheritance diagram for cnoid::ValueNode:
cnoid::Referenced cnoid::Listing cnoid::Mapping cnoid::ScalarNode cnoid::Archive

Classes

class  DocumentNotFoundException
 
class  EmptyKeyException
 
class  Exception
 
class  FileException
 
class  KeyNotFoundException
 
class  NotListingException
 
class  NotMappingException
 
class  NotScalarException
 
class  ScalarTypeMismatchException
 
class  SyntaxException
 
class  UnknownNodeTypeException
 

Public Types

enum  TypeBit {
  INVALID_NODE = 0, SCALAR = 1, MAPPING = 2, LISTING = 4,
  INSERT_LF = 8, APPEND_LF = 16
}
 

Public Member Functions

virtual ValueNodeclone () const
 
bool isValid () const
 
TypeBit LFType () const
 
TypeBit nodeType () const
 
int toInt () const
 
double toDouble () const
 
bool toBool () const
 
bool isScalar () const
 
bool isString () const
 
const std::string & toString () const
 
const std::string & toUTF8String () const
 
 operator const std::string & () const
 
template<typename T >
to () const
 
bool isMapping () const
 
const MappingtoMapping () const
 
MappingtoMapping ()
 
bool isListing () const
 
const ListingtoListing () const
 
ListingtoListing ()
 
bool read (int &out_value) const
 
bool read (double &out_value) const
 
bool read (bool &out_value) const
 
bool read (std::string &out_value) const
 
bool readUTF8String (std::string &out_value) const
 
bool hasLineInfo () const
 
int line () const
 
int column () const
 
void throwException (const std::string &message) const
 
template<>
double to () const
 
template<>
int to () const
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 
void addRef ()
 
void releaseRef ()
 

Protected Member Functions

 ValueNode ()
 
 ValueNode (TypeBit type)
 
virtual ~ValueNode ()
 
void throwNotScalrException () const
 
void throwNotMappingException () const
 
void throwNotListingException () const
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &org)
 
int refCount () const
 

Protected Attributes

int typeBits
 

Friends

class YAMLReaderImpl
 
class YAMLWriter
 
class ScalarNode
 
class Mapping
 
class Listing
 

Member Enumeration Documentation

◆ TypeBit

Enumerator
INVALID_NODE 
SCALAR 
MAPPING 
LISTING 
INSERT_LF 
APPEND_LF 

Constructor & Destructor Documentation

◆ ValueNode() [1/2]

cnoid::ValueNode::ValueNode ( )
inlineprotected

◆ ValueNode() [2/2]

cnoid::ValueNode::ValueNode ( TypeBit  type)
inlineprotected

◆ ~ValueNode()

virtual cnoid::ValueNode::~ValueNode ( )
inlineprotectedvirtual

Member Function Documentation

◆ clone()

ValueNode * ValueNode::clone ( ) const
virtual

◆ column()

int cnoid::ValueNode::column ( ) const
inline

◆ hasLineInfo()

bool cnoid::ValueNode::hasLineInfo ( ) const
inline

◆ isListing()

bool cnoid::ValueNode::isListing ( ) const
inline

◆ isMapping()

bool cnoid::ValueNode::isMapping ( ) const
inline

◆ isScalar()

bool cnoid::ValueNode::isScalar ( ) const
inline

◆ isString()

bool cnoid::ValueNode::isString ( ) const
inline

◆ isValid()

bool cnoid::ValueNode::isValid ( ) const
inline

◆ LFType()

TypeBit cnoid::ValueNode::LFType ( ) const
inline

◆ line()

int cnoid::ValueNode::line ( ) const
inline

◆ nodeType()

TypeBit cnoid::ValueNode::nodeType ( ) const
inline

◆ operator const std::string &()

cnoid::ValueNode::operator const std::string & ( ) const
inline

◆ read() [1/4]

bool ValueNode::read ( int &  out_value) const

◆ read() [2/4]

bool ValueNode::read ( double &  out_value) const

◆ read() [3/4]

bool ValueNode::read ( bool &  out_value) const

◆ read() [4/4]

bool ValueNode::read ( std::string &  out_value) const

◆ readUTF8String()

bool ValueNode::readUTF8String ( std::string &  out_value) const

◆ throwException()

void ValueNode::throwException ( const std::string &  message) const

◆ throwNotListingException()

void ValueNode::throwNotListingException ( ) const
protected

◆ throwNotMappingException()

void ValueNode::throwNotMappingException ( ) const
protected

◆ throwNotScalrException()

void ValueNode::throwNotScalrException ( ) const
protected

◆ to() [1/3]

template<typename T >
T cnoid::ValueNode::to ( ) const

◆ to() [2/3]

template<>
double cnoid::ValueNode::to ( ) const
inline

◆ to() [3/3]

template<>
int cnoid::ValueNode::to ( ) const
inline

◆ toBool()

bool ValueNode::toBool ( ) const

◆ toDouble()

double ValueNode::toDouble ( ) const

◆ toInt()

int ValueNode::toInt ( ) const

◆ toListing() [1/2]

const Listing * ValueNode::toListing ( ) const

◆ toListing() [2/2]

Listing * ValueNode::toListing ( )

◆ toMapping() [1/2]

const Mapping * ValueNode::toMapping ( ) const

◆ toMapping() [2/2]

Mapping * ValueNode::toMapping ( )

◆ toString()

const std::string & ValueNode::toString ( ) const

◆ toUTF8String()

const std::string & ValueNode::toUTF8String ( ) const

Friends And Related Function Documentation

◆ Listing

friend class Listing
friend

◆ Mapping

friend class Mapping
friend

◆ ScalarNode

friend class ScalarNode
friend

◆ YAMLReaderImpl

friend class YAMLReaderImpl
friend

◆ YAMLWriter

friend class YAMLWriter
friend

Member Data Documentation

◆ typeBits

int cnoid::ValueNode::typeBits
protected

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