Choreonoid  1.8
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, FORCED_RADIAN_MODE = 32
}
 

Public Member Functions

virtual ValueNodeclone () const
 
bool isValid () const
 
 operator bool () const
 
TypeBit LFType () const
 
TypeBit nodeType () const
 
int toInt () const
 
double toDouble () const
 
float toFloat () const
 
bool toBool () const
 
double toAngle () const
 
bool isScalar () const
 
bool isString () const
 
bool isCollection () const
 
const std::string & toString () const
 
bool isForcedRadianMode () const
 
void setForcedRadianMode (bool on=true)
 
bool isDegreeMode () const
 
void setDegreeMode ()
 
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 (float &out_value) const
 
bool read (bool &out_value) const
 
bool read (std::string &out_value) const
 
bool hasLineInfo () const
 
int line () const
 
int column () const
 
void throwException (const std::string &message) const
 
int indexInMapping () const
 
void setAsHeaderInMapping (int priority=1)
 
template<>
double to () const
 
template<>
float to () const
 
template<>
int to () const
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

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 &)
 
int refCount () const
 

Protected Attributes

int typeBits
 

Friends

class YAMLReaderImpl
 
class ScalarNode
 
class Mapping
 
class Listing
 

Member Enumeration Documentation

◆ TypeBit

Enumerator
INVALID_NODE 
SCALAR 
MAPPING 
LISTING 
INSERT_LF 
APPEND_LF 
FORCED_RADIAN_MODE 

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

◆ indexInMapping()

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

◆ isCollection()

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

◆ isDegreeMode()

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

◆ isForcedRadianMode()

bool cnoid::ValueNode::isForcedRadianMode ( ) const
inline
Note
If this is true for a top node given to a particular process, all the angle elements contained in the sub tree are foreced to radians. Note that the mode of the nodes except for the top node given to the process do not affect the angle unit.

◆ 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 bool()

cnoid::ValueNode::operator bool ( ) const
inlineexplicit

◆ read() [1/5]

bool ValueNode::read ( bool &  out_value) const

◆ read() [2/5]

bool ValueNode::read ( double &  out_value) const

◆ read() [3/5]

bool ValueNode::read ( float &  out_value) const

◆ read() [4/5]

bool ValueNode::read ( int &  out_value) const

◆ read() [5/5]

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

◆ setAsHeaderInMapping()

void cnoid::ValueNode::setAsHeaderInMapping ( int  priority = 1)
inline

◆ setDegreeMode()

void cnoid::ValueNode::setDegreeMode ( )
inline

◆ setForcedRadianMode()

void cnoid::ValueNode::setForcedRadianMode ( bool  on = true)
inline

◆ 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/4]

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

◆ to() [2/4]

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

◆ to() [3/4]

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

◆ to() [4/4]

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

◆ toAngle()

double ValueNode::toAngle ( ) const

◆ toBool()

bool ValueNode::toBool ( ) const

◆ toDouble()

double ValueNode::toDouble ( ) const

◆ toFloat()

float ValueNode::toFloat ( ) const

◆ toInt()

int ValueNode::toInt ( ) const

◆ toListing() [1/2]

Listing* cnoid::ValueNode::toListing ( )

◆ toListing() [2/2]

Listing * ValueNode::toListing ( ) const

◆ toMapping() [1/2]

Mapping* cnoid::ValueNode::toMapping ( )

◆ toMapping() [2/2]

Mapping * ValueNode::toMapping ( ) const

◆ toString()

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

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

Member Data Documentation

◆ typeBits

int cnoid::ValueNode::typeBits
protected

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