Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

OMF::ModelService Class Reference

#include <ModelService.hpp>

List of all members.


Detailed Description

The ModelService class is responsible for locating model files and basically implementing a search path for their opening. The ModelService uses two well known paths for locating models, namely a global config directory (e.g., /usr/share/OMF) and a user directory (~/.OMF). Also, the user can configure an environment variable (OMF_MODEL_PATH) to add paths to the model search path. This service returns fully parsed and read models. If the model has already been loaded, a reference to the existing model (given by its name, not full path) will be returned.


Public Member Functions

 ~ModelService ()
ModelfindModel (const std::string &name)
void addPath (const std::string &path)

Static Public Member Functions

ModelServiceinstance ()

Protected Member Functions

 ModelService ()


Constructor & Destructor Documentation

OMF::ModelService::ModelService  )  [protected]
 

OMF::ModelService::~ModelService  ) 
 


Member Function Documentation

void OMF::ModelService::addPath const std::string &  path  ) 
 

Add a path to the search path.

Model* OMF::ModelService::findModel const std::string &  name  ) 
 

Request a model. Null is returned if the model can't be found or parsed.

ModelService& OMF::ModelService::instance  )  [static]
 

Return the singleton instance of the model service.


The documentation for this class was generated from the following file:
Generated on Fri Sep 10 13:07:38 2004 for OpenModelingFramework by doxygen 1.3.8