Choreonoid  1.5
Public Member Functions | Friends | List of all members
cnoid::ScalarNode Class Reference

#include <ValueTree.h>

Inheritance diagram for cnoid::ScalarNode:
cnoid::ValueNode cnoid::Referenced

Public Member Functions

 ScalarNode (const std::string &value, StringStyle stringStyle=PLAIN_STRING)
 
 ScalarNode (int value)
 
virtual ValueNodeclone () const
 
- Public Member Functions inherited from cnoid::ValueNode
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 ()
 

Friends

class YAMLReaderImpl
 
class YAMLWriter
 
class ValueNode
 
class Mapping
 
class Listing
 

Additional Inherited Members

- Public Types inherited from cnoid::ValueNode
enum  TypeBit {
  INVALID_NODE = 0, SCALAR = 1, MAPPING = 2, LISTING = 4,
  INSERT_LF = 8, APPEND_LF = 16
}
 
- Protected Member Functions inherited from cnoid::ValueNode
 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 inherited from cnoid::ValueNode
int typeBits
 

Constructor & Destructor Documentation

◆ ScalarNode() [1/2]

ScalarNode::ScalarNode ( const std::string &  value,
StringStyle  stringStyle = PLAIN_STRING 
)

◆ ScalarNode() [2/2]

ScalarNode::ScalarNode ( int  value)

Member Function Documentation

◆ clone()

ValueNode * ScalarNode::clone ( ) const
virtual

Reimplemented from cnoid::ValueNode.

Friends And Related Function Documentation

◆ Listing

friend class Listing
friend

◆ Mapping

friend class Mapping
friend

◆ ValueNode

friend class ValueNode
friend

◆ YAMLReaderImpl

friend class YAMLReaderImpl
friend

◆ YAMLWriter

friend class YAMLWriter
friend

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