GECKO 1.0
Human-computer interface based on hand gesture recognition
AppLauncher.h
00001 //------------------------------------------------------------------------------
00002 //-- AppLauncher
00003 //------------------------------------------------------------------------------
00004 //--
00005 //--  Launchs applications triggered by events generated by StateMachine (s)
00006 //--
00007 //------------------------------------------------------------------------------
00008 //--
00009 //-- This file belongs to the "Gecko - Gesture Recognition" project
00010 //-- (https://github.com/David-Estevez/gecko)
00011 //--
00012 //------------------------------------------------------------------------------
00013 //-- Authors: David Estevez Fernandez
00014 //--          Irene Sanz Nieto
00015 //--
00016 //-- Released under the GPL license (more info on LICENSE.txt file)
00017 //------------------------------------------------------------------------------
00018 
00027 #ifndef APPLAUNCHER_H
00028 #define APPLAUNCHER_H
00029 
00030 #include <cstdlib>
00031 #include <unistd.h>
00032 #include <iostream>
00033 #include <fstream>
00034 #include <string>
00035 #include <vector>
00036 
00037 #include "StateMachine.h"
00038 
00053 class AppLauncher
00054 {
00055     public:
00061         AppLauncher( std::string config_file, int positive_matches, int negative_matches);
00062 
00071         AppLauncher( std::string config_file, std::vector<int> positive_matches, std::vector<int> negative_matches);
00072 
00076         void update( int current_value);
00077 
00079         float getPercentageMatches(int i);
00080 
00082         bool getFound(int i);
00083 
00085         int getValueToTrackAt(int i);
00086 
00088         int getNumberOfCommands();
00089 
00090     private:
00095         void configFileParser( std::string config_file);
00096 
00097         std::vector<StateMachine> _state_machines;      
00098         std::vector<std::string> _commands_to_launch;   
00099         std::vector<int> _values_to_track;              
00100 
00101         std::vector<bool> _found;                       
00102 
00103 };
00104 
00105 #endif
 All Classes Functions Variables