Class TContractDB
Unit
Declaration
type TContractDB = class(TObject)
Description
Main lightweight DB class
Hierarchy
- TObject
- TContractDB
Overview
Methods
![]() |
constructor Create(const AConsoleServer: TConsoleReaderThread); |
![]() |
destructor Destroy; override; |
![]() |
procedure Test; |
![]() |
procedure SetConsoleServer(const AConsoleServer: TConsoleReaderThread); |
![]() |
procedure UnregisterPanel(const PanelID: Integer); |
![]() |
procedure PanelChanged(const PanelID: Integer; const AItem: TTradeRouteLegItem; const ATradeRouteLeg: TTradeRouteLeg); |
![]() |
function GetContracts: TContractArray; |
![]() |
function RegisterPanel( const ATradeRouteLeg: TTradeRouteLeg; const OnLegNotify: TPanelLegNotify; const OnContractNotify: TPanelContractNotify): Integer; overload; |
![]() |
function RegisterPanel( const OnLegNotify: TPanelLegNotify; const OnContractNotify: TPanelContractNotify): Integer; overload; |
Properties
![]() |
property Contracts: TContractArray read GetContracts; |
Description
Methods
![]() |
constructor Create(const AConsoleServer: TConsoleReaderThread); |
|
Constructor Parameters
| |
![]() |
destructor Destroy; override; |
|
Destructor | |
![]() |
procedure Test; |
|
Test the DB. | |
![]() |
procedure SetConsoleServer(const AConsoleServer: TConsoleReaderThread); |
|
Set the console server for logging purposes. | |
![]() |
procedure UnregisterPanel(const PanelID: Integer); |
|
Unregister a panel and cleanup limbo leg (if any). | |
![]() |
procedure PanelChanged(const PanelID: Integer; const AItem: TTradeRouteLegItem; const ATradeRouteLeg: TTradeRouteLeg); |
|
Called by panels when something changed in the GUI. The DB will decide whether to store the leg in the limbo dict or attach it to a contract. AItem describes which field was changed. Parameters
Exceptions raised
| |
![]() |
function GetContracts: TContractArray; |
|
Retrieve all contracts. ReturnsTContractArray | |
![]() |
function RegisterPanel( const ATradeRouteLeg: TTradeRouteLeg; const OnLegNotify: TPanelLegNotify; const OnContractNotify: TPanelContractNotify): Integer; overload; |
|
Register a panel. Returns a unique PanelID. The panel should keep this ID. Both callbacks are optional (pass nil if not required). Parameters
ReturnsInteger the PanelID. | |
![]() |
function RegisterPanel( const OnLegNotify: TPanelLegNotify; const OnContractNotify: TPanelContractNotify): Integer; overload; |
|
Register a panel. Returns a unique PanelID. The panel should keep this ID. Both callbacks are optional (pass nil if not required). Parameters
ReturnsInteger the PanelID. | |
Properties
![]() |
property Contracts: TContractArray read GetContracts; |
|
Retrieve contracts. | |
