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

#include <MprProgram.h>

Inheritance diagram for cnoid::MprProgram:
cnoid::ClonableReferenced cnoid::Referenced

Public Types

typedef std::deque< ref_ptr< MprStatement > > StatementContainer
 
typedef StatementContainer::iterator iterator
 
typedef StatementContainer::const_iterator const_iterator
 

Public Member Functions

 MprProgram ()
 
 ~MprProgram ()
 
MprProgramclone () const
 
MprProgramclone (CloneMap &cloneMap) const
 
const std::string & name () const
 
void setName (const std::string &name)
 
bool empty () const
 
int numStatements () const
 
iterator insert (iterator pos, MprStatement *statement, bool doNotify=true)
 
iterator append (MprStatement *statement, bool doNotify=true)
 
iterator remove (iterator pos, bool doNotify=true)
 
bool remove (MprStatement *statement, bool doNotify=true)
 
iterator find (MprStatement *statement)
 
const_iterator find (MprStatement *statement) const
 
void clearStatements ()
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void setLocalPositionListEnabled (bool on)
 
bool hasLocalPositionList () const
 
MprPositionListpositionList ()
 
const MprPositionListpositionList () const
 
void removeUnreferencedPositions ()
 
SignalProxy< void(MprProgram::iterator iter)> sigStatementInserted ()
 
SignalProxy< void(MprStatement *statement, MprProgram *program)> sigStatementRemoved ()
 
SignalProxy< void(MprStatement *statement)> sigStatementUpdated ()
 
void notifyStatementUpdate (MprStatement *statement) const
 
MprStructuredStatementholderStatement () const
 
bool isTopLevelProgram () const
 
bool isSubProgram () const
 
MprProgramtopLevelProgram () const
 
void traverseStatements (std::function< void(MprStatement *statement)> callback)
 
bool traverseStatements (std::function< bool(MprStatement *statement)> callback)
 
void renumberPositionIds ()
 
bool isEditingEnabled () const
 
void setEditingEnabled (bool on)
 
bool load (const std::string &filename, std::ostream &os)
 
bool save (const std::string &filename)
 
bool read (const Mapping &archive)
 
bool write (Mapping &archive) const
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Protected Member Functions

 MprProgram (const MprProgram &org, CloneMap *cloneMap=nullptr)
 
virtual ReferenceddoClone (CloneMap *cloneMap) const override
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Friends

class MprStructuredStatement
 

Member Typedef Documentation

◆ const_iterator

typedef StatementContainer::const_iterator cnoid::MprProgram::const_iterator

◆ iterator

typedef StatementContainer::iterator cnoid::MprProgram::iterator

◆ StatementContainer

Constructor & Destructor Documentation

◆ MprProgram() [1/2]

MprProgram::MprProgram ( )

◆ ~MprProgram()

MprProgram::~MprProgram ( )

◆ MprProgram() [2/2]

MprProgram::MprProgram ( const MprProgram org,
CloneMap cloneMap = nullptr 
)
protected

Member Function Documentation

◆ append()

MprProgram::iterator MprProgram::append ( MprStatement statement,
bool  doNotify = true 
)

◆ begin() [1/2]

iterator cnoid::MprProgram::begin ( )
inline

◆ begin() [2/2]

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

◆ clearStatements()

void MprProgram::clearStatements ( )

◆ clone() [1/2]

MprProgram* cnoid::MprProgram::clone ( ) const
inline

◆ clone() [2/2]

MprProgram* cnoid::MprProgram::clone ( CloneMap cloneMap) const
inline

◆ doClone()

Referenced * MprProgram::doClone ( CloneMap cloneMap) const
overrideprotectedvirtual

◆ empty()

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

◆ end() [1/2]

iterator cnoid::MprProgram::end ( )
inline

◆ end() [2/2]

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

◆ find() [1/2]

MprProgram::iterator MprProgram::find ( MprStatement statement)

◆ find() [2/2]

MprProgram::const_iterator MprProgram::find ( MprStatement statement) const

◆ hasLocalPositionList()

bool cnoid::MprProgram::hasLocalPositionList ( ) const
inline

◆ holderStatement()

MprStructuredStatement * MprProgram::holderStatement ( ) const

◆ insert()

MprProgram::iterator MprProgram::insert ( iterator  pos,
MprStatement statement,
bool  doNotify = true 
)

◆ isEditingEnabled()

bool cnoid::MprProgram::isEditingEnabled ( ) const
inline

◆ isSubProgram()

bool MprProgram::isSubProgram ( ) const

◆ isTopLevelProgram()

bool MprProgram::isTopLevelProgram ( ) const

◆ load()

bool MprProgram::load ( const std::string &  filename,
std::ostream &  os 
)

◆ name()

const std::string & MprProgram::name ( ) const

◆ notifyStatementUpdate()

void MprProgram::notifyStatementUpdate ( MprStatement statement) const

◆ numStatements()

int cnoid::MprProgram::numStatements ( ) const
inline

◆ positionList() [1/2]

const MprPositionList * MprProgram::positionList ( )

◆ positionList() [2/2]

const MprPositionList* cnoid::MprProgram::positionList ( ) const

◆ read()

bool MprProgram::read ( const Mapping archive)

◆ remove() [1/2]

MprProgram::iterator MprProgram::remove ( iterator  pos,
bool  doNotify = true 
)

◆ remove() [2/2]

bool MprProgram::remove ( MprStatement statement,
bool  doNotify = true 
)

◆ removeUnreferencedPositions()

void MprProgram::removeUnreferencedPositions ( )

◆ renumberPositionIds()

void MprProgram::renumberPositionIds ( )

◆ save()

bool MprProgram::save ( const std::string &  filename)

◆ setEditingEnabled()

void cnoid::MprProgram::setEditingEnabled ( bool  on)
inline

◆ setLocalPositionListEnabled()

void MprProgram::setLocalPositionListEnabled ( bool  on)

◆ setName()

void MprProgram::setName ( const std::string &  name)

◆ sigStatementInserted()

SignalProxy< void(MprProgram::iterator iter)> MprProgram::sigStatementInserted ( )

◆ sigStatementRemoved()

SignalProxy< void(MprStatement *statement, MprProgram *program)> MprProgram::sigStatementRemoved ( )

◆ sigStatementUpdated()

SignalProxy< void(MprStatement *statement)> MprProgram::sigStatementUpdated ( )

◆ topLevelProgram()

MprProgram * MprProgram::topLevelProgram ( ) const

◆ traverseStatements() [1/2]

bool MprProgram::traverseStatements ( std::function< bool(MprStatement *statement)>  callback)

Stop the traverse when false is returned from the callback function.

Returns
true if all the statements are traversed.

◆ traverseStatements() [2/2]

void MprProgram::traverseStatements ( std::function< void(MprStatement *statement)>  callback)

◆ write()

bool MprProgram::write ( Mapping archive) const

Friends And Related Function Documentation

◆ MprStructuredStatement

friend class MprStructuredStatement
friend

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