CERT::PluginController [Singleton]
static CERT::PluginController *getPluginController();
addPlugin( CERT::PluginBase * );
removePlugin( CERT::PluginBase * );
removePlugin( const std::string &pluginID );
std::vector< CERT::PluginBase *> pluginsForStep( PluginStep );

CERT::PluginBase
class mp_CERT;
typedef std::string PluginStep;
std::string name()
std::string id()
PluginStep step();

CERT::AfterFacePlugin: public CERT::PluginBase
void processImageUsingCert( RImage<float> &image, mp_CERT *cert );
bool areResultsValid();
double getResultsDouble();
//std::vector<double> getResultsVector();
//std::string getResultsString();

CERT::SmilePlugin : public CERT::AfterFacePlugin
	class mp_Smile;
mp_Smile *smileDetector;
double getResults();

mp_Smile
  void findSmilesFromFace (const RImage<float> &pixels, FaceObject &face, float window_shift);

mp_CERT_Public

mp_CERT
//ObjectWithFeatures &getLastFoundFaceObject()
FeatureDetector *getFeatureDetector()
//RImage<float> &getLastImage()

mp_PluginResults
//setResultsForPlugin( pluginID, results )
//results getResultsForPlugin( pluginID )
mp_PluginResults( pluginID?, double )
mp_PluginResults( pluginID?, array of double )
mp_PluginResults( pluginID?, hash(string,double) )
resultsType type(); // can be double, array, hash
results for each plugin can be:
none (e.g. a RUBIOS plugin wouldn't return any results)
double
array of double
hash (string, double)

Call chain

main
CERT::PluginController *pc = CERT::PluginController::getPluginController();
CERT::SmilePlugin  *smile = new CERT::SmilePlugin
mp_BlinkPublic *blink = new mp_BlinkPublic

pc->addPlugin( smile );
pc->addPlugin( blink );

cert->calcAUs()

mp_CERT
in calcAUs():
	// normal CERT AU processing
	CERT::PluginController *pc = CERT::PluginController::getPluginController();
	std::vector< CERT::PluginBase *> afterFacePlugins = pc->pluginsForStep( PluginStep::afterFaces );
for each entry in afterFacePlugins: plugin-> processImageUsingCert( this )
Can't call processImage... on a PluginBase * (this isn't Objective-C after all)

CERT::PluginBase
in processImageUsingCert():
ObjectWithFeatures &face = cert->getLastFoundFaceObject()
FeatureDetector *fd = cert->getFeatureDetector()
RImage<float> &img = cert->getLastImage()
Do all of the processing currently in SmileDetector2's processFace:fromFeatureDetector:withImage:, including calling mp_Smile's findSmilesFromFace

From an earlier attempt to design a plugin architecture:
For features we need:
    Plugin type?
    Name
    Path to weights file
    Path to prior file

For SVM weights we need:
    Plugin type?
    Name
    Path to weights directory

For 'After Face' plugins we need:
    Plugin type?
    Compile all needed code
    Yes/No flag