Choreonoid
1.8
|
#include <MprProgram.h>
Public Types | |
typedef std::deque< ref_ptr< MprStatement > > | StatementContainer |
typedef StatementContainer::iterator | iterator |
typedef StatementContainer::const_iterator | const_iterator |
Public Member Functions | |
MprProgram () | |
~MprProgram () | |
MprProgram * | clone () const |
MprProgram * | clone (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 |
MprPositionList * | positionList () |
const MprPositionList * | positionList () 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 |
MprStructuredStatement * | holderStatement () const |
bool | isTopLevelProgram () const |
bool | isSubProgram () const |
MprProgram * | topLevelProgram () 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 Referenced * | doClone (CloneMap *cloneMap) const override |
Protected Member Functions inherited from cnoid::Referenced | |
Referenced () | |
Referenced (const Referenced &) | |
int | refCount () const |
Friends | |
class | MprStructuredStatement |
typedef StatementContainer::const_iterator cnoid::MprProgram::const_iterator |
typedef StatementContainer::iterator cnoid::MprProgram::iterator |
typedef std::deque<ref_ptr<MprStatement> > cnoid::MprProgram::StatementContainer |
MprProgram::MprProgram | ( | ) |
MprProgram::~MprProgram | ( | ) |
|
protected |
MprProgram::iterator MprProgram::append | ( | MprStatement * | statement, |
bool | doNotify = true |
||
) |
|
inline |
|
inline |
void MprProgram::clearStatements | ( | ) |
|
inline |
|
inline |
|
overrideprotectedvirtual |
Implements cnoid::ClonableReferenced.
|
inline |
|
inline |
|
inline |
MprProgram::iterator MprProgram::find | ( | MprStatement * | statement | ) |
MprProgram::const_iterator MprProgram::find | ( | MprStatement * | statement | ) | const |
|
inline |
MprStructuredStatement * MprProgram::holderStatement | ( | ) | const |
MprProgram::iterator MprProgram::insert | ( | iterator | pos, |
MprStatement * | statement, | ||
bool | doNotify = true |
||
) |
|
inline |
bool MprProgram::isSubProgram | ( | ) | const |
bool MprProgram::isTopLevelProgram | ( | ) | const |
bool MprProgram::load | ( | const std::string & | filename, |
std::ostream & | os | ||
) |
const std::string & MprProgram::name | ( | ) | const |
void MprProgram::notifyStatementUpdate | ( | MprStatement * | statement | ) | const |
|
inline |
const MprPositionList * MprProgram::positionList | ( | ) |
const MprPositionList* cnoid::MprProgram::positionList | ( | ) | const |
bool MprProgram::read | ( | const Mapping & | archive | ) |
MprProgram::iterator MprProgram::remove | ( | iterator | pos, |
bool | doNotify = true |
||
) |
bool MprProgram::remove | ( | MprStatement * | statement, |
bool | doNotify = true |
||
) |
void MprProgram::removeUnreferencedPositions | ( | ) |
void MprProgram::renumberPositionIds | ( | ) |
bool MprProgram::save | ( | const std::string & | filename | ) |
|
inline |
void MprProgram::setLocalPositionListEnabled | ( | bool | on | ) |
void MprProgram::setName | ( | const std::string & | name | ) |
SignalProxy< void(MprProgram::iterator iter)> MprProgram::sigStatementInserted | ( | ) |
SignalProxy< void(MprStatement *statement, MprProgram *program)> MprProgram::sigStatementRemoved | ( | ) |
SignalProxy< void(MprStatement *statement)> MprProgram::sigStatementUpdated | ( | ) |
MprProgram * MprProgram::topLevelProgram | ( | ) | const |
bool MprProgram::traverseStatements | ( | std::function< bool(MprStatement *statement)> | callback | ) |
Stop the traverse when false is returned from the callback function.
void MprProgram::traverseStatements | ( | std::function< void(MprStatement *statement)> | callback | ) |
bool MprProgram::write | ( | Mapping & | archive | ) | const |
|
friend |