BDataManagerProxy Class Reference

#include <BDataManagerProxy.h>

List of all members.


Detailed Description

The "plug in" interface for data format reader and writer dynamic libraries.

This interface allows one to query the formats supported by a reader/writer library, and also to create a BDataReader or BDataWriter to read/write the supported formats.

Public Member Functions

 BDataManagerProxy ()
 Default constructor.
virtual bool CanRead (BString &dataType, const BParamList &parms)
 Indicates if the format library can read the specified data format using the specified parameters.
virtual bool CanRead (const BString &dataType)
 Indicates if the format library can read the specified data format.
virtual bool CanWrite (const BString &dataType)
 Indicates if the format library can write the specified data format.
virtual void CleanUpTempInputFile (void)
 Deletes the temporary input file created by MakeTempInputFileName.
virtual BDataReaderCreateReader (const BString &type, const BParamList &createParms, BCoordSysRepository *ds, BLogger *pLogger=0)
 Factory method to create a BDataReader object.
virtual BDataWriterCreateWriter (const BString &type, const BParamList &createParms, BCoordSysRepository *ds, BLogger *pLogger=0)
 Factory method to create a BDataWriter object.
virtual void DestroyObject (BDataManager *pObj)
 Frees the memory for a BDataManager object created by this proxy.
int GetBuildNumber ()
 Retrieves the global build number used to identify build version for this format reader writer or transformer.
BString GetTempInputFileName (void) const
 Gets the temporary input file name associate with this BDataManagerProxy.
bool MadeTempFile (void) const
 Indicates whether or not this BDataManagerProxy has made a temporary file.
virtual BString MakeTempInputFileName (const BString &dsName)
 Creates a usable temporary input file name.
virtual ~BDataManagerProxy ()
 Destructor.

Protected Member Functions

void Initialize (BDataManager *pMgr, BCoordSysRepository *ds, BLogger *pLogger=0)
 Initializes this BDataManagerProxy.

Protected Attributes

bool m_madeTempFile
 Indicates whether or not this BDataManagerProxy has made a usable file name.
BString m_tempInputFile
 The usable input file name.


Constructor & Destructor Documentation

BDataManagerProxy (  )  [inline]

Default constructor.

Since this object is just an interface, it is not very useful to create a raw BDataManagerProxy. Each format library implements an object that supports this interface, and GeoCore takes care constructing these objects.

virtual ~BDataManagerProxy (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual bool CanRead ( BString dataType,
const BParamList parms 
) [virtual]

Indicates if the format library can read the specified data format using the specified parameters.

Parameters:
dataType The data format. The possible values for this parameter are defined as BString contants in DSType.h.
parms Information describing the data source, typically a file name.
Returns:
True if the proxy can read the data and false otherwise.

virtual bool CanRead ( const BString dataType  )  [virtual]

Indicates if the format library can read the specified data format.

Parameters:
dataType The data format. The possible values for this parameter are defined as BString contants in DSType.h.
Returns:
True if the library can read the specified format and false otherwise.

virtual bool CanWrite ( const BString dataType  )  [virtual]

Indicates if the format library can write the specified data format.

Parameters:
dataType The data format. The possible values for this parameter are defined as BString contants in DSType.h.
Returns:
True if the library can write the specified format and false otherwise.

virtual void CleanUpTempInputFile ( void   )  [inline, virtual]

Deletes the temporary input file created by MakeTempInputFileName.

virtual BDataReader* CreateReader ( const BString type,
const BParamList createParms,
BCoordSysRepository ds,
BLogger pLogger = 0 
) [virtual]

Factory method to create a BDataReader object.

Parameters:
type The data format that the BDataReader will read. The possible values for this parameter are defined as BString contants in DSType.h.
createParms Format specific parameters.
ds The BCoordSysRepository that the BDataReader will use to retreive geodetic definitions.
pLogger Instance of BLogger that will be used to log messages from the reader. This allows the use of a single log file to log messages from all readers or writers in an application. Set this to 0 if you want to allow a reader or writer to create its own log file.
Returns:
A BDataReader that will read the specified format.

virtual BDataWriter* CreateWriter ( const BString type,
const BParamList createParms,
BCoordSysRepository ds,
BLogger pLogger = 0 
) [virtual]

Factory method to create a BDataWriter object.

Parameters:
type The data format that the BDataWriter will produce. The possible values for this parameter are defined as BString contants in DSType.h.
createParms Format specific parameters.
ds The BCoordSysRepository that the BDataWriter will use to retreive geodetic definitions.
pLogger Instance of BLogger that will be used to log messages from the writer. This allows the use of a single log file to log messages from all readers or writers in an application. Set this to 0 if you want to allow a reader or writer to create its own log file.
Returns:
A BDataWriter that will write the specified format.

virtual void DestroyObject ( BDataManager pObj  )  [virtual]

Frees the memory for a BDataManager object created by this proxy.

Parameters:
pObj The BDataManager object to free.

int GetBuildNumber (  ) 

Retrieves the global build number used to identify build version for this format reader writer or transformer.

BString GetTempInputFileName ( void   )  const [inline]

Gets the temporary input file name associate with this BDataManagerProxy.

Returns:
The temporary inpur file name.

void Initialize ( BDataManager pMgr,
BCoordSysRepository ds,
BLogger pLogger = 0 
) [protected]

Initializes this BDataManagerProxy.

Parameters:
pMgr The BDataManager that owns this proxy.
ds The BCoordSysRepository that this BDataManagerProxy will use to retreive geodetic definitions.
pLogger The BLogger to which log messages will be written.

bool MadeTempFile ( void   )  const [inline]

Indicates whether or not this BDataManagerProxy has made a temporary file.

Returns:
True if the proxy has made a temporary file and false otherwise

virtual BString MakeTempInputFileName ( const BString dsName  )  [virtual]

Creates a usable temporary input file name.

Some readers and writers do not support wide-character file names, so we need to do something to make valid names to replace names that contain unicode characters. In some cases, this may involve creating one or more temporary files as required by the particular format. Derived classes that do not support unicode file names need to implement this method.

Parameters:
dsName The input file name, which contains unicode characters.
Returns:
A usable file name.


Member Data Documentation

bool m_madeTempFile [protected]

Indicates whether or not this BDataManagerProxy has made a usable file name.

BString m_tempInputFile [protected]

The usable input file name.


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

GeoTranslate 5.0 From Blue Marble Geographics