Skip to content
Snippets Groups Projects
Commit fe4549b0 authored by Marvin Häuser's avatar Marvin Häuser
Browse files

simulator: correctly implement TMLCommand

TMLNotifiedCommand, unlike many other child classes, does not implement
the virtual functions getNbOfChannels() and getChannel() of its parent
class TMLCommand. Implement them by exposing its sole channel.
parent ef5b4abe
No related branches found
No related tags found
1 merge request!477[WIP] simulation code generation fixes
...@@ -63,6 +63,8 @@ public: ...@@ -63,6 +63,8 @@ public:
virtual ~TMLNotifiedCommand(){} virtual ~TMLNotifiedCommand(){}
void execute(); void execute();
inline TMLChannel* getChannel() const {return dynamic_cast<TMLChannel*>(_channel);} inline TMLChannel* getChannel() const {return dynamic_cast<TMLChannel*>(_channel);}
inline unsigned int getNbOfChannels() const {return 1;}
inline TMLChannel* getChannel(unsigned int iIndex) const {return getChannel();}
std::string toString() const; std::string toString() const;
std::string toString(TMLLength aLength, TMLLength aProgress) const; std::string toString(TMLLength aLength, TMLLength aProgress) const;
std::string toShortString() const; std::string toShortString() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment