Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

DataManager Class Reference

Class for managing read access to multiple data archives. More...

#include <DataManager.h>

List of all members.

Public Methods

 DataManager ()
 Construct a new (empty) data manager.

virtual ~DataManager ()
 Destroy the data manager and all the archives it contains.

const LinkBase getObject (std::string const &path_str)
 Create a new object from a path identifier string.

const LinkBase getObject (Path const &path, std::string const &path_str="")
 Create a new object from a Path instance.

void addArchive (DataArchive *)
 Add a new data archive to the manager.

std::vector< ObjectIDgetChildren (ObjectID const &id) const
 Get all children of a given object id.

std::vector< ObjectIDgetChildren (std::string const &path) const
 Get all children of a given path.

bool hasObject (ObjectID const &id) const
 Check for the existance of an object in the archives.

bool hasObject (std::string const &path) const
 Check for the existance of an object in the archives.

std::string getPathString (ObjectID const &id) const
 Get the path string corresponding to a give object id.

void cleanStatic ()
 Remove unused static objects from the cache.

InterfaceProxygetObjectInterface (ObjectID const &id) const
 Return the interface proxy corresponding to the specified object in the archive.

InterfaceProxygetObjectInterface (std::string const &path) const
 Return the interface proxy corresponding to the specified object in the archive.

void closeAll ()
 Close all managed archives.


Friends

class DataArchive


Detailed Description

Class for managing read access to multiple data archives.

Author:
Mark Rose <mrose@stm.lbl.gov>


Constructor & Destructor Documentation

NAMESPACE_SIMDATA DataManager::DataManager  
 

Construct a new (empty) data manager.

DataManager::~DataManager   [virtual]
 

Destroy the data manager and all the archives it contains.


Member Function Documentation

void DataManager::addArchive DataArchive  
 

Add a new data archive to the manager.

All objects in the archive will subsequently be available from the manager. The manager "owns" the pointer and will delete it when the manager is destroyed.

void DataManager::cleanStatic  
 

Remove unused static objects from the cache.

Call this method after many objects have been deleted to free any unused cache entries.

void DataManager::closeAll  
 

Close all managed archives.

std::vector< ObjectID > DataManager::getChildren std::string const &    path const
 

Get all children of a given path.

For path "A:X.Y", returns all object id's "A:X.Y.*". The id's can be converted to human-readable form by getPathString().

Parameters:
path  the path to search for children
Returns:
a list of object id's immediately below the given path.

std::vector< ObjectID > DataManager::getChildren ObjectID const &    id const
 

Get all children of a given object id.

For id "A:X.Y", returns all object id's "A:X.Y.*". The id's can be converted to human-readable form by getPathString().

Parameters:
id  the object id to search for children
Returns:
a list of object id's immediately below the given path.

const LinkBase DataManager::getObject Path const &    path,
std::string const &    path_str = ""
 

Create a new object from a Path instance.

Parameters:
path  the Path instance.
path_str  the path identifier string (if available). This is only used for error logging.

const LinkBase DataManager::getObject std::string const &    path_str
 

Create a new object from a path identifier string.

Parameters:
path_str  the path identifier string.
Returns:
a smart-pointer to the new object.

InterfaceProxy * DataManager::getObjectInterface std::string const &    path const
 

Return the interface proxy corresponding to the specified object in the archive.

InterfaceProxy * DataManager::getObjectInterface ObjectID const &    id const
 

Return the interface proxy corresponding to the specified object in the archive.

std::string DataManager::getPathString ObjectID const &    id const
 

Get the path string corresponding to a give object id.

This provides a human-readable path string that is useful for error and debugging messages.

Returns:
the path string if found, otherwise an empty string.

bool DataManager::hasObject std::string const &    path const
 

Check for the existance of an object in the archives.

Returns:
true if the object id exists.

bool DataManager::hasObject ObjectID const &    id const
 

Check for the existance of an object in the archives.

Returns:
true if the object id exists.


Friends And Related Function Documentation

friend class DataArchive [friend]
 


The documentation for this class was generated from the following files:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:40 2003, using Doxygen 1.2.18.

[SF.net]