00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_MARSYSTEMMANAGER_H
00020 #define MARSYAS_MARSYSTEMMANAGER_H
00021
00022 #include <string>
00023 #include <map>
00024 #include <vector>
00025
00026 #include "MarSystem.h"
00027
00028 namespace Marsyas
00029 {
00030 class MarSystem;
00031
00037 class marsyas_EXPORT MarSystemManager
00038 {
00039 protected:
00040 std::map<std::string, MarSystem*> registry_;
00041 std::map<std::string, MarSystem*> workingSet_;
00042 std::map<std::string, int > compositesMap_;
00043
00044 enum compositePrototypes_
00045 {
00046 STUB,
00047 MULTIPITCH,
00048 DEVIBOT,
00049 STEREO2MONO,
00050 TEXTURESTATS,
00051 LPCNET,
00052 POWERSPECTRUMNET,
00053 POWERSPECTRUMNET1,
00054 STFT_FEATURES,
00055 TIMBREFEATURES,
00056 STEREOPANNINGSPECTRUMFEATURES,
00057 STEREOFEATURES,
00058 PHASEVOCODER,
00059 PHASEVOCODEROSCBANK,
00060 PITCHSACF,
00061 PITCHPRAAT,
00062 PEAKANALYSE,
00063 WHASPNET,
00064 STEREOFEATURES2,
00065 CLASSIFIER,
00066 PIPE_BLOCK,
00067 AFB_BLOCK_A,
00068 AFB_BLOCK_B,
00069 AFB_BLOCK_C,
00070 DECIMATING_QMF
00071 };
00072
00073 void registerComposite(std::string);
00074
00075 public:
00076 MarSystemManager();
00077 ~MarSystemManager();
00078 void registerPrototype(std::string type, MarSystem *);
00079 MarSystem* getPrototype(std::string type);
00080 MarSystem* create(std::string type, std::string name);
00081 MarSystem* create(std::string fullname);
00082 MarSystem* getMarSystem(std::istream& is, MarSystem *parent=NULL);
00083 MarSystem* loadFromFile(std::string fname);
00084 std::map<std::string, MarSystem*> getWorkingSet(std::istream& is);
00085
00086 bool isRegistered (std::string name);
00087
00088 std::vector <std::string> registeredPrototypes();
00089 };
00090
00091 }
00092
00093 #endif