Browse Source

Make `ofxPiMapper` own _application`

Additionally implement `ofxPiMapper::loadXmlSettings` method
master
Krisjanis Rijnieks 10 years ago
parent
commit
bd44c0cc75
  1. 14
      src/ofxPiMapper.cpp
  2. 2
      src/ofxPiMapper.h

14
src/ofxPiMapper.cpp

@ -1,17 +1,19 @@
#include "ofxPiMapper.h"
ofxPiMapper::ofxPiMapper(){
_application = new ofx::piMapper::Application();
}
ofxPiMapper::ofxPiMapper(){}
void ofxPiMapper::setup(){
_application->setup();
_application.setup();
}
void ofxPiMapper::draw(){
_application->draw();
_application.draw();
}
void ofxPiMapper::registerFboSource(ofx::piMapper::FboSource & fboSource){
_application->addFboSource(fboSource);
_application.addFboSource(fboSource);
}
bool ofxPiMapper::loadXmlSettings(string fileName){
return _application.loadXmlSettings(fileName);
}

2
src/ofxPiMapper.h

@ -29,5 +29,5 @@ class ofxPiMapper {
bool loadXmlSettings(string fileName);
private:
ofx::piMapper::Application * _application;
ofx::piMapper::Application _application;
};
Loading…
Cancel
Save