BDataManager Class Reference

#include <BDataManager.h>

Inheritance diagram for BDataManager:

Inheritance graph
[legend]

List of all members.


Detailed Description

Represents a single data source or sink.

The BDataManager is the abstract base class for all data reader and writer objects.

Public Member Functions

virtual bool CanQueryInfo (const BString &queryCmd)
 Determines whether this BDataManager will respond to the specified query.
virtual void Close (void)
 Closes the data source/sink and free resources.
bool DatasetIsDirectory (void)
 Indicates whether the dataset used with the Open method is a directory.
bool DatasetIsFile (void)
 Indicates whether the dataset used for the Open method is a file.
const BParamListGetCreateParamList (void) const
 Gets the BParamList that was provided when this BDataManager was created.
virtual BString GetDiskCacheBaseName (void) const
 Gets the base file name for the disk cache.
virtual Int32 GetDiskCachePageSize (void) const
 Gets the page size for the disk cache.
BLayersGetLayers (void)
 Gets the BLayers.
const BLayersGetLayers (void) const
 Gets the BLayers.
virtual const BRectGetMBR (void) const
 Gets the aggregate MBR for the BLayers contained in this BDataManager.
const BParamListGetOpenParamList (void) const
 Gets the BParamList that was provided when this BDataManager was opened.
BDataManagerProxyGetProxy (void) const
 Gets the proxy object used to create and destroy BDataManager-derived objects.
EStatus GetStatus (void) const
 Gets the current status of this BDataManager.
const BStringGetType (void) const
 Gets the type of the underlying data source/sink.
bool HasCapabilities (UInt32 caps) const
 Indicates whether or not the current BDataManager object supports the specified capabilities.
virtual bool IsOpen (void) const =0
 Indicates whether or not this BDataManager has been opened.
virtual void Open (const BString &dsName, const BParamList &parms)=0
 Opens the data source or sink.
virtual BParamList QueryInfo (const BString &queryCmd, const BVariant &queryParm)
 Queries this BDataManager for format-specific information.
void SetProgressReporter (const BProgressReporter *ppr)
 Sets the progress reporter object that indicates the progrees of the read or write operation.
void SetProxy (BDataManagerProxy *p)
 Sets the proxy object used to create and destroy BDataManager-derived objects.
virtual bool UsingDiskCache (void) const
 Indicates whether or not this BDataManager uses a disk cache.
virtual ~BDataManager ()
 Destructor.

Static Public Member Functions

static void ClearFormatLibPath (void)
 Clears the resources related to format reader and writer dynamic libaries.
static void DestroyObject (BDataManager *pObj)
 Deletes a BDataManager instance.
static BString DetermineFileType (const BString &fileName)
 Determines the data type (MapInfo TAB file, Esri shapefile, etc.
static BString GetAuxDataPath ()
 Gets the path where auxillary data files required by GeoCore are stored.
static
buildInfoPairVector 
GetBuildInfo (void)
 Gets a list of build info for the format reader/writer libraries.
static BString GetFormatLibPath (void)
 Gets the path where format reader and writer dynamic libraries are located.
static BDynamicLibsGetFormatLibs (void)
 Gets the collection of available dynamic format libraries.
static void SetAuxDataPath (const BString &path)
 Set the path where auxillary data files required by GeoCore are stored.
static void SetFormatLibPath (const BString &path)
 Sets the path where format reader and writer dynamic libraries are located.

Protected Member Functions

 BDataManager (const BString &type, const BParamList &parms)
 Constructor.
 BDataManager ()
 Default constructor.
const BProgressReporterGetProgressReporter (void)
 Gets the current progress reporter object.
void SetStatus (EStatus s)
 Sets the current status.

Protected Attributes

UInt32 m_capabilities
 Defines the capabilities supported by this data manager class.
BParamList m_createParms
 The parameters used when creating this object.
bool m_dsIsDirectory
 Indicates whether the input/output dataset is a directory.
bool m_dsIsFile
 Indicates whether the input/output dataset is a file name.
BLayers m_layers
 The collection of layers.
BParamList m_openParms
 The parameters used to open the source/sink.
BDataManagerProxym_pProxy
 The proxy object used to create and destroy BDataManager-derived objects.
const BProgressReporterm_progress
 An object that allows for progress reporting during read and write operations.
EStatus m_status
 Status of most recent operation (read, write, etc.
BString m_type
 The type of data source/sink contained in this object.

Static Protected Attributes

static BString m_auxDataPath
 Full path to auxillary data files.
static BDynamicLibs m_dataFormatLibs
 The collection of dynamic libraries that read and write the various data formats.

Friends

class BDirectTransformer


Constructor & Destructor Documentation

virtual ~BDataManager (  )  [virtual]

Destructor.

BDataManager (  )  [inline, protected]

Default constructor.

BDataManager ( const BString type,
const BParamList parms 
) [inline, protected]

Constructor.

Parameters:
type The type of BDataManager being constructed. The possible values for this are defined as BString constants in DSType.h.
parms A set of parameters that describe the BDataManager that shall be constructed.


Member Function Documentation

virtual bool CanQueryInfo ( const BString queryCmd  )  [inline, virtual]

Determines whether this BDataManager will respond to the specified query.

Parameters:
queryCmd The query command.
Returns:
True if this BDataManager will respond to the query and false otherwise.

static void ClearFormatLibPath ( void   )  [inline, static]

Clears the resources related to format reader and writer dynamic libaries.

Call this method when you are cleaning up your program's resources before exiting.

virtual void Close ( void   )  [virtual]

Closes the data source/sink and free resources.

Derived classes should call Close method in the base class implementation.

Reimplemented in BDataReader, BDataWriter, and BVectorDataWriter.

bool DatasetIsDirectory ( void   )  [inline]

Indicates whether the dataset used with the Open method is a directory.

Returns:
True if the dataset is a directory and false otherwise.

bool DatasetIsFile ( void   )  [inline]

Indicates whether the dataset used for the Open method is a file.

Returns:
True if the dataset is a file and false otherwise.

static void DestroyObject ( BDataManager pObj  )  [static]

Deletes a BDataManager instance.

Parameters:
pObj The BDataManager to delete.

static BString DetermineFileType ( const BString fileName  )  [static]

Determines the data type (MapInfo TAB file, Esri shapefile, etc.

) for the specified file name.

Parameters:
fileName The file to be processed.
Returns:
The file type. This value will correspond to one of the BString constants defined in DSType.h.

static BString GetAuxDataPath (  )  [static]

Gets the path where auxillary data files required by GeoCore are stored.

Returns:
The full path to the auxillary data files.

static buildInfoPairVector GetBuildInfo ( void   )  [inline, static]

Gets a list of build info for the format reader/writer libraries.

Returns:
A set of pairs of format libraries and build info.

const BParamList& GetCreateParamList ( void   )  const [inline]

Gets the BParamList that was provided when this BDataManager was created.

Returns:
The create parameters.

virtual BString GetDiskCacheBaseName ( void   )  const [virtual]

Gets the base file name for the disk cache.

Returns:
The base file name for the disk cache.

virtual Int32 GetDiskCachePageSize ( void   )  const [virtual]

Gets the page size for the disk cache.

Returns:
The page size specified for the disk cache.

static BString GetFormatLibPath ( void   )  [inline, static]

Gets the path where format reader and writer dynamic libraries are located.

Returns:
The full path to the folder containing the reader and writer dynamic libraries.

static BDynamicLibs& GetFormatLibs ( void   )  [inline, static]

Gets the collection of available dynamic format libraries.

Returns:
The collection of dynamic format libraries.

BLayers& GetLayers ( void   )  [inline]

Gets the BLayers.

If this is a data reader, then these are the layers that were read from the data source. If this is a data writer, then these are the layers that will be written to the data sink.

Returns:
The BLayers managed by this BDataManager.

const BLayers& GetLayers ( void   )  const [inline]

Gets the BLayers.

If this is a data reader, then these are the layers that were read from the data source. If this is a data writer, then these are the layers that will be written to the data sink.

Returns:
The BLayers managed by this BDataManager.

virtual const BRect& GetMBR ( void   )  const [inline, virtual]

Gets the aggregate MBR for the BLayers contained in this BDataManager.

Returns:
The MBR for the BLayers contained in this BDataManager.

const BParamList& GetOpenParamList ( void   )  const [inline]

Gets the BParamList that was provided when this BDataManager was opened.

Returns:
The open parameters.

const BProgressReporter* GetProgressReporter ( void   )  [inline, protected]

Gets the current progress reporter object.

Returns:
Pointer to the progress reporter object.

BDataManagerProxy* GetProxy ( void   )  const [inline]

Gets the proxy object used to create and destroy BDataManager-derived objects.

Returns:
The proxy object

EStatus GetStatus ( void   )  const [inline]

Gets the current status of this BDataManager.

Returns:
The current status value.

const BString& GetType ( void   )  const [inline]

Gets the type of the underlying data source/sink.

Returns:
The data source/sink type. This value will correspond to one of the BString constants defined in DSType.h.

bool HasCapabilities ( UInt32  caps  )  const [inline]

Indicates whether or not the current BDataManager object supports the specified capabilities.

Possible values are listed in the CapabilityTypes.h header file. Values can be combined using bitwise OR operation.

Parameters:
caps One or more capabilities.
Returns:
True if the specified capabilities are supported and false otherwise.

virtual bool IsOpen ( void   )  const [pure virtual]

Indicates whether or not this BDataManager has been opened.

Returns:
True if this BDataManager has been opened and false otherwise.

virtual void Open ( const BString dsName,
const BParamList parms 
) [pure virtual]

Opens the data source or sink.

Parameters:
dsName The name of the data source/sink. For a file-based data source/sink, this would be the file name.
parms Type-specific parameters used when opening the data source/sink.

Implemented in BDataReader, BDataWriter, and BVectorDataWriter.

virtual BParamList QueryInfo ( const BString queryCmd,
const BVariant queryParm 
) [virtual]

Queries this BDataManager for format-specific information.

Not all queries are supported by all formats. If a query is not supported by a format, it will throw a BUnsupportedCapabilityException.

Parameters:
queryCmd The query command.
queryParm Additional parameter data required by the command.
Returns:
The response to the query, in a format-specific list of key/value pairs.
Exceptions:
BUnsupportedCapabilityException This exception will be thrown if the query is not supported by the format.

static void SetAuxDataPath ( const BString path  )  [static]

Set the path where auxillary data files required by GeoCore are stored.

Parameters:
path The full path to the auxillary data files.

static void SetFormatLibPath ( const BString path  )  [static]

Sets the path where format reader and writer dynamic libraries are located.

Parameters:
path The full path to the folder containing the reader and writer dynamic libraries.

void SetProgressReporter ( const BProgressReporter ppr  )  [inline]

Sets the progress reporter object that indicates the progrees of the read or write operation.

Parameters:
ppr Pointer to the progress reporter object. The caller is responsible for managing this object.

void SetProxy ( BDataManagerProxy p  )  [inline]

Sets the proxy object used to create and destroy BDataManager-derived objects.

Parameters:
p The proxy object.

void SetStatus ( EStatus  s  )  [inline, protected]

Sets the current status.

Parameters:
s The new status value.

virtual bool UsingDiskCache ( void   )  const [virtual]

Indicates whether or not this BDataManager uses a disk cache.

Returns:
True if this BDataManager uses a disk cache and false otherwise.


Friends And Related Function Documentation

friend class BDirectTransformer [friend]


Member Data Documentation

BString m_auxDataPath [static, protected]

Full path to auxillary data files.

UInt32 m_capabilities [protected]

Defines the capabilities supported by this data manager class.

Possible values are listed in the CapabilityTypes.h header file. Values can be combined using bitwise OR operation. In order to use this, derived classes should initialize this value in their constructors.

BParamList m_createParms [protected]

The parameters used when creating this object.

BDynamicLibs m_dataFormatLibs [static, protected]

The collection of dynamic libraries that read and write the various data formats.

bool m_dsIsDirectory [protected]

Indicates whether the input/output dataset is a directory.

Derived classes must ensure that this gets set as needed.

bool m_dsIsFile [protected]

Indicates whether the input/output dataset is a file name.

Derived classes must ensure that this gets set as needed.

BLayers m_layers [protected]

The collection of layers.

BParamList m_openParms [protected]

The parameters used to open the source/sink.

BDataManagerProxy* m_pProxy [protected]

The proxy object used to create and destroy BDataManager-derived objects.

const BProgressReporter* m_progress [protected]

An object that allows for progress reporting during read and write operations.

EStatus m_status [protected]

Status of most recent operation (read, write, etc.

)

BString m_type [protected]

The type of data source/sink contained in this object.


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

GeoTranslate 5.0 From Blue Marble Geographics