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

OMF::PackageService Class Reference

#include <PackageService.hpp>

List of all members.


Detailed Description

The PackageService class is a global resource used to map common namespace URIs to the root package of a metamodel. Because the namespace URIs are often in "disagreement", we allow packages to register under multiple namespaces. Metamodel libraries are required to register their root packages in their init methods.

We also extend the package registration to include "short names" for packages too. For example the URI for the Meta-Object Facility is "http://www.omg.org/Mode/1.4", but we'd like to resolve queries for simply: "Model".


Public Member Functions

 ~PackageService ()
void registerPackage (const std::string &uri, Package *package)
PackagelookupPackage (const std::string &uri) const

Static Public Member Functions

PackageServiceinstance ()

Protected Member Functions

 PackageService ()


Constructor & Destructor Documentation

OMF::PackageService::PackageService  )  [protected]
 

OMF::PackageService::~PackageService  ) 
 


Member Function Documentation

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

Return the singleton instance of this class.

Package* OMF::PackageService::lookupPackage const std::string &  uri  )  const
 

Lookup a a package given a namespace URI. If no such URI is found, return 0.

void OMF::PackageService::registerPackage const std::string &  uri,
Package package
 

Register a package with to a namespace URI. The URI could be a long name or it could be a short name.


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