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

Enumerator
INVALID_NODE 
SCALAR 
MAPPING 
LISTING 
INSERT_LF 
APPEND_LF 

Constructor & Destructor Documentation

cnoid::ValueNode::ValueNode ( )
inlineprotected
cnoid::ValueNode::ValueNode ( TypeBit  type)
inlineprotected
virtual cnoid::ValueNode::~ValueNode ( )
inlineprotectedvirtual

Member Function Documentation

ValueNode * ValueNode::clone ( ) const
virtual
int cnoid::ValueNode::column ( ) const
inline
bool cnoid::ValueNode::hasLineInfo ( ) const
inline
bool cnoid::ValueNode::isListing ( ) const
inline
bool cnoid::ValueNode::isMapping ( ) const
inline
bool cnoid::ValueNode::isScalar ( ) const
inline
bool cnoid::ValueNode::isString ( ) const
inline
bool cnoid::ValueNode::isValid ( ) const
inline
TypeBit cnoid::ValueNode::LFType ( ) const
inline
int cnoid::ValueNode::line ( ) const
inline
TypeBit cnoid::ValueNode::nodeType ( ) const
inline
cnoid::ValueNode::operator const std::string & ( ) const
inline
bool ValueNode::read ( int &  out_value) const
bool ValueNode::read ( double &  out_value) const
bool ValueNode::read ( bool &  out_value) const
bool ValueNode::read ( std::string &  out_value) const
bool ValueNode::readUTF8String ( std::string &  out_value) const
void ValueNode::throwException ( const std::string &  message) const
void ValueNode::throwNotListingException ( ) const
protected
void ValueNode::throwNotMappingException ( ) const
protected
void ValueNode::throwNotScalrException ( ) const
protected
template<typename T >
T cnoid::ValueNode::to ( ) const
template<>
double cnoid::ValueNode::to ( ) const
inline
template<>
int cnoid::ValueNode::to ( ) const
inline
bool ValueNode::toBool ( ) const
double ValueNode::toDouble ( ) const
int ValueNode::toInt ( ) const
const Listing * ValueNode::toListing ( ) const
Listing * ValueNode::toListing ( )
const Mapping * ValueNode::toMapping ( ) const
Mapping * ValueNode::toMapping ( )
const std::string & ValueNode::toString ( ) const
const std::string & ValueNode::toUTF8String ( ) const

Friends And Related Function Documentation

friend class Listing
friend
friend class Mapping
friend
friend class ScalarNode
friend
friend class YAMLReaderImpl
friend
friend class YAMLWriter
friend

Member Data Documentation

int cnoid::ValueNode::typeBits
protected

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