#include <BDataManagerProxy.h>
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 BDataReader * | CreateReader (const BString &type, const BParamList &createParms, BCoordSysRepository *ds, BLogger *pLogger=0) |
| Factory method to create a BDataReader object. | |
| virtual BDataWriter * | CreateWriter (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. | |
| 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.
| virtual bool CanRead | ( | BString & | dataType, | |
| const BParamList & | parms | |||
| ) | [virtual] |
Indicates if the format library can read the specified data format using the specified 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. |
| virtual bool CanRead | ( | const BString & | dataType | ) | [virtual] |
| virtual bool CanWrite | ( | const BString & | dataType | ) | [virtual] |
| 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.
| 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. |
| virtual BDataWriter* CreateWriter | ( | const BString & | type, | |
| const BParamList & | createParms, | |||
| BCoordSysRepository * | ds, | |||
| BLogger * | pLogger = 0 | |||
| ) | [virtual] |
Factory method to create a BDataWriter object.
| 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. |
| virtual void DestroyObject | ( | BDataManager * | pObj | ) | [virtual] |
Frees the memory for a BDataManager object created by this proxy.
| 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.
| void Initialize | ( | BDataManager * | pMgr, | |
| BCoordSysRepository * | ds, | |||
| BLogger * | pLogger = 0 | |||
| ) | [protected] |
Initializes this BDataManagerProxy.
| 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.
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.
| dsName | The input file name, which contains unicode characters. |
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.