omegalib  13.1
omicron::DataManager Class Reference

#include <DataManager.h>

Public Member Functions

void cleanup ()
 
void setCurrentPath (const String &path)
 
String getCurrentPath ()
 
void addSource (DataSource *source)
 Data sources. More...
 
void removeSource (DataSource *source)
 
void removeAllSources ()
 Removes all currently registered data sources. More...
 
String getDataSourceNames ()
 
DataInfo getInfo (const String &path)
 Data streams. More...
 
DataStreamcreateStream (const String &path)
 
DataStreamopenStream (const String &path, DataStream::Mode mode)
 
void deleteStream (DataStream *stream)
 

Static Public Member Functions

static DataManagergetInstance ()
 
static bool findFile (const String &name, String &outPath)
 Utility method for finding a file in one of the data sources. More...
 
static String readTextFile (const String &name)
 Utility method for reading a text file. More...
 
static bool createPath (const String &path)
 Utility method for creating a path. More...
 

Member Function Documentation

void omicron::DataManager::addSource ( DataSource source)

Data sources.

void omicron::DataManager::cleanup ( )
static bool omicron::DataManager::createPath ( const String path)
static

Utility method for creating a path.

This method makes sure every directory name in the specified path exists. Every entry in the path is considered a directory name, so if the path points to a file name, remove the file name before calling this method.

Returns
true if the path has been created successfully.
DataStream* omicron::DataManager::createStream ( const String path)
void omicron::DataManager::deleteStream ( DataStream stream)
static bool omicron::DataManager::findFile ( const String name,
String outPath 
)
static

Utility method for finding a file in one of the data sources.

String omicron::DataManager::getCurrentPath ( )
String omicron::DataManager::getDataSourceNames ( )
DataInfo omicron::DataManager::getInfo ( const String path)

Data streams.

static DataManager* omicron::DataManager::getInstance ( )
static
DataStream* omicron::DataManager::openStream ( const String path,
DataStream::Mode  mode 
)
static String omicron::DataManager::readTextFile ( const String name)
static

Utility method for reading a text file.

void omicron::DataManager::removeAllSources ( )

Removes all currently registered data sources.

void omicron::DataManager::removeSource ( DataSource source)
void omicron::DataManager::setCurrentPath ( const String path)

The documentation for this class was generated from the following file: