Choreonoid  1.8
Public Types | Public Member Functions | Friends | List of all members
cnoid::Listing Class Reference

#include <ValueTree.h>

Inheritance diagram for cnoid::Listing:
cnoid::ValueNode cnoid::Referenced

Public Types

typedef Container::iterator iterator
 
typedef Container::const_iterator const_iterator
 
- 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
}
 

Public Member Functions

 Listing ()
 
 Listing (int size)
 
 ~Listing ()
 
virtual ValueNodeclone () const
 
bool empty () const
 
int size () const
 
void clear ()
 
void reserve (int size)
 
void setFlowStyle (bool isFlowStyle=true)
 
bool isFlowStyle () const
 
void setFloatingNumberFormat (const char *format)
 
const char * floatingNumberFormat ()
 
void setDoubleFormat (const char *format)
 
const char * doubleFormat ()
 
ValueNodefront () const
 
ValueNodeback () const
 
ValueNodeat (int i) const
 
ValueNodeget (int i) const
 
void write (int i, int value)
 
void write (int i, const std::string &value, StringStyle stringStyle=PLAIN_STRING)
 
ValueNodeoperator[] (int i) const
 
MappingnewMapping ()
 
void append (ValueNode *node)
 
void insert (int index, ValueNode *node)
 
void append (int value)
 
void append (int value, int maxColumns, int numValues=0)
 
void append (size_t value)
 
void append (double value)
 
void append (double value, int maxColumns, int numValues=0)
 
void append (const std::string &value, StringStyle stringStyle=PLAIN_STRING)
 
void append (const std::string &value, int maxColumns, int numValues=0, StringStyle stringStyle=PLAIN_STRING)
 
void appendLF ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () 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 Mapping
 
class YAMLReaderImpl
 

Additional Inherited Members

- 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
 

Detailed Description

Note
The name "Sequence" should not be used for this class because it confilcts with the name defined in the boost's concept check library.

Member Typedef Documentation

◆ const_iterator

typedef Container::const_iterator cnoid::Listing::const_iterator

◆ iterator

typedef Container::iterator cnoid::Listing::iterator

Constructor & Destructor Documentation

◆ Listing() [1/2]

Listing::Listing ( )

◆ Listing() [2/2]

Listing::Listing ( int  size)

◆ ~Listing()

Listing::~Listing ( )

Member Function Documentation

◆ append() [1/8]

void cnoid::Listing::append ( const std::string &  value,
int  maxColumns,
int  numValues = 0,
StringStyle  stringStyle = PLAIN_STRING 
)
inline
Parameters
maxColumnsLF is automatically inserted when the column pos is over maxColumsn
numValuesIf numValues is not greater than maxColumns, the initial LF is skipped. This feature is disabled if numValues = 0.

◆ append() [2/8]

void Listing::append ( const std::string &  value,
StringStyle  stringStyle = PLAIN_STRING 
)

◆ append() [3/8]

void Listing::append ( double  value)

◆ append() [4/8]

void cnoid::Listing::append ( double  value,
int  maxColumns,
int  numValues = 0 
)
inline
Parameters
maxColumnsLF is automatically inserted when the column pos is over maxColumsn
numValuesIf numValues is not greater than maxColumns, the initial LF is skipped. This feature is disabled if numValues = 0.

◆ append() [5/8]

void Listing::append ( int  value)

◆ append() [6/8]

void cnoid::Listing::append ( int  value,
int  maxColumns,
int  numValues = 0 
)
inline
Parameters
maxColumnsLF is automatically inserted when the column pos is over maxColumsn
numValuesIf numValues is not greater than maxColumns, the initial LF is skipped. This feature is disabled if numValues = 0.

◆ append() [7/8]

void cnoid::Listing::append ( size_t  value)

◆ append() [8/8]

void cnoid::Listing::append ( ValueNode node)
inline

◆ appendLF()

void Listing::appendLF ( )

◆ at()

ValueNode* cnoid::Listing::at ( int  i) const
inline

◆ back()

ValueNode* cnoid::Listing::back ( ) const
inline

◆ begin() [1/2]

iterator cnoid::Listing::begin ( )
inline

◆ begin() [2/2]

const_iterator cnoid::Listing::begin ( ) const
inline

◆ clear()

void Listing::clear ( )

◆ clone()

ValueNode * Listing::clone ( ) const
virtual

Reimplemented from cnoid::ValueNode.

◆ doubleFormat()

const char* cnoid::Listing::doubleFormat ( )
inline

◆ empty()

bool cnoid::Listing::empty ( ) const
inline

◆ end() [1/2]

iterator cnoid::Listing::end ( )
inline

◆ end() [2/2]

const_iterator cnoid::Listing::end ( ) const
inline

◆ floatingNumberFormat()

const char* cnoid::Listing::floatingNumberFormat ( )
inline

◆ front()

ValueNode* cnoid::Listing::front ( ) const
inline

◆ get()

ValueNode& cnoid::Listing::get ( int  i) const
inline

deprecated

◆ insert()

void Listing::insert ( int  index,
ValueNode node 
)

◆ isFlowStyle()

bool cnoid::Listing::isFlowStyle ( ) const
inline

◆ newMapping()

Mapping * Listing::newMapping ( )

◆ operator[]()

ValueNode& cnoid::Listing::operator[] ( int  i) const
inline

◆ reserve()

void Listing::reserve ( int  size)

◆ setDoubleFormat()

void cnoid::Listing::setDoubleFormat ( const char *  format)
inline

◆ setFloatingNumberFormat()

void Listing::setFloatingNumberFormat ( const char *  format)

◆ setFlowStyle()

void cnoid::Listing::setFlowStyle ( bool  isFlowStyle = true)
inline

◆ size()

int cnoid::Listing::size ( ) const
inline

◆ write() [1/2]

void Listing::write ( int  i,
const std::string &  value,
StringStyle  stringStyle = PLAIN_STRING 
)

◆ write() [2/2]

void Listing::write ( int  i,
int  value 
)

Friends And Related Function Documentation

◆ Mapping

friend class Mapping
friend

◆ YAMLReaderImpl

friend class YAMLReaderImpl
friend

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