Choreonoid  1.8
MprStructuredStatement.h
Go to the documentation of this file.
1 #ifndef CNOID_MANIPULATOR_PLUGIN_MPR_STRUCTURED_STATEMENT_H
2 #define CNOID_MANIPULATOR_PLUGIN_MPR_STRUCTURED_STATEMENT_H
3 
4 #include "MprStatement.h"
5 #include "MprProgram.h"
6 #include "exportdecl.h"
7 
8 namespace cnoid {
9 
10 class CNOID_EXPORT MprStructuredStatement : public MprStatement
11 {
12 public:
13  MprProgram* lowerLevelProgram() { return program_; }
14  const MprProgram* lowerLevelProgram() const { return program_; }
15 
16  enum Attribute {
17  ArbitraryLowerLevelProgram = 1
18  };
19  void setStructuredStatementAttribute(int attr) { attributes_ |= attr; }
20  bool hasStructuredStatementAttribute(int attr) const { return attributes_ & attr; }
21 
22  virtual MprProgram* getLowerLevelProgram() override;
23  virtual bool isExpandedByDefault() const;
24  virtual bool read(MprProgram* program, const Mapping& archive) override;
25  virtual bool write(Mapping& archive) const override;
26 
27 protected:
31 
32  private:
33  ref_ptr<MprProgram> program_;
34  int attributes_;
35 };
36 
38 
39 }
40 
41 #endif
cnoid::Mapping
Definition: ValueTree.h:253
cnoid::MprStructuredStatement
Definition: MprStructuredStatement.h:10
cnoid::write
Listing * write(Mapping *mapping, const std::string &key, const Eigen::MatrixBase< Derived > &x)
Definition: EigenArchive.h:145
cnoid::MprStructuredStatement::lowerLevelProgram
MprProgram * lowerLevelProgram()
Definition: MprStructuredStatement.h:13
cnoid::MprStructuredStatement::hasStructuredStatementAttribute
bool hasStructuredStatementAttribute(int attr) const
Definition: MprStructuredStatement.h:20
cnoid::read
bool read(const Mapping *mapping, const std::string &key, Eigen::MatrixBase< Derived > &x)
Definition: EigenArchive.h:43
cnoid::ref_ptr< MprProgram >
cnoid::MprStructuredStatement::setStructuredStatementAttribute
void setStructuredStatementAttribute(int attr)
Definition: MprStructuredStatement.h:19
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::CloneMap
Definition: CloneMap.h:13
cnoid::MprStatement
Definition: MprStatement.h:16
cnoid::MprStructuredStatement::Attribute
Attribute
Definition: MprStructuredStatement.h:16
cnoid::MprStructuredStatement::lowerLevelProgram
const MprProgram * lowerLevelProgram() const
Definition: MprStructuredStatement.h:14
cnoid::MprProgram
Definition: MprProgram.h:21
cnoid::MprStructuredStatementPtr
ref_ptr< MprStructuredStatement > MprStructuredStatementPtr
Definition: MprStructuredStatement.h:37
MprStatement.h
MprProgram.h