Choreonoid  1.8
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
 
const std::string & stringValue () const
 
StringStyle stringStyle () const
 
- Public Member Functions inherited from cnoid::ValueNode
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 ()
 

Friends

class YAMLReaderImpl
 
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, FORCED_RADIAN_MODE = 32
}
 
- 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 &)
 
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.

◆ stringStyle()

StringStyle cnoid::ScalarNode::stringStyle ( ) const
inline

◆ stringValue()

const std::string& cnoid::ScalarNode::stringValue ( ) const
inline

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

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