00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef OMF_MODELSERVICE_HPP
00026
#define OMF_MODELSERVICE_HPP
00027
00028
00029
#include <string>
00030
#include <list>
00031
#include <map>
00032
00033
namespace OMF
00034 {
00035
00036
class Model;
00037
00050 class ModelService
00051 {
00052
protected:
00053
ModelService();
00054
00055
public:
00056
~ModelService();
00057
00059
static ModelService &
instance();
00060
00065
Model *
findModel(
const std::string &name);
00066
00070
void addPath(
const std::string &path);
00071
00072
private:
00077
Model *getModel(
const std::string &name);
00078
00079
private:
00080
typedef std::list<std::string> SearchPath;
00081
typedef std::map<std::string, Model *> ModelMap;
00082
00083 SearchPath _search;
00084 ModelMap _models;
00085 };
00086 };
00087
00088
#endif
00089