TDAEDriver
Overview
The TDAEDriver class is a base class for the DA driver implementation classes in the Data Abstract Architecture.
It implements the IDADriver and IDADriver30 interfaces and provides base functionality.
Please refer to the articles Creating Drivers (Data Abstract) and How to create a Data Abstract Driver (Delphi) for an overall description.
Location
- Unit: uDAEConnection.pas
- Ancestry: TComponent | TDAEDriver
CustomizeConnectionObject protected dynamic
Provides a way to perform additional procedures after acquiring a connection with the NewConnection methods.
procedure CustomizeConnectionObject(aConnection: TDAEConnection)
Parameters:
- aConnection: Reference to the used connection
Description protected
Driver's description.
property Description: string read
DoSetTraceOptions protected virtual
Executes actions specific to the implementation to perform event monitoring.
procedure DoSetTraceOptions(TraceActive: Boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent)
Parameters:
- TraceActive: Current mode
- TraceFlags: Set of TDATraceOption
- Callback: Method to call in various OnTraceEvent event handlers
DriverID protected
Returns the driver's ID.
property DriverID: string read
Finalize protected virtual safecall
Initializes the driver
procedure Finalize
GetAuxDrivers protected virtual safecall
Returns a list of available auxiliary drivers.
procedure GetAuxDrivers(out List: IROStrings)
Parameters:
- List: List of auxiliary driver names
GetAuxParams protected virtual safecall
Returns a list of custom parameters for the specified driver.
procedure GetAuxParams(const AuxDriver: string; out List: IROStrings)
Parameters:
- AuxDriver: Aux driver name in question
- List: List of auxiliary parameters
GetAvailableDriverOptions protected virtual safecall
Returns a set of available driver options.
function GetAvailableDriverOptions: TDAAvailableDriverOptions
GetAvailableDriverOptionsEx protected virtual safecall
Returns a set of available driver options for specific provider.
function GetAvailableDriverOptionsEx(AuxDriver: string): TDAAvailableDriverOptions
Parameters:
- AuxDriver: Aux driver name in question
GetConnectionClass protected virtual abstract
Сreates a concrete implementation of the TDAEConnection.
function GetConnectionClass: TDAEConnectionClass
GetDefaultConnectionType protected virtual safecall
Returns a default connection type of the specified provider.
function GetDefaultConnectionType(const AuxDriver: string): string
Parameters:
- AuxDriver: Aux driver name in question
GetDefaultCustomParameters protected virtual safecall
Returns custom driver-dependent parameters.
function GetDefaultCustomParameters: string
GetDescription protected virtual safecall abstract
Returns the driver's description.
function GetDescription: string
GetDriverHelp protected
Returns the help of the driver by returning the loaded 'DRIVER_HELP' from the resources HTML text.
function GetDriverHelp(aType: TDADriverHelpType): string
Parameters:
- aType: See TDADriverHelpType
GetDriverID protected virtual safecall abstract
Returns driver ID
function GetDriverID: string
GetMajVersion protected virtual safecall
Returns the driver's major version.
function GetMajVersion: Byte
GetMinVersion protected virtual safecall
Returns the driver's minor version.
function GetMinVersion: Byte
Initialize protected virtual safecall
Initializes the driver
procedure Initialize
MajVersion protected
Driver's major version.
property MajVersion: Byte read
MinVersion protected
Driver's minor version.
property MinVersion: Byte read
NewConnection (IDAConnectionManager, TDAConnection): IDAConnection protected overload safecall
Creates a new connection with help of the GetConnectionClass class, initializing its corresponding properties with the given aConnectionManager
and aConnectionDefinition
, and finally calling CustomizeConnectionObject for a created connection.
Returns a created connection.
function NewConnection(const aConnectionManager: IDAConnectionManager; aConnectionDefinition: TDAConnection): IDAConnection
Parameters:
- aConnectionManager: Connection manager
- aConnectionDefinition: Connection parameters
NewConnection (string, string): IDAConnection protected overload safecall
Creates a new aName
connection with help of the GetConnectionClass and
sets its ConnectionType up to aConnectionType
.
Returns a created connection.
function NewConnection(const aName: string; const aConnectionType: string): IDAConnection
Parameters:
- aName: Connection name
- aConnectionType: Connection type
SetTraceOptions protected safecall
Sets trace options.
procedure SetTraceOptions(TraceActive: Boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent)
Parameters:
- TraceActive: Current mode
- TraceFlags: Set of TDATraceOption
- Callback: Method to call in various OnTraceEvent event handlers
Description protected
Driver's description.
property Description: string read
DriverID protected
Returns the driver's ID.
property DriverID: string read
MajVersion protected
Driver's major version.
property MajVersion: Byte read
MinVersion protected
Driver's minor version.
property MinVersion: Byte read
CustomizeConnectionObject protected dynamic
Provides a way to perform additional procedures after acquiring a connection with the NewConnection methods.
procedure CustomizeConnectionObject(aConnection: TDAEConnection)
Parameters:
- aConnection: Reference to the used connection
DoSetTraceOptions protected virtual
Executes actions specific to the implementation to perform event monitoring.
procedure DoSetTraceOptions(TraceActive: Boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent)
Parameters:
- TraceActive: Current mode
- TraceFlags: Set of TDATraceOption
- Callback: Method to call in various OnTraceEvent event handlers
Finalize protected virtual safecall
Initializes the driver
procedure Finalize
GetAuxDrivers protected virtual safecall
Returns a list of available auxiliary drivers.
procedure GetAuxDrivers(out List: IROStrings)
Parameters:
- List: List of auxiliary driver names
GetAuxParams protected virtual safecall
Returns a list of custom parameters for the specified driver.
procedure GetAuxParams(const AuxDriver: string; out List: IROStrings)
Parameters:
- AuxDriver: Aux driver name in question
- List: List of auxiliary parameters
GetAvailableDriverOptions protected virtual safecall
Returns a set of available driver options.
function GetAvailableDriverOptions: TDAAvailableDriverOptions
GetAvailableDriverOptionsEx protected virtual safecall
Returns a set of available driver options for specific provider.
function GetAvailableDriverOptionsEx(AuxDriver: string): TDAAvailableDriverOptions
Parameters:
- AuxDriver: Aux driver name in question
GetConnectionClass protected virtual abstract
Сreates a concrete implementation of the TDAEConnection.
function GetConnectionClass: TDAEConnectionClass
GetDefaultConnectionType protected virtual safecall
Returns a default connection type of the specified provider.
function GetDefaultConnectionType(const AuxDriver: string): string
Parameters:
- AuxDriver: Aux driver name in question
GetDefaultCustomParameters protected virtual safecall
Returns custom driver-dependent parameters.
function GetDefaultCustomParameters: string
GetDescription protected virtual safecall abstract
Returns the driver's description.
function GetDescription: string
GetDriverHelp protected
Returns the help of the driver by returning the loaded 'DRIVER_HELP' from the resources HTML text.
function GetDriverHelp(aType: TDADriverHelpType): string
Parameters:
- aType: See TDADriverHelpType
GetDriverID protected virtual safecall abstract
Returns driver ID
function GetDriverID: string
GetMajVersion protected virtual safecall
Returns the driver's major version.
function GetMajVersion: Byte
GetMinVersion protected virtual safecall
Returns the driver's minor version.
function GetMinVersion: Byte
Initialize protected virtual safecall
Initializes the driver
procedure Initialize
NewConnection (IDAConnectionManager, TDAConnection): IDAConnection protected overload safecall
Creates a new connection with help of the GetConnectionClass class, initializing its corresponding properties with the given aConnectionManager
and aConnectionDefinition
, and finally calling CustomizeConnectionObject for a created connection.
Returns a created connection.
function NewConnection(const aConnectionManager: IDAConnectionManager; aConnectionDefinition: TDAConnection): IDAConnection
Parameters:
- aConnectionManager: Connection manager
- aConnectionDefinition: Connection parameters
NewConnection (string, string): IDAConnection protected overload safecall
Creates a new aName
connection with help of the GetConnectionClass and
sets its ConnectionType up to aConnectionType
.
Returns a created connection.
function NewConnection(const aName: string; const aConnectionType: string): IDAConnection
Parameters:
- aName: Connection name
- aConnectionType: Connection type
SetTraceOptions protected safecall
Sets trace options.
procedure SetTraceOptions(TraceActive: Boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent)
Parameters:
- TraceActive: Current mode
- TraceFlags: Set of TDATraceOption
- Callback: Method to call in various OnTraceEvent event handlers
- Data Abstract Architecture ** Data Abstract Connections (Delphi) ** Creating Drivers (Data Abstract) ** How to create a Data Abstract Driver (Delphi) ** Drivers
- External links ** Abstract factory pattern