ImportDelegateManager Class Reference

This is a Singleton class that exists to register Data Import Factory classes. More...

Collaboration diagram for ImportDelegateManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~ImportDelegateManager ()
 public destructor
virtual IImportDelegate::Pointer createDataImportDelegate (const std::string &className)
 Creates a new DataImportDelegate based on a class name. Usually you should use the static method createNewImportDelegate() instead of this although there should not be a problem if you do use this method.
virtual void addImportDelegateFactory (AbstractImportDelegateFactory::Pointer factoryPtr)
 Registers a Specific DataImportFactory. Usually you would use the static method registerImportDelegateFactory instead of this method although it is perfectly legal to use this method.
virtual AbstractImportDelegateFactory::Pointer getImportDelegateFactory (const std::string &classname)
 Attempts to return the ImportDelegateFactory for a given class name.

Static Public Member Functions

static Pointer instance ()
 Use this method to get the instance of this class.
static void registerKnownImportDeletegateFactories ()
 This method ensures the ImportDelegateManager is instantiated and then registers built-in import delegates. To date these are: H5Tiff importer H5BMP Importer.
static void registerImportDelegateFactory (AbstractImportDelegateFactory::Pointer importer)
 This method ensures the ImportDelegateManager is instantiated and then registers the passed in ImportDelegate.
static IImportDelegate::Pointer createNewImportDelegate (const std::string &className)
 Creates a new ImportDelegate based on a class name.

Protected Member Functions

 ImportDelegateManager ()

Private Member Functions

 ImportDelegateManager (const ImportDelegateManager &)
void operator= (const ImportDelegateManager &)

Private Attributes

AbstractImportDelegateFactory::Collection _factories

Detailed Description

This is a Singleton class that exists to register Data Import Factory classes.

This is part of the Factory design pattern where Specific Data Importers are created from a factory class

Author:
Mike Jackson
Date:
Sept 2007
Version:
Revision
1.3


Constructor & Destructor Documentation

ImportDelegateManager::~ImportDelegateManager (  )  [virtual]

public destructor

ImportDelegateManager::ImportDelegateManager (  )  [protected]

ImportDelegateManager::ImportDelegateManager ( const ImportDelegateManager  )  [private]


Member Function Documentation

ImportDelegateManager::Pointer ImportDelegateManager::instance (  )  [static]

Use this method to get the instance of this class.

Returns:
Boost Shared pointer to the singleton instance

void ImportDelegateManager::registerKnownImportDeletegateFactories (  )  [static]

This method ensures the ImportDelegateManager is instantiated and then registers built-in import delegates. To date these are: H5Tiff importer H5BMP Importer.

void ImportDelegateManager::registerImportDelegateFactory ( AbstractImportDelegateFactory::Pointer  importer  )  [static]

This method ensures the ImportDelegateManager is instantiated and then registers the passed in ImportDelegate.

Parameters:
importer A Valid AbstractImportDelegateFactory::Pointer subclass

IImportDelegate::Pointer ImportDelegateManager::createNewImportDelegate ( const std::string &  className  )  [static]

Creates a new ImportDelegate based on a class name.

Parameters:
className The name of the class to create
Returns:
Returns an instance of IImportDelegate::Pointer. This method can return a null ImportDelegate so check the return value with the boost::shared_ptr.get() method to check the value of the wrapped pointer.

IImportDelegate::Pointer ImportDelegateManager::createDataImportDelegate ( const std::string &  className  )  [virtual]

Creates a new DataImportDelegate based on a class name. Usually you should use the static method createNewImportDelegate() instead of this although there should not be a problem if you do use this method.

Parameters:
className The name of the class to create
Returns:
Returns an instance of IImportDelegate::Pointer. This method can return a null ImportDelegate so check the return value with the boost::shared_ptr.get() method to check the value of the wrapped pointer.

void ImportDelegateManager::addImportDelegateFactory ( AbstractImportDelegateFactory::Pointer  factoryPtr  )  [virtual]

Registers a Specific DataImportFactory. Usually you would use the static method registerImportDelegateFactory instead of this method although it is perfectly legal to use this method.

Parameters:
factoryPtr The ImportDelegateFactory to register

AbstractImportDelegateFactory::Pointer ImportDelegateManager::getImportDelegateFactory ( const std::string &  classname  )  [virtual]

Attempts to return the ImportDelegateFactory for a given class name.

Parameters:
classname The name of the class to find the factory for.

void ImportDelegateManager::operator= ( const ImportDelegateManager  )  [private]


Member Data Documentation

AbstractImportDelegateFactory::Collection ImportDelegateManager::_factories [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 17 18:43:14 2009 for MXADataModel by  doxygen 1.5.2