5 changed files with 86 additions and 4 deletions
@ -0,0 +1,9 @@ |
|||||
|
// Command base class for separating ofxPiMapper available commands from the core.
|
||||
|
// Created by Krisjanis Rijnieks 2015-03-23
|
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
class Command{ |
||||
|
public: |
||||
|
virtual void execute() = 0; |
||||
|
}; |
@ -0,0 +1,10 @@ |
|||||
|
# include "TestCommand.h" |
||||
|
|
||||
|
TestCommand::TestCommand(ofxPiMapper * a){ |
||||
|
_application = a; |
||||
|
} |
||||
|
|
||||
|
void TestCommand::execute(){ |
||||
|
string name = "Hugo"; |
||||
|
_application->testCommand(name); |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
// TestCommand class, extends Command base class. Used for Command design pattern implementation
|
||||
|
// pre-tests. Will be removed as soon as possible.
|
||||
|
// Created by Krisjanis Rijnieks 2015-03-23
|
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include "ofxPiMapper.h" |
||||
|
#include "Command.h" |
||||
|
|
||||
|
class ofxPiMapper; |
||||
|
|
||||
|
class TestCommand : public Command{ |
||||
|
public: |
||||
|
TestCommand(ofxPiMapper * a); |
||||
|
~TestCommand(); |
||||
|
virtual void execute(); |
||||
|
|
||||
|
private: |
||||
|
ofxPiMapper * _application; |
||||
|
|
||||
|
}; |
Loading…
Reference in new issue