TASCII85DecoderStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

ASCII 85 decoder stream.

Declaration

Source position: ascii85.pp line 45

type TASCII85DecoderStream = class(TOwnerStream)
published
constructor Create(); | Create new ASCII 85 decoder stream
procedure Decode(); | Decode source byte
procedure Close; | Close decoder
function ClosedP; | Check if the state is correct
property BExpectBoundary: Boolean; [rw] | Expect ~ character
public
destructor Destroy; override; | Clean up instance
function Read(); override; | Read data from stream
public
function Seek(); | Set stream position
end;

Inheritance

TASCII85DecoderStream

ASCII 85 decoder stream.
|

TOwnerStream
|

TStream
|

TObject

Description

TASCII85DecoderStream is a read-only stream: it takes an input stream with ASCII 85 encoded data, and decodes the data as it is read. To this end, it overrides the TSTream.Read method.

The stream cannot be written to, trying to write to the stream will result in an exception.

Documentation generated on: Aug 02 2012


TASCII85DecoderStream
pl |  | BExpectBoundary
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


pl |  | BExpectBoundary (TASCII85DecoderStream)
 |  | Position (TStream)
 |  | Size (TStream)
 | ro |


TASCII85DecoderStream
pl | Create
pl | Decode
pl | Close
pl | ClosedP
 | Destroy
 | Read
 | Seek
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


 | AfterConstruction (TObject)
 | BeforeDestruction (TObject)
 | ClassInfo (TObject)
 | ClassName (TObject)
 | ClassNameIs (TObject)
 | ClassParent (TObject)
 | ClassType (TObject)
 | CleanupInstance (TObject)
pl | Close (TASCII85DecoderStream)
pl | ClosedP (TASCII85DecoderStream)
 | CopyFrom (TStream)
 | Create (TObject)
 | Create (TOwnerStream)
pl | Create (TASCII85DecoderStream)
pl | Decode (TASCII85DecoderStream)
 | DefaultHandler (TObject)
 | DefaultHandlerStr (TObject)
 | Destroy (TObject)
 | Destroy (TOwnerStream)
 | Destroy (TASCII85DecoderStream)
 | Discard (TStream)
 | DiscardLarge (TStream)
 | Dispatch (TObject)
 | DispatchStr (TObject)
 | Equals (TObject)
 | FakeSeekForward (TStream)
 | FieldAddress (TObject)
 | FixupResourceHeader (TStream)
 | Free (TObject)
 | FreeInstance (TObject)
 | GetHashCode (TObject)
 | GetInterface (TObject)
 | GetInterfaceByStr (TObject)
 | GetInterfaceEntry (TObject)
 | GetInterfaceEntryByStr (TObject)
 | GetInterfaceTable (TObject)
 | GetInterfaceWeak (TObject)
 | GetPosition (TStream)
 | GetSize (TStream)
 | InheritsFrom (TObject)
 | InitInstance (TObject)
 | InstanceSize (TObject)
 | InvalidSeek (TStream)
 | MethodAddress (TObject)
 | MethodName (TObject)
 | newinstance (TObject)
 | Read (TStream)
 | Read (TASCII85DecoderStream)
 | ReadAnsiString (TStream)
 | ReadBuffer (TStream)
 | ReadByte (TStream)
 | ReadComponent (TStream)
 | ReadComponentRes (TStream)
 | ReadDWord (TStream)
 | ReadNotImplemented (TStream)
 | ReadQWord (TStream)
 | ReadResHeader (TStream)
 | ReadWord (TStream)
 | SafeCallException (TObject)
 | Seek (TStream)
 | Seek (TASCII85DecoderStream)
 | SetPosition (TStream)
 | SetSize (TStream)
 | SetSize64 (TStream)
 | StringMessageTable (TObject)
 | ToString (TObject)
 | UnitName (TObject)
 | Write (TStream)
 | WriteAnsiString (TStream)
 | WriteBuffer (TStream)
 | WriteByte (TStream)
 | WriteComponent (TStream)
 | WriteComponentRes (TStream)
 | WriteDescendent (TStream)
 | WriteDescendentRes (TStream)
 | WriteDWord (TStream)
 | WriteNotImplemented (TStream)


TASCII85DecoderStream

TOwnerStream

TStream

TObject


TASCII85DecoderStream.BExpectBoundary

Expect ~ character

Declaration

Source position: ascii85.pp line 65

published property TASCII85DecoderStream.BExpectBoundary: Boolean
  read fBExpectBoundary
  write fBExpectBoundary;

Description

BExpectBoundary is True if a encoded data boundary is to be expected ("~>").

See also

ClosedP

Check if the state is correct


TASCII85DecoderStream.Close

Close decoder

Declaration

Source position: ascii85.pp line 63

published procedure TASCII85DecoderStream.Close;

Description

Close closes the decoder mechanism: it checks if all data was read and performs a check to see whether all input data was consumed.

Errors

If the input stream was invalid, an EConvertError exception is raised.

See also

TASCII85DecoderStream.ClosedP | Check if the state is correct
TASCII85DecoderStream.Read | Read data from stream
TASCII85DecoderStream.Destroy | Clean up instance


TASCII85DecoderStream.ClosedP

Check if the state is correct

Declaration

Source position: ascii85.pp line 64

published function TASCII85DecoderStream.ClosedP: Boolean;

Function result

State is one of ascInitial, ascNoEncodedChar or ascPrefix.

Description

ClosedP checks if the decoder state is one of ascInitial, ascNoEncodedChar, ascPrefix, and returns True if it is.

See also

TASCII85DecoderStream.Close | Close decoder
TASCII85DecoderStream.BExpectBoundary | Expect ~ character


TASCII85DecoderStream.Create

Create new ASCII 85 decoder stream

Declaration

Source position: ascii85.pp line 61

published constructor TASCII85DecoderStream.Create(

  aStream: TStream

);

Arguments

aStream

Source data

Description

Create instantiates a new TASCII85DecoderStream instance, and sets aStream as the source stream.

See also

TASCII85DecoderStream.Destroy

Clean up instance


TASCII85DecoderStream.Decode

Decode source byte

Declaration

Source position: ascii85.pp line 62

published procedure TASCII85DecoderStream.Decode(

  aInput: Byte

);

Arguments

aInput

Byte to decode

Description

Decode decodes a source byte, and transfers it to the buffer. It is an internal routine and should not be used directly.

See also

TASCII85DecoderStream.Close

Close decoder


TASCII85DecoderStream.Destroy

Clean up instance

Declaration

Source position: ascii85.pp line 69

public destructor TASCII85DecoderStream.Destroy; override;

Description

Destroy closes the input stream using Close and cleans up the TASCII85DecoderStream instance from memory.

Errors

In case the input stream was invalid, an exception may occur.

See also

TASCII85DecoderStream.Close

Close decoder


TASCII85DecoderStream.Read

Read data from stream

Declaration

Source position: ascii85.pp line 70

public function TASCII85DecoderStream.Read(

  var aBuffer;

  aCount: LongInt

):LongInt; override;

Arguments

aBuffer | Buffer to transfer data to
aCount | Number of bytes to transfer to buffer

Function result

Actual number of bytes transferred to buffer.

Description

Read attempts to read aCount bytes from the stream and places them in aBuffer. It reads only as much data as is available. The actual number of read bytes is returned.

The read method reads as much data from the input stream as needed to get to aCount bytes, in general this will be aCount*5/4 bytes.


TASCII85DecoderStream.Seek

Set stream position

Declaration

Source position: line 0

function TASCII85DecoderStream.Seek(

  aOffset: LongInt;

  aOrigin: Word

):LongInt; override;

function TASCII85DecoderStream.Seek(

  const aOffset: Int64;

  aOrigin: TSeekOrigin

):Int64; override; overload;

Arguments

aOffset | Offset from current position (should be zero).
aOrigin | Origin for seek operation (should be soCurrent).

Function result

new position in stream.

Arguments

aOffset | Offset from current position (should be zero).
aOrigin | Origin for seek operation (should be soCurrent).

Description

Seek sets the stream position. It only allows to set the position to the current position of this file, and returns then the current position. All other arguments will result in an EReadError exception.

Errors

In case the arguments are different from soCurrent and 0, an EReadError exception will be raised.

See also

TASCII85DecoderStream.Read

Read data from stream


TASCII85EncoderStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

ASCII 85 encoding stream

Declaration

Source position: ascii85.pp line 76

type TASCII85EncoderStream = class(TOwnerStream)
public
constructor Create(); | Create a new instance of TASCII85EncoderStream
destructor Destroy; override; | Flushed the data to the output stream and cleans up the encoder instance.
function Write(); override; | Write data encoded to the destination stream
property Width: Integer; [r] | Width of the lines written to the data stream
property Boundary: Boolean; [r] | Is a boundary delineator written before and after the data
end;

Inheritance

TASCII85EncoderStream

ASCII 85 encoding stream
|

TOwnerStream
|

TStream
|

TObject

Description

TASCII85EncoderStream is the counterpart to the TASCII85DecoderStream decoder stream: what TASCII85EncoderStream encodes, can be decoded by TASCII85DecoderStream.

The encoder stream works using a destination stream: whatever data is written to the encoder stream is encoded and written to the destination stream. The stream must be passed on in the constructor.

Note that all encoded data is only written to the destination stream when the encoder stream is destroyed.

See also

TASCII85EncoderStream.create | Create a new instance of TASCII85EncoderStream
TASCII85DecoderStream | ASCII 85 decoder stream.


TASCII85EncoderStream
 | ro | Width
 | ro | Boundary
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


ro | Boundary (TASCII85EncoderStream)
 | Position (TStream)
 | Size (TStream)
ro | Source (TOwnerStream)
 | SourceOwner (TOwnerStream)
ro |


TASCII85EncoderStream
 | Create
 | Destroy
 | Write
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TASCII85EncoderStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TASCII85EncoderStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (TASCII85EncoderStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TASCII85EncoderStream

TOwnerStream

TStream

TObject


TASCII85EncoderStream.Boundary

Is a boundary delineator written before and after the data

Declaration

Source position: ascii85.pp line 92

public property TASCII85EncoderStream.Boundary: Boolean
  read FBoundary;

Description

Boundary indicates whether the stream will write a boundary delineator before and after the encoded data. It is passed to the constructor and cannot be changed.

See also

Width | Width of the lines written to the data stream
Create | Create a new instance of TASCII85EncoderStream


TASCII85EncoderStream.Create

Create a new instance of TASCII85EncoderStream

Declaration

Source position: ascii85.pp line 88

public constructor TASCII85EncoderStream.Create(

  ADest: TStream;

  AWidth: Integer = 72;

  ABoundary: Boolean = False

);

Description

Create creates a new instance ofTASCII85EncoderStream. It stores ADest as the destination stream for the encoded data. The Width parameter indicates the width of the lines that are written by the encoder: after this amount of characters, a linefeed is put in the data stream. If ABoundary is True then a boundary delineator is written to the stream before and after the data.

See also

TASCII85EncoderStream | ASCII 85 encoding stream
Width | Width of the lines written to the data stream
Boundary | Is a boundary delineator written before and after the data


TASCII85EncoderStream.Destroy

Flushed the data to the output stream and cleans up the encoder instance.

Declaration

Source position: ascii85.pp line 89

public destructor TASCII85EncoderStream.Destroy; override;

Description

Destroy writes the data remaining in the internal buffer to the destination stream (possibly followed by a boundary delineator) and then destroys the encoder instance.

See also

TASCII85EncoderStream.Write | Write data encoded to the destination stream
TASCII85EncoderStream.Boundary | Is a boundary delineator written before and after the data


TASCII85EncoderStream.Width

Width of the lines written to the data stream

Declaration

Source position: ascii85.pp line 91

public property TASCII85EncoderStream.Width: Integer
  read FWidth;

Description

Width is the width of the lines of encoded data written to the stream. After Width lines, a line ending will be written to the stream. The value is passed to the constructor and cannot be changed afterwards.

See also

Boundary | Is a boundary delineator written before and after the data
Create | Create a new instance of TASCII85EncoderStream


TASCII85EncoderStream.Write

Write data encoded to the destination stream

Declaration

Source position: ascii85.pp line 90

public function TASCII85EncoderStream.Write(

  const aBuffer;

  aCount: LongInt

):LongInt; override;

Description

Write encodes the aCount bytes of data in aBuffer and writes the encoded data to the destination stream.

Not all data is written immediatly to the destination stream. Only after the encoding stream is destroyed will the destination stream contain the full data.

See also

TASCII85EncoderStream.Destroy

Flushed the data to the output stream and cleans up the encoder instance.


TASCII85RingBuffer

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internal buffer class

Declaration

Source position: ascii85.pp line 30

type TASCII85RingBuffer = class
published
property FillCount: Cardinal; [r] | Number of bytes in buffer
property Size: Cardinal; [r] | Size of buffer
procedure Write(); | Write data to the internal buffer
function Read(); | Read data from the internal buffer
end;

Inheritance

TASCII85RingBuffer

Internal buffer class
|

TObject

Description

TASCII85RingBuffer is an internal buffer class: it maintains a memory buffer of 1Kb, for faster reading of the stream. It should not be necessary to instantiate an instance of this class, the TASCII85DecoderStream decoder stream will create an instance of this class automatically.

See also

TASCII85DecoderStream

ASCII 85 decoder stream.


TASCII85RingBuffer
pl | ro | FillCount
pl | ro | Size


pl | ro | FillCount (TASCII85RingBuffer)
pl | ro |


TASCII85RingBuffer
pl | Write
pl | Read


pl | Read (TASCII85RingBuffer)
pl |


TASCII85RingBuffer


TASCII85RingBuffer.FillCount

Number of bytes in buffer

Declaration

Source position: ascii85.pp line 39

published property TASCII85RingBuffer.FillCount: Cardinal
  read fBufferFillCount;

Description

FillCount is the available amount of bytes in the buffer.

See also

TASCII85RingBuffer.Write | Write data to the internal buffer
TASCII85RingBuffer.Read | Read data from the internal buffer
TASCII85RingBuffer.Size | Size of buffer


TASCII85RingBuffer.Read

Read data from the internal buffer

Declaration

Source position: ascii85.pp line 42

published function TASCII85RingBuffer.Read(

  var aBuffer;

  aSize: Cardinal

):Cardinal;

Arguments

aBuffer | Buffer to write data to
aSize | Number of bytes to transfer

Function result

Number of actually transferred bytes

Description

Read will read aSize bytes from the internal buffer and writes them to aBuffer. If not enough bytes are available, only as much bytes as available will be written. The function returns the number of bytes transferred.

See also

TASCII85RingBuffer.FillCount | Number of bytes in buffer
TASCII85RingBuffer.Write | Write data to the internal buffer
TASCII85RingBuffer.Size | Size of buffer


TASCII85RingBuffer.Size

Size of buffer

Declaration

Source position: ascii85.pp line 40

published property TASCII85RingBuffer.Size: Cardinal
  read GetBufferSize;

Description

Size is the total size of the memory buffer. This is currently hardcoded to 1024Kb.

See also

TASCII85RingBuffer.FillCount

Number of bytes in buffer


TASCII85RingBuffer.Write

Write data to the internal buffer

Declaration

Source position: ascii85.pp line 41

published procedure TASCII85RingBuffer.Write(

  const aBuffer;

  aSize: Cardinal

);

Arguments

aBuffer | Buffer to get data from
aSize | Total amount of bytes to read from aBuffer

Description

Write writes aSize bytes from aBuffer to the internal memory buffer. Only as much bytes are written as will fit in the buffer.

See also

TASCII85RingBuffer.FillCount | Number of bytes in buffer
TASCII85RingBuffer.Read | Read data from the internal buffer
TASCII85RingBuffer.Size | Size of buffer


TAVLTree

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

AVL tree component

Declaration

Source position: avl_tree.pp line 65

type TAVLTree = class
public
Root: TAVLTreeNode; | Root node of the tree
function Find(); | Find a data item in the tree.
function FindKey(); | Find a data item in the tree using alternate compare mechanism
function FindSuccessor(); | Find successor to node
function FindPrecessor(); |
function FindLowest; | Find the lowest (leftmost) node in the tree.
function FindHighest; | Find the highest (rightmost) node in the tree.
function FindNearest(); | Find the node closest to the data in the tree
function FindPointer(); | Search for a data pointer
function FindLeftMost(); | Find the node most left to a specified data node
function FindRightMost(); | Find the node most right to a specified node
function FindLeftMostKey(); | Find the node most left to a specified key node
function FindRightMostKey(); | Find the node most right to a specified key node
function FindLeftMostSameKey(); | Find the node most left to a specified node with the same data
function FindRightMostSameKey(); | Find the node most right of a specified node with the same data
public
procedure Add(); | Add a new node to the tree
public
procedure Delete(); | Delete a node from the tree
procedure Remove(); | Remove a data item from the list.
procedure RemovePointer(); | Remove a pointer item from the list.
procedure MoveDataLeftMost(); | Move data to the nearest left element
procedure MoveDataRightMost(); | Move data to the nearest right element
property OnCompare: TListSortCompare; [rw] | Compare function used when comparing nodes
procedure Clear; | Clears the tree
procedure FreeAndClear; | Clears the tree and frees nodes
procedure FreeAndDelete(); | Delete a node from the tree and destroy it
property Count: Integer; [r] | Number of nodes in the tree.
function ConsistencyCheck; | Check the consistency of the tree
procedure WriteReportToStream(); | Write the contents of the tree consistency check to the stream
function ReportAsString; | Return the tree report as a string
procedure SetNodeManager(); | Set the node instance manager to use
r
procedure Create(); | Create a new instance of TAVLTree
public
destructor Destroy; override; | Destroy the TAVLTree instance
function GetEnumerator; | Get an enumerator for the tree.
end;

Inheritance

TAVLTree

AVL tree component
|

TObject

Description

TAVLTree maintains a balanced AVL tree. The tree consists of TAVLTreeNode nodes, each of which has a Data pointer associated with it. The TAVLTree component offers methods to balance and search the tree.

By default, the list is searched with a simple pointer comparison algorithm, but a custom search mechanism can be specified in the OnCompare property.

See also

TAVLTreeNode

Represents a node in the tree.


TAVLTree

ro

Count


ro


TAVLTree
 | Find
 | FindKey
 | FindSuccessor
 | FindPrecessor
 | FindLowest
 | FindHighest
 | FindNearest
 | FindPointer
 | FindLeftMost
 | FindRightMost
 | FindLeftMostKey
 | FindRightMostKey
 | FindLeftMostSameKey
 | FindRightMostSameKey
 | Add
 | Delete
 | Remove
 | RemovePointer
 | MoveDataLeftMost
 | MoveDataRightMost
 | Clear
 | FreeAndClear
 | FreeAndDelete
 | ConsistencyCheck
 | WriteReportToStream
 | ReportAsString
 | SetNodeManager
 | Create
 | Destroy
 | GetEnumerator


Add (TAVLTree)

Clear (TAVLTree)

ConsistencyCheck (TAVLTree)

Create (TAVLTree)

Delete (TAVLTree)

Destroy (TAVLTree)

Find (TAVLTree)

FindHighest (TAVLTree)

FindKey (TAVLTree)

FindLeftMost (TAVLTree)

FindLeftMostKey (TAVLTree)

FindLeftMostSameKey (TAVLTree)

FindLowest (TAVLTree)

FindNearest (TAVLTree)

FindPointer (TAVLTree)

FindPrecessor (TAVLTree)

FindRightMost (TAVLTree)

FindRightMostKey (TAVLTree)

FindRightMostSameKey (TAVLTree)

FindSuccessor (TAVLTree)

FreeAndClear (TAVLTree)

FreeAndDelete (TAVLTree)

GetEnumerator (TAVLTree)

MoveDataLeftMost (TAVLTree)

MoveDataRightMost (TAVLTree)

Remove (TAVLTree)

RemovePointer (TAVLTree)

ReportAsString (TAVLTree)

SetNodeManager (TAVLTree)

WriteReportToStream (TAVLTree)


TAVLTree

OnCompare


OnCompare (TAVLTree)


TAVLTree.Add

Add a new node to the tree

Declaration

Source position: line 0

procedure TAVLTree.Add(

  ANode: TAVLTreeNode

);

function TAVLTree.Add(

  Data: Pointer

):TAVLTreeNode;

Arguments

ANode

Node to add to the tree

Arguments

Data

Data item to add to the tree

Function result

Resulting node in case a data pointer is added.

Description

Add adds a new Data or Node to the tree. It inserts the node so that the tree is maximally balanced by rebalancing the tree after the insert. In case a data pointer is added to the tree, then the node that was created is returned.

See also

TAVLTree.Delete | Delete a node from the tree
TAVLTree.Remove | Remove a data item from the list.


TAVLTree.Clear

Clears the tree

Declaration

Source position: avl_tree.pp line 103

public procedure TAVLTree.Clear;

Description

Clear deletes all nodes from the tree. The nodes themselves are not freed, and the data pointer in the nodes is also not freed.

If the node's data must be freed as well, use TAVLTree.FreeAndClear instead.

See also

TAVLTree.FreeAndClear | Clears the tree and frees nodes
TAVLTree.Delete | Delete a node from the tree


TAVLTree.ConsistencyCheck

Check the consistency of the tree

Declaration

Source position: avl_tree.pp line 107

public function TAVLTree.ConsistencyCheck: Integer;

Function result

0 if the tree is OK, a negative number if something is wrong.

Description

ConsistencyCheck checks the correctness of the tree. It returns 0 if the tree is internally consistent, and a negative number if the tree contais an error somewhere.

-1
The Count property doesn't match the actual node count
-2
A left node does not point to the correct parent
-3
A left node is larger than parent node
-4
A right node does not point to the correct parent
-5
A right node is less than parent node
-6
The balance of a node is not calculated correctly

See also

TAVLTree.WriteReportToStream

Write the contents of the tree consistency check to the stream


TAVLTree.Count

Number of nodes in the tree.

Declaration

Source position: avl_tree.pp line 106

public property TAVLTree.Count: Integer
  read FCount;

Description

Count is the number of nodes in the tree.


TAVLTree.Create

Create a new instance of TAVLTree

Declaration

Source position: line 0

constructor TAVLTree.Create(

  OnCompareMethod: TListSortCompare

);

constructor TAVLTree.Create;

Arguments

OnCompareMethod

Alternative node comparison method

Description

Create initializes a new instance of TAVLTree. An alternate OnCompare can be provided: the default OnCompare method compares the 2 data pointers of a node.

See also

OnCompare

Compare function used when comparing nodes


TAVLTree.Delete

Delete a node from the tree

Declaration

Source position: avl_tree.pp line 97

public procedure TAVLTree.Delete(

  ANode: TAVLTreeNode

);

Arguments

ANode

The node to delete from the tree.

Description

Delete removes the node from the tree. The node is not freed, but is passed to a TAVLTreeNodeMemManager instance for future reuse. The data that the node represents is also not freed.

The tree is rebalanced after the node was deleted.

See also

TAVLTree.Remove | Remove a data item from the list.
TAVLTree.RemovePointer | Remove a pointer item from the list.
TAVLTree.Clear | Clears the tree


TAVLTree.Destroy

Destroy the TAVLTree instance

Declaration

Source position: avl_tree.pp line 114

public destructor TAVLTree.Destroy; override;

Description

Destroy clears the nodes (the node data is not freed) and then destroys the TAVLTree instance.

See also

TAVLTree.Create

Create a new instance of TAVLTree

TAVLTree.Clean


TAVLTree.Find

Find a data item in the tree.

Declaration

Source position: avl_tree.pp line 78

public function TAVLTree.Find(

  Data: Pointer

):TAVLTreeNode;

Arguments

Data

Data item to search for.

Function result

Tree node corresponding to Data item.

Description

Find uses the default OnCompare comparing function to find the Data pointer in the tree. It returns the TAVLTreeNode instance that results in a successful compare with the Data pointer, or Nil if none is found.

The default OnCompare function compares the actual pointers, which means that by default Find will give the same result as FindPointer.

See also

OnCompare | Compare function used when comparing nodes
FindKey | Find a data item in the tree using alternate compare mechanism


TAVLTree.FindHighest

Find the highest (rightmost) node in the tree.

Declaration

Source position: avl_tree.pp line 84

public function TAVLTree.FindHighest: TAVLTreeNode;

Function result

The rightmost (highest) node in the tree.

Description

FindHighest returns the rightmost node in the tree, i.e. the node which is reached when descending from the rootnode via the Right subtrees.

See also

FindLowest

Find the lowest (leftmost) node in the tree.


TAVLTree.FindKey

Find a data item in the tree using alternate compare mechanism

Declaration

Source position: avl_tree.pp line 79

public function TAVLTree.FindKey(

  Key: Pointer;

  OnCompareKeyWithData: TListSortCompare

):TAVLTreeNode;

Arguments

Key | Data item to search for.
OnCompareKeyWithData | Data pointer comparison callback

Function result

Tree node corresponding to Key item.

Description

FindKey uses the specified OnCompareKeyWithData comparing function to find the Key pointer in the tree It returns the TAVLTreeNode instance that matches the Data pointer, or Nil if none is found.

See also

OnCompare | Compare function used when comparing nodes
Find | Find a data item in the tree.


TAVLTree.FindLeftMost

Find the node most left to a specified data node

Declaration

Source position: avl_tree.pp line 87

public function TAVLTree.FindLeftMost(

  Data: Pointer

):TAVLTreeNode;

Arguments

Data

The data item where to start the search from

Function result

The leftmost node relative to Data

Description

FindLeftMost finds the node most left from the Data node. It starts at the preceding node for Data and tries to move as far right in the tree as possible.

This operation corresponds to finding the previous item in a list.

See also

TAVLTree.FindRightMost | Find the node most right to a specified node
TAVLTree.FindLeftMostKey | Find the node most left to a specified key node
TAVLTree.FindRightMostKey | Find the node most right to a specified key node


TAVLTree.FindLeftMostKey

Find the node most left to a specified key node

Declaration

Source position: avl_tree.pp line 89

public function TAVLTree.FindLeftMostKey(

  Key: Pointer;

  OnCompareKeyWithData: TListSortCompare

):TAVLTreeNode;

Arguments

Key | Key identifiying the node where to start the search.
OnCompareKeyWithData | Callback to compare key value with data item

Function result

The leftmost node for Key

Description

FindLeftMostKey finds the node most left from the node associated with Key. It starts at the preceding node for Key and tries to move as far left in the tree as possible.

See also

TAVLTree.FindLeftMost | Find the node most left to a specified data node
TAVLTree.FindRightMost | Find the node most right to a specified node
TAVLTree.FindRightMostKey | Find the node most right to a specified key node


TAVLTree.FindLeftMostSameKey

Find the node most left to a specified node with the same data

Declaration

Source position: avl_tree.pp line 93

public function TAVLTree.FindLeftMostSameKey(

  ANode: TAVLTreeNode

):TAVLTreeNode;

Arguments

ANode

The node to start the search from

Function result

The treenode that was found, or nil if none found

Description

FindLefMostSameKey finds the node most left from and with the same data as the specified node ANode.

See also

TAVLTree.FindLeftMost | Find the node most left to a specified data node
TAVLTree.FindLeftMostKey | Find the node most left to a specified key node
TAVLTree.FindRightMostSameKey | Find the node most right of a specified node with the same data


TAVLTree.FindLowest

Find the lowest (leftmost) node in the tree.

Declaration

Source position: avl_tree.pp line 83

public function TAVLTree.FindLowest: TAVLTreeNode;

Function result

The leftmost (lowest) node in the tree.

Description

FindLowest returns the leftmost node in the tree, i.e. the node which is reached when descending from the rootnode via the left subtrees.

See also

FindHighest

Find the highest (rightmost) node in the tree.


TAVLTree.FindNearest

Find the node closest to the data in the tree

Declaration

Source position: avl_tree.pp line 85

public function TAVLTree.FindNearest(

  Data: Pointer

):TAVLTreeNode;

Arguments

Data

The data item to search for.

Function result

The node that is closest to Data

Description

FindNearest searches the node in the data tree that is closest to the specified Data. If Data appears in the tree, then its node is returned.

See also

FindHighest | Find the highest (rightmost) node in the tree.
FindLowest | Find the lowest (leftmost) node in the tree.
Find | Find a data item in the tree.
FindKey | Find a data item in the tree using alternate compare mechanism


TAVLTree.FindPointer

Search for a data pointer

Declaration

Source position: avl_tree.pp line 86

public function TAVLTree.FindPointer(

  Data: Pointer

):TAVLTreeNode;

Arguments

Data

The data pointer to search for.

Function result

The node that matches Data

Description

FindPointer searches for a node where the actual data pointer equals Data. This is a more fine search than find, where a custom compare function can be used.

The default OnCompare compares the data pointers, so the default Find will return the same node as FindPointer

See also

TAVLTree.Find | Find a data item in the tree.
TAVLTree.FindKey | Find a data item in the tree using alternate compare mechanism


TAVLTree.FindPrecessor

Declaration

Source position: avl_tree.pp line 82

public function TAVLTree.FindPrecessor(

  ANode: TAVLTreeNode

):TAVLTreeNode;

Arguments

ANode

The node from which to start the search

Function result

The preceding node

Description

FindPrecessor returns the successor to ANode: this is the rightmost node in the left subtree, or the rightmost node above the node ANode. This can of course be Nil.

This method is used when a node must be inserted at the leftmost position.

See also

TAVLTree.FindSuccessor | Find successor to node
TAVLTree.MoveDataLeftMost | Move data to the nearest left element


TAVLTree.FindRightMost

Find the node most right to a specified node

Declaration

Source position: avl_tree.pp line 88

public function TAVLTree.FindRightMost(

  Data: Pointer

):TAVLTreeNode;

Arguments

Data

The data item where to start the search from

Function result

The rightmost node relative to Data

Description

FindRightMost finds the node most right from the Data node. It starts at the succeding node for Data and tries to move as far left in the tree as possible.

This operation corresponds to finding the next item in a list.

See also

TAVLTree.FindLeftMost | Find the node most left to a specified data node
TAVLTree.FindLeftMostKey | Find the node most left to a specified key node
TAVLTree.FindRightMostKey | Find the node most right to a specified key node


TAVLTree.FindRightMostKey

Find the node most right to a specified key node

Declaration

Source position: avl_tree.pp line 91

public function TAVLTree.FindRightMostKey(

  Key: Pointer;

  OnCompareKeyWithData: TListSortCompare

):TAVLTreeNode;

Arguments

Key | Key identifiying the node where to start the search.
OnCompareKeyWithData | Callback to compare key value with data item

Function result

The rightmost node for Key

Description

FindRightMostKey finds the node most left from the node associated with Key. It starts at the succeding node for Key and tries to move as far right in the tree as possible.

See also

TAVLTree.FindLeftMost | Find the node most left to a specified data node
TAVLTree.FindRightMost | Find the node most right to a specified node
TAVLTree.FindLeftMostKey | Find the node most left to a specified key node


TAVLTree.FindRightMostSameKey

Find the node most right of a specified node with the same data

Declaration

Source position: avl_tree.pp line 94

public function TAVLTree.FindRightMostSameKey(

  ANode: TAVLTreeNode

):TAVLTreeNode;

Arguments

ANode

The node to start the search from

Function result

The treenode that was found, or nil if none found

Description

FindRighMostSameKey finds the node most right from and with the same data as the specified node ANode.

See also

TAVLTree.FindRightMost | Find the node most right to a specified node
TAVLTree.FindRightMostKey | Find the node most right to a specified key node
TAVLTree.FindLeftMostSameKey | Find the node most left to a specified node with the same data


TAVLTree.FindSuccessor

Find successor to node

Declaration

Source position: avl_tree.pp line 81

public function TAVLTree.FindSuccessor(

  ANode: TAVLTreeNode

):TAVLTreeNode;

Arguments

ANode

The node from which to start the search

Function result

The succeding node

Description

FindSuccessor returns the successor to ANode: this is the leftmost node in the right subtree, or the leftmost node above the node ANode. This can of course be Nil.

This method is used when a node must be inserted at the rightmost position.

See also

TAVLTree.FindPrecessor |
TAVLTree.MoveDataRightMost | Move data to the nearest right element


TAVLTree.FreeAndClear

Clears the tree and frees nodes

Declaration

Source position: avl_tree.pp line 104

public procedure TAVLTree.FreeAndClear;

Description

FreeAndClear deletes all nodes from the tree. The data pointer in the nodes is assumed to be an object, and is freed prior to deleting the node from the tree.

See also

TAVLTree.Clear | Clears the tree
TAVLTree.Delete | Delete a node from the tree
TAVLTree.FreeAndDelete | Delete a node from the tree and destroy it


TAVLTree.FreeAndDelete

Delete a node from the tree and destroy it

Declaration

Source position: avl_tree.pp line 105

public procedure TAVLTree.FreeAndDelete(

  ANode: TAVLTreeNode

);

Arguments

ANode

Node which must be deleted

Description

FreeAndDelete deletes a node from the tree, and destroys the data pointer: The data pointer in the nodes is assumed to be an object, and is freed by calling its destructor.

See also

TAVLTree.Clear | Clears the tree
TAVLTree.Delete | Delete a node from the tree
TAVLTree.FreeAndClear | Clears the tree and frees nodes


TAVLTree.GetEnumerator

Get an enumerator for the tree.

Declaration

Source position: avl_tree.pp line 115

public function TAVLTree.GetEnumerator: TAVLTreeNodeEnumerator;

Function result

An instance of an enumerator class.

Description

GetEnumerator returns an instance of the standard tree node enumerator TAVLTreeNodeEnumerator.

See also

TAVLTreeNodeEnumerator

Enumerator for the TAVLTree tree nodes


TAVLTree.MoveDataLeftMost

Move data to the nearest left element

Declaration

Source position: avl_tree.pp line 100

public procedure TAVLTree.MoveDataLeftMost(

  var ANode: TAVLTreeNode

);

Arguments

ANode

Node whose data most be moved

Description

MoveDataLeftMost moves the data from the node ANode to the nearest left location relative to Anode. It returns the new node where the data is positioned. The data from the former left node will be switched to ANode.

This operation corresponds to switching the current with the previous element in a list.

See also

TAVLTree.MoveDataRightMost

Move data to the nearest right element


TAVLTree.MoveDataRightMost

Move data to the nearest right element

Declaration

Source position: avl_tree.pp line 101

public procedure TAVLTree.MoveDataRightMost(

  var ANode: TAVLTreeNode

);

Arguments

ANode

Node whose data most be moved

Description

MoveDataRightMost moves the data from the node ANode to the rightmost location relative to Anode. It returns the new node where the data is positioned. The data from the former rightmost node will be switched to ANode.

This operation corresponds to switching the current with the next element in a list.

See also

TAVLTree.MoveDataLeftMost

Move data to the nearest left element


TAVLTree.OnCompare

Compare function used when comparing nodes

Declaration

Source position: avl_tree.pp line 102

public property TAVLTree.OnCompare: TListSortCompare
  read FOnCompare
  write SetOnCompare;

Description

OnCompare is the comparing function used when the data of 2 nodes must be compared. By default, the function simply compares the 2 data pointers. A different function can be specified on creation.

See also

TAVLTree.Create

Create a new instance of TAVLTree


TAVLTree.Remove

Remove a data item from the list.

Declaration

Source position: avl_tree.pp line 98

public procedure TAVLTree.Remove(

  Data: Pointer

);

Arguments

Data

Data item to remove from the tree.

Description

Remove finds the node associated with Data using find and, if found, deletes it from the tree. Only the first occurrence of Data will be removed.

See also

TAVLTree.Delete | Delete a node from the tree
TAVLTree.RemovePointer | Remove a pointer item from the list.
TAVLTree.Clear | Clears the tree
TAVLTree.Find | Find a data item in the tree.


TAVLTree.RemovePointer

Remove a pointer item from the list.

Declaration

Source position: avl_tree.pp line 99

public procedure TAVLTree.RemovePointer(

  Data: Pointer

);

Arguments

Data

Pointer to remove from the tree

Description

Remove uses FindPointer to find the node associated with the pointer Data and, if found, deletes it from the tree. Only the first occurrence of Data will be removed.

See also

TAVLTree.Remove | Remove a data item from the list.
TAVLTree.Delete | Delete a node from the tree
TAVLTree.Clear | Clears the tree


TAVLTree.ReportAsString

Return the tree report as a string

Declaration

Source position: avl_tree.pp line 109

public function TAVLTree.ReportAsString: ;

Function result

The tree report as a string

Description

ReportAsString calls WriteReportToStream and retuns the stream data as a string.

See also

TAVLTree.WriteReportToStream

Write the contents of the tree consistency check to the stream


TAVLTree.Root

Root node of the tree

Declaration

Source position: avl_tree.pp line 77

public TAVLTree.Root: TAVLTreeNode;

Description

Root is the root node of the tree. It should not be set explicitly, only use the Add, Delete, Remove, RemovePointer, or Clear methods to manipulate the items in the tree.

See also

TAVLTree.Add | Add a new node to the tree
TAVLTree.Delete | Delete a node from the tree
TAVLTree.Remove | Remove a data item from the list.
TAVLTree.RemovePointer | Remove a pointer item from the list.
TAVLTree.Clear | Clears the tree


TAVLTree.SetNodeManager

Set the node instance manager to use

Declaration

Source position: avl_tree.pp line 110

public procedure TAVLTree.SetNodeManager(

  NewMgr: TBaseAVLTreeNodeManager;

  AutoFree: Boolean = False

);

Arguments

NewMgr | New node manager to use
AutoFree | Automatically free the node manager when the tree is destroyed.

Description

SetNodeManager sets the node manager instance used by the tree to newmgr. It should be called before any nodes are added to the tree. The TAVLTree instance will not destroy the nodemanager, thus the same instance of the tree node manager can be used to manager the nodes of multiple TAVLTree instances.

By default, a single instance of TAVLTreeNodeMemManager is used to manage the nodes of all TAVLTree instances.

See also

TBaseAVLTreeNodeManager | Base class for a node memory manager
TAVLTreeNodeMemManager | TAVLTreeNode Node memory manager


TAVLTree.WriteReportToStream

Write the contents of the tree consistency check to the stream

Declaration

Source position: avl_tree.pp line 108

public procedure TAVLTree.WriteReportToStream(

  s: TStream;

  var StreamSize: Int64

);

Arguments

s | Stream to write the tree report to
StreamSize | Total number of bytes written

Description

WriteReportToStream writes a visual representation of the tree to the stream S. The total number of written bytes is returnes in StreamSize. This method is only useful for debugging purposes.

See also

TAVLTree.ConsistencyCheck

Check the consistency of the tree


TAVLTreeNode

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Represents a node in the tree.

Declaration

Source position: avl_tree.pp line 36

type TAVLTreeNode = class
public
Parent: TAVLTreeNode; | Reference to the parent node in the tree.
Left: TAVLTreeNode; | Reference to the left subtree of the current node.
Right: TAVLTreeNode; | Reference to the right subtree of the current node.
Balance: Integer; | Balance of the current node
Data: Pointer; | The data item associated with this node.
procedure Clear; | Clears the node's data
function TreeDepth; | Level of the node in the tree below
end;

Inheritance

TAVLTreeNode

Represents a node in the tree.
|

TObject

Description

TAVLTreeNode represents a single node in the AVL tree. It contains references to the other nodes in the tree, and provides a Data pointer which can be used to store the data, associated with the node.

See also

TAVLTree | AVL tree component
TAVLTreeNode.Data | The data item associated with this node.


TAVLTreeNode


TAVLTreeNode
 | Clear
 | TreeDepth


Clear (TAVLTreeNode)

TreeDepth (TAVLTreeNode)


TAVLTreeNode.Balance

Balance of the current node

Declaration

Source position: avl_tree.pp line 39

public TAVLTreeNode.Balance: Integer;

Description

Balance is the balance of the current node, that is, the Depth of the right subtree minus the depth of the left subtree. If balance is one of -1, 0, 1 then the node is considered balanced.

See also

TreeDepth

Level of the node in the tree below


TAVLTreeNode.Clear

Clears the node's data

Declaration

Source position: avl_tree.pp line 41

public procedure TAVLTreeNode.Clear;

Description

Clear clears all pointers and references in the node. It does not free the memory pointed to by these references.


TAVLTreeNode.Data

The data item associated with this node.

Declaration

Source position: avl_tree.pp line 40

public TAVLTreeNode.Data: Pointer;

Description

Data is the data item associated with this node. It is not freed when the node is freed, the programmer is responsible for freeing the actual data.


TAVLTreeNode.Left

Reference to the left subtree of the current node.

Declaration

Source position: avl_tree.pp line 38

public TAVLTreeNode.Left: TAVLTreeNode;

Description

Left contains a reference to the first node in the left subtree of the current node. It is Nil if there is no left subtree.

See also

Parent | Reference to the parent node in the tree.
Right | Reference to the right subtree of the current node.


TAVLTreeNode.Parent

Reference to the parent node in the tree.

Declaration

Source position: avl_tree.pp line 38

public TAVLTreeNode.Parent: TAVLTreeNode;

Description

Parent contains a reference to the parent node of the current node. It is Nil for the root node.

See also

left | Reference to the left subtree of the current node.
Right | Reference to the right subtree of the current node.


TAVLTreeNode.Right

Reference to the right subtree of the current node.

Declaration

Source position: avl_tree.pp line 38

public TAVLTreeNode.Right: TAVLTreeNode;

Description

Right contains a reference to the first node in the right subtree of the current node. It is Nil if there is no right subtree.

See also

Parent | Reference to the parent node in the tree.
Left | Reference to the left subtree of the current node.


TAVLTreeNode.TreeDepth

Level of the node in the tree below

Declaration

Source position: avl_tree.pp line 42

public function TAVLTreeNode.TreeDepth: Integer;

Function result

The depth of the current node

Description

TreeDepth is the height of the node: this is the largest height of the left or right nodes, plus 1. If no nodes appear below this node (left and Right are Nil), the depth is 1.

See also

Balance

Balance of the current node


TAVLTreeNodeEnumerator

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Enumerator for the TAVLTree tree nodes

Declaration

Source position: avl_tree.pp line 55

type TAVLTreeNodeEnumerator = class
public
constructor Create(); | Create a new instance of TAVLTreeNodeEnumerator
function MoveNext; | Move to next node in the tree.
property Current: TAVLTreeNode; [r] | Current node in the tree
end;

Inheritance

TAVLTreeNodeEnumerator

Enumerator for the TAVLTree tree nodes
|

TObject

Description

TAVLTreeNodeEnumerator is a class which implements the enumerator interface for the TAVLTree. It enumerates all the nodes in the tree.

See also

TAVLTree

AVL tree component


TAVLTreeNodeEnumerator

ro

Current


TAVLTreeNodeEnumerator
 | Create
 | MoveNext


Create (TAVLTreeNodeEnumerator)

MoveNext (TAVLTreeNodeEnumerator)


TAVLTreeNodeEnumerator


TAVLTreeNodeEnumerator.Create

Create a new instance of TAVLTreeNodeEnumerator

Declaration

Source position: avl_tree.pp line 60

public constructor TAVLTreeNodeEnumerator.Create(

  Tree: TAVLTree

);

Arguments

Tree

TAVLTree instance to enumerate

Description

Create creates a new instance of TAVLTreeNodeEnumerator and saves the Tree argument for later use in the enumerator.


TAVLTreeNodeEnumerator.Current

Current node in the tree

Declaration

Source position: avl_tree.pp line 62

public property TAVLTreeNodeEnumerator.Current: TAVLTreeNode
  read FCurrent;

Description

Current is the current node in the enumeration.

See also

TAVLTreeNodeEnumerator.MoveNext

Move to next node in the tree.


TAVLTreeNodeEnumerator.MoveNext

Move to next node in the tree.

Declaration

Source position: avl_tree.pp line 61

public function TAVLTreeNodeEnumerator.MoveNext: Boolean;

Function result

Next node.

Description

MoveNext will return the lowest node in the tree to start with, and for all other calls returns the successor node of the current node with TAVLTree.FindSuccessor.

See also

TAVLTree.FindSuccessor

Find successor to node


TAVLTreeNodeMemManager

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TAVLTreeNode Node memory manager

Declaration

Source position: avl_tree.pp line 118

type TAVLTreeNodeMemManager = class(TBaseAVLTreeNodeManager)
public
procedure DisposeNode(); override; | Return a node to the free list
function NewNode; override; | Create a new TAVLTreeNode instance
property MinimumFreeNode: Integer; [rw] | Minimum amount of free nodes to be kept.
property MaximumFreeNodeRatio: Integer; [rw] | Maximum amount of free nodes in the list
property Count: Integer; [r] | Number of nodes in the list.
procedure Clear; | Frees all unused nodes
constructor Create; | Create a new instance of TAVLTreeNodeMemManager
destructor Destroy; override; |
end;

Inheritance

TAVLTreeNodeMemManager | TAVLTreeNode Node memory manager
|
TBaseAVLTreeNodeManager | Base class for a node memory manager
|
TObject

Description

TAVLTreeNodeMemManager is an internal object used by the avl_tree unit. Normally, no instance of this object should be created: An instance is created by the unit initialization code, and freed when the unit is finalized.

See also

TAVLTreeNode | Represents a node in the tree.
TAVLTree | AVL tree component


TAVLTreeNodeMemManager
 |  | MinimumFreeNode
 |  | MaximumFreeNodeRatio
 | ro | Count
TBaseAVLTreeNodeManager


TAVLTreeNodeMemManager
 | DisposeNode
 | NewNode
 | Clear
 | Create
 | Destroy
TBaseAVLTreeNodeManager
 | DisposeNode
 | NewNode


Clear (TAVLTreeNodeMemManager)

Create (TAVLTreeNodeMemManager)

Destroy (TAVLTreeNodeMemManager)

DisposeNode (TBaseAVLTreeNodeManager)

DisposeNode (TAVLTreeNodeMemManager)

NewNode (TBaseAVLTreeNodeManager)

NewNode (TAVLTreeNodeMemManager)


TAVLTreeNodeMemManager

TBaseAVLTreeNodeManager


TAVLTreeNodeMemManager.Clear

Frees all unused nodes

Declaration

Source position: avl_tree.pp line 135

public procedure TAVLTreeNodeMemManager.Clear;

Description

Clear removes all unused nodes from the list and frees them.

See also

TAVLTreeNodeMemManager.MinimumFreeNode | Minimum amount of free nodes to be kept.
TAVLTreeNodeMemManager.MaximumFreeNodeRatio | Maximum amount of free nodes in the list


TAVLTreeNodeMemManager.Count

Number of nodes in the list.

Declaration

Source position: avl_tree.pp line 134

public property TAVLTreeNodeMemManager.Count: Integer
  read FCount;

Description

Count is the total number of nodes in the list, used or not.

See also

TAVLTreeNodeMemManager.MinimumFreeNode | Minimum amount of free nodes to be kept.
TAVLTreeNodeMemManager.MaximumFreeNodeRatio | Maximum amount of free nodes in the list


TAVLTreeNodeMemManager.Create

Create a new instance of TAVLTreeNodeMemManager

Declaration

Source position: avl_tree.pp line 136

public constructor TAVLTreeNodeMemManager.Create;

Description

Create initializes a new instance of TAVLTreeNodeMemManager.

See also

TAVLTreeNodeMemManager.Destroy


TAVLTreeNodeMemManager.Destroy

Declaration

Source position: avl_tree.pp line 137

public destructor TAVLTreeNodeMemManager.Destroy; override;

Description

Destroy calls clear to clean up the free node list and then calls the inherited destroy.

See also

TAVLTreeNodeMemManager.Create

Create a new instance of TAVLTreeNodeMemManager


TAVLTreeNodeMemManager.DisposeNode

Return a node to the free list

Declaration

Source position: avl_tree.pp line 129

public procedure TAVLTreeNodeMemManager.DisposeNode(

  ANode: TAVLTreeNode

); override;

Arguments

ANode

Node to dispose of

Description

DisposeNode is used to put the node ANode in the list of free nodes, or optionally destroy it if the free list is full. After a call to DisposeNode, ANode must be considered invalid.

See also

TAVLTreeNodeMemManager.NewNode

Create a new TAVLTreeNode instance


TAVLTreeNodeMemManager.MaximumFreeNodeRatio

Maximum amount of free nodes in the list

Declaration

Source position: avl_tree.pp line 132

public property TAVLTreeNodeMemManager.MaximumFreeNodeRatio: Integer
  read FMaxFreeRatio
  write SetMaxFreeRatio;

Description

MaximumFreeNodeRatio is the maximum amount of free nodes that should be kept in the list: if a node is disposed of, then the ratio of the free nodes versus the total amount of nodes is checked, and if it is less than the MaximumFreeNodeRatio ratio but larger than the minimum amount of free nodes, then the node is disposed of instead of added to the free list.

See also

TAVLTreeNodeMemManager.Count | Number of nodes in the list.
TAVLTreeNodeMemManager.MinimumFreeNode | Minimum amount of free nodes to be kept.


TAVLTreeNodeMemManager.MinimumFreeNode

Minimum amount of free nodes to be kept.

Declaration

Source position: avl_tree.pp line 131

public property TAVLTreeNodeMemManager.MinimumFreeNode: Integer
  read FMinFree
  write SetMinFree;

Description

MinimumFreeNode is the minimum amount of nodes that must be kept in the free nodes list.

See also

TAVLTreeNodeMemManager.MaximumFreeNodeRatio

Maximum amount of free nodes in the list


TAVLTreeNodeMemManager.NewNode

Create a new TAVLTreeNode instance

Declaration

Source position: avl_tree.pp line 130

public function TAVLTreeNodeMemManager.NewNode: TAVLTreeNode; override;

Function result

The new node.

Description

NewNode returns a new TAVLTreeNode instance. If there is a node in the free list, itare returned. If no more free nodes are present, a new node is created.

See also

TAVLTreeNodeMemManager.DisposeNode

Return a node to the free list


TBaseAVLTreeNodeManager

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for a node memory manager

Declaration

Source position: avl_tree.pp line 45

type TBaseAVLTreeNodeManager = class
public
procedure DisposeNode(); virtual; abstract; | Called when the AVL tree no longer needs node
function NewNode; virtual; abstract; | Called when the AVL tree needs a new node
end;

Inheritance

TBaseAVLTreeNodeManager

Base class for a node memory manager
|

TObject

Description

TBaseAVLTreeNodeManager is an abstract class from which a descendent can be created that manages creating and disposing of tree nodes (instances of TAVLTreeNode) for a TAVLTree tree instance. No instance of this class should be created, it is a purely abstract class. The default descendant of this class used by an TAVLTree instance is TAVLTreeNodeMemManager.

The TAVLTree.SetNodeManager method can be used to set the node manager that a TAVLTree instance should use.

See also

TAVLTreeNodeMemManager | TAVLTreeNode Node memory manager
TAVLTree.SetNodeManager | Set the node instance manager to use
TAVLTreeNode | Represents a node in the tree.


TBaseAVLTreeNodeManager


TBaseAVLTreeNodeManager
 | DisposeNode
 | NewNode


DisposeNode (TBaseAVLTreeNodeManager)

NewNode (TBaseAVLTreeNodeManager)


TBaseAVLTreeNodeManager.DisposeNode

Called when the AVL tree no longer needs node

Declaration

Source position: avl_tree.pp line 47

public procedure TBaseAVLTreeNodeManager.DisposeNode(

  ANode: TAVLTreeNode

); virtual; abstract;

Arguments

ANode

Node to dispose of

Description

DisposeNode is called by TAVLTree when it no longer needs a TAVLTreeNode instance. The manager may decide to re-use the instance for later use instead of destroying it.

See also

TBaseAVLTreeNodeManager.NewNode | Called when the AVL tree needs a new node
TAVLTree.Delete | Delete a node from the tree
TAVLTreeNode | Represents a node in the tree.


TBaseAVLTreeNodeManager.NewNode

Called when the AVL tree needs a new node

Declaration

Source position: avl_tree.pp line 48

public function TBaseAVLTreeNodeManager.NewNode: TAVLTreeNode; virtual; abstract;

Function result

New node instance

Description

NewNode is called by TAVLTree when it needs a new node in TAVLTree.Add. It must be implemented by descendants to return a new TAVLTreeNode instance.

See also

TBaseAVLTreeNodeManager.DisposeNode | Called when the AVL tree no longer needs node
TAVLTree.Add | Add a new node to the tree
TAVLTreeNode | Represents a node in the tree.


EBase64DecodingException

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised on errors

Declaration

Source position: base64.pp line 87

type EBase64DecodingException = class(Exception) end;

Inheritance

EBase64DecodingException

Exception raised on errors
|

Exception
|

TObject

Description

EBase64DecodeException is raised when the stream contains errors against the encoding format. Whether or not this exception is raised depends on the mode in which the stream is decoded.


EBase64DecodingException
Exception
 | HelpContext
 | Message
TObject


HelpContext (Exception)

Message (Exception)


EBase64DecodingException
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (Exception)

CreateFmt (Exception)

CreateFmtHelp (Exception)

CreateHelp (Exception)

CreateRes (Exception)

CreateResFmt (Exception)

CreateResFmtHelp (Exception)

CreateResHelp (Exception)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


EBase64DecodingException

Exception

TObject


TBase64DecodingStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base64 Decoding stream

Declaration

Source position: base64.pp line 62

type TBase64DecodingStream = class(TOwnerStream)
procedure Create(); | Create a new instance of the TBase64DecodingStream class
public
procedure Reset; | Reset the stream
function Read(); override; | Read and decrypt data from the source stream
function Seek(); override; | Set stream position.
property EOF: Boolean; [r] |
property Mode: TBase64DecodingMode; [rw] | Decoding mode
end;

Inheritance

TBase64DecodingStream

Base64 Decoding stream

|

TOwnerStream
|

TStream
|

TObject

Description

TBase64DecodingStream can be used to read data from a stream (the source stream) that contains Base64 encoded data. The data is read and decoded on-the-fly.

The decoding stream is read-only, and provides a limited forward-seek capability.

See also

TBase64EncodingStream

Base64 encoding stream.


TBase64DecodingStream
 | ro | EOF
 |  | Mode
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


ro | EOF (TBase64DecodingStream)
 | Mode (TBase64DecodingStream)
 | Position (TStream)
 | Size (TStream)
ro |


TBase64DecodingStream
 | Create
 | Reset
 | Read
 | Seek
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBase64DecodingStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

Read (TBase64DecodingStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

Reset (TBase64DecodingStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TBase64DecodingStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TBase64DecodingStream

TOwnerStream

TStream

TObject


TBase64DecodingStream.Create

Create a new instance of the TBase64DecodingStream class

Declaration

Source position: line 0

constructor TBase64DecodingStream.Create(

  ASource: TStream

);

constructor TBase64DecodingStream.Create(

  ASource: TStream;

  AMode: TBase64DecodingMode

);

Arguments

ASource

Source stream from which to read encoded data

Arguments

ASource | Source stream from which to read encoded data
AMode | Encoding mode to be used when encoding

Description

Create creates a new instance of the TBase64DecodingStream class. It stores the source stream ASource for reading the data from.

The optional AMode parameter determines the mode in which the decoding will be done. If omitted, bdmMIME is used.

See also

TBase64EncodingStream.Create | Create a new instance of the TBase64EncodingStream class.
TBase64DecodingMode | Decoding mode for stream


TBase64DecodingStream.EOF

Declaration

Source position: base64.pp line 83

public property TBase64DecodingStream.EOF: Boolean
  read fEOF;


TBase64DecodingStream.Mode

Decoding mode

Declaration

Source position: base64.pp line 84

public property TBase64DecodingStream.Mode: TBase64DecodingMode
  read FMode
  write SetMode;

Description

Mode is the mode in which the stream is read. It can be set when creating the stream or at any time afterwards.

See also

TBase64DecodingStream

Base64 Decoding stream


TBase64DecodingStream.Read

Read and decrypt data from the source stream

Declaration

Source position: base64.pp line 80

public function TBase64DecodingStream.Read(

  var Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Buffer to store data in.
Count | Maxmimum number of bytes to store in buffer.

Function result

Number of bytes stored in buffer.

Description

Read reads encrypted data from the source stream and stores this data in Buffer. At most Count bytes will be stored in the buffer, but more bytes will be read from the source stream: the encoding algorithm multiplies the number of bytes.

The function returns the number of bytes stored in the buffer.

Errors

If an error occurs during the read from the source stream, an exception may occur.

See also

TBase64DecodingStream.Write | Write data to the stream
TBase64DecodingStream.Seek | Set stream position.
TStream.Read


TBase64DecodingStream.Reset

Reset the stream

Declaration

Source position: base64.pp line 78

public procedure TBase64DecodingStream.Reset;

Description

Reset resets the data as if it was again on the start of the decoding stream.

Errors

None.

See also

TBase64DecodingStream.EOF |
TBase64DecodingStream.Read | Read and decrypt data from the source stream


TBase64DecodingStream.Seek

Set stream position.

Declaration

Source position: base64.pp line 81

public function TBase64DecodingStream.Seek(

  Offset: LongInt;

  Origin: Word

):LongInt; override;

Arguments

Offset | Offset, relative to origin.
Origin | Origin of the seek operation.

Function result

New absolute position in the stream.

Description

Seek sets the position of the stream. In the TBase64DecodingStream class, the seek operation is forward only, it does not support backward seeks. The forward seek is emulated by reading and discarding data till the desired position is reached.

For an explanation of the parameters, see TStream.Seek

Errors

In case of an unsupported operation, an EStreamError exception is raised.

See also

TBase64DecodingStream.Read | Read and decrypt data from the source stream
TBase64DecodingStream.Write | Write data to the stream
TBase64EncodingStream.Seek | Position the stream
TStream.Seek


TBase64EncodingStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base64 encoding stream.

Declaration

Source position: base64.pp line 33

type TBase64EncodingStream = class(TOwnerStream)
public
constructor Create(); | Create a new instance of the TBase64EncodingStream class.
destructor Destroy; override; | Remove a TBase64EncodingStream instance from memory
function Flush; | Flush the remaining bytes to the output stream.
function Write(); override; | Write data to the stream.
function Seek(); override; | Position the stream
end;

Inheritance

TBase64EncodingStream

Base64 encoding stream.
|

TOwnerStream
|

TStream
|

TObject

Description

TBase64EncodingStream can be used to encode data using the base64 algorithm. At creation time, a destination stream is specified. Any data written to the TBase64EncodingStream instance will be base64 encoded, and subsequently written to the destination stream.

The TBase64EncodingStream stream is a write-only stream. Obviously it is also not seekable. It is meant to be included in a chain of streams.

By the nature of base64 encoding, when a buffer is written to the stream, the output stream does not yet contain all output: input must be a multiple of 3. In order to be sure that the output contains all encoded bytes, the Flush method can be used. The destructor will automatically call Flush, so all data is written to the destination stream when the decodes is destroyed.

See also

TBase64DecodingStream

Base64 Decoding stream


TBase64EncodingStream
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


TBase64EncodingStream
 | Create
 | Destroy
 | Flush
 | Write
 | Seek
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBase64EncodingStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TBase64EncodingStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Flush (TBase64EncodingStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TBase64EncodingStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (TBase64EncodingStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TBase64EncodingStream

TOwnerStream

TStream

TObject


TBase64EncodingStream.Create

Create a new instance of the TBase64EncodingStream class.

Declaration

Source position: base64.pp line 39

public constructor TBase64EncodingStream.Create(

  ASource: TStream

);

Arguments

ASource

Destination stream for encoded data

Description

Create instantiates a new TBase64EncodingStream class. The ASource stream is stored and used to write the encoded data to.

See also

TBase64EncodingStream.Destroy | Remove a TBase64EncodingStream instance from memory
TBase64DecodingStream.Create | Create a new instance of the TBase64DecodingStream class


TBase64EncodingStream.Destroy

Remove a TBase64EncodingStream instance from memory

Declaration

Source position: base64.pp line 40

public destructor TBase64EncodingStream.Destroy; override;

Description

Destroy flushes any remaining output and then removes the TBase64EncodingStream instance from memory by calling the inherited destructor.

Errors

An exception may be raised if the destination stream no longer exists or is closed.

See also

TBase64EncodingStream.Create

Create a new instance of the TBase64EncodingStream class.


TBase64EncodingStream.Flush

Flush the remaining bytes to the output stream.

Declaration

Source position: base64.pp line 41

public function TBase64EncodingStream.Flush: Boolean;

Function result

True if additional bytes were written.

Description

Flush writes the remaining bytes from the internal encoding buffer to the output stream and pads the output with "=" signs. It returns True if padding was necessary, and False if not.

See also

TBase64EncodingStream.Destroy

Remove a TBase64EncodingStream instance from memory


TBase64EncodingStream.Seek

Position the stream

Declaration

Source position: base64.pp line 43

public function TBase64EncodingStream.Seek(

  Offset: LongInt;

  Origin: Word

):LongInt; override;

Arguments

Offset | Offset from origin
Origin | Origin for the seek operation.

Function result

New position in the stream

Description

Seek always raises an EStreamError exception unless the arguments it received it don't change the current file pointer position. The encryption stream is not seekable.

Errors

An EStreamError error is raised.

See also

TBase64EncodingStream.Read | Read data from the stream
TBase64EncodingStream.Write | Write data to the stream.
TStream.Seek


TBase64EncodingStream.Write

Write data to the stream.

Declaration

Source position: base64.pp line 42

public function TBase64EncodingStream.Write(

  const Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Buffer with data to write
Count | Number of bytes from buffer to write

Function result

Number of bytes from buffer actually used

Description

Write encodes Count bytes from Buffer using the Base64 mechanism, and then writes the encoded data to the destination stream. It returns the number of bytes from Buffer that were actually written. Note that this is not the number of bytes written to the destination stream: the base64 mechanism writes more bytes to the destination stream.

Errors

If there is an error writing to the destination stream, an error may occur.

See also

TBase64EncodingStream.Seek | Position the stream
TBase64EncodingStream.Read | Read data from the stream
TBase64DecodingStream.Write | Write data to the stream
TStream.Write


EBlowFishError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception used to report errors.

Declaration

Source position: blowfish.pp line 48

type EBlowFishError = class(EStreamError) ;

Inheritance

EBlowFishError

Exception used to report errors.
|

EStreamError
|

Exception
|

TObject

Description

EBlowFishError is used by the TBlowFishStream, TBlowFishEncryptStream and TBlowFishDecryptStream classes to report errors.

See also

TBlowFishStream | Parent class for blowfish encryption/decryption streams
TBlowFishEncryptStream | On-the-fly Blowfish encryption stream
TBlowFishDecryptStream | On-the-fly Blowfish decryption stream


EBlowFishError
EStreamError
Exception
 | HelpContext
 | Message
TObject


EBlowFishError
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EBlowFishError

EStreamError

Exception

TObject


TBlowFish

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class implementing blowfish encryption/decription

Declaration

Source position: blowfish.pp line 36

type TBlowFish = class(TObject)
public
constructor Create(); | Create a new instance of the TBlowFish class
procedure Encrypt(); | Encrypt a block
procedure Decrypt(); | Decrypt a block
end;

Inheritance

TBlowFish

Class implementing blowfish encryption/decription
|

TObject

Description

TBlowFish is a simple class that can be used to encrypt/decrypt a single TBFBlock data block with the Encrypt and Decrypt calls. It is used internally by the TBlowFishEnCryptStream and TBlowFishDeCryptStream classes to encrypt or decrypt the actual data.

See also

TBlowFishEnCryptStream | On-the-fly Blowfish encryption stream
TBlowFishDeCryptStream | On-the-fly Blowfish decryption stream


TBlowFish

TObject


TBlowFish
 | Create
 | Encrypt
 | Decrypt
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TBlowFish)

Decrypt (TBlowFish)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Dispatch (TObject)

DispatchStr (TObject)

Encrypt (TBlowFish)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TBlowFish.Create

Create a new instance of the TBlowFish class

Declaration

Source position: blowfish.pp line 42

public constructor TBlowFish.Create(

  Key: TBlowFishKey;

  KeySize: Integer

);

Arguments

Key | Encryption key
KeySize | Actual size of encryption key

Description

Create initializes a new instance of the TBlowFish class: it stores the key Key in the internal data structures so it can be used in later calls to Encrypt and Decrypt.

See also

Encrypt | Encrypt a block
Decrypt | Decrypt a block


TBlowFish.Decrypt

Decrypt a block

Declaration

Source position: blowfish.pp line 44

public procedure TBlowFish.Decrypt(

  var Block: TBFBlock

);

Arguments

Block

Encrypted data to decrypt

Description

ncrypt decrypts the data in Block (always 8 bytes) using the key specified when the TBlowFish instance was created. The data must have been encrypted with the same key and the Encrypt call.

See also

TBlowFishKey | Array to hold blowfish encryption keys
Encrypt | Encrypt a block
Create | Create a new instance of the TBlowFish class


TBlowFish.Encrypt

Encrypt a block

Declaration

Source position: blowfish.pp line 43

public procedure TBlowFish.Encrypt(

  var Block: TBFBlock

);

Arguments

Block

Data to encrypt

Description

Encrypt encrypts the data in Block (always 8 bytes) using the key specified when the TBlowFish instance was created.

See also

TBlowFishKey | Array to hold blowfish encryption keys
Decrypt | Decrypt a block
Create | Create a new instance of the TBlowFish class


TBlowFishDeCryptStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

On-the-fly Blowfish decryption stream

Declaration

Source position: blowfish.pp line 76

type TBlowFishDeCryptStream = class(TBlowFishStream)
public
function Read(); override; | Read data from the stream
function Seek(); override; | Set the stream position.
end;

Inheritance

TBlowFishDeCryptStream | On-the-fly Blowfish decryption stream
|
TBlowFishStream | Parent class for blowfish encryption/decryption streams
|
TOwnerStream
|
TStream
|
TObject

Description

The TBlowFishDecryptStream provides On-the-fly Blowfish decryption: all data that is read from the source stream is decrypted before it is placed in the output buffer. The source stream must be specified when the TBlowFishDecryptStream instance is created. The Decryption key must also be created when the stream instance is created, and must be the same key as the one used when encrypting the data.

This is a read-only stream: it is seekable only in a forward direction, and data can only be read from it, writing is not possible. For writing data so it is encrypted, the TBlowFishEncryptStream stream must be used.

See also

Create | Create a new instance of the TBlowFishStream class
TBlowFishEncryptStream | On-the-fly Blowfish encryption stream


TBlowFishDeCryptStream
TBlowFishStream
 | ro | BlowFish
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


ro | BlowFish (TBlowFishStream)
 | Position (TStream)
 | Size (TStream)
ro |


TBlowFishDeCryptStream
 | Read
 | Seek
TBlowFishStream
 | Create
 | Destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBlowFishStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TBlowFishStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

Read (TBlowFishDeCryptStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TBlowFishDeCryptStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TBlowFishDeCryptStream

TBlowFishStream

TOwnerStream

TStream

TObject


TBlowFishDeCryptStream.Read

Read data from the stream

Declaration

Source position: blowfish.pp line 78

public function TBlowFishDeCryptStream.Read(

  var Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Memory buffer in which to place data
Count | Number of bytes to read from the stream

Function result

Actual number of bytes read

Description

Read reads Count bytes from the source stream, decrypts them using the key provided when the TBlowFishDeCryptStream instance was created, and writes the decrypted data to Buffer

See also

Create | Create a new instance of the TBlowFishStream class
TBlowFishEncryptStream | On-the-fly Blowfish encryption stream


TBlowFishDeCryptStream.Seek

Set the stream position.

Declaration

Source position: blowfish.pp line 79

public function TBlowFishDeCryptStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Offset. Only zero or positive values allowed.
Origin | Origin. Only soFromCurrent allowed.

Function result

New position in the stream

Description

Seek emulates a forward seek by reading and discarding data. The discarded data is lost. Since it is a forward seek, this means that only soFromCurrent can be specified for Origin with a positive (or zero) Offset value. All other values will result in an exception. The function returns the new position in the stream.

Errors

If any other combination of Offset and Origin than the allowed combination is specified, then an EBlowFishError exception will be raised.

See also

Read | Read data from the stream
EBlowFishError | Exception used to report errors.


TBlowFishEncryptStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

On-the-fly Blowfish encryption stream

Declaration

Source position: blowfish.pp line 68

type TBlowFishEncryptStream = class(TBlowFishStream)
public
destructor Destroy; override; | Free the TBlowFishEncryptStream
function Write(); override; | Write data to the stream
function Seek(); override; | Set the position in the stream
procedure Flush; | Flush the encryption buffer
end;

Inheritance

TBlowFishEncryptStream | On-the-fly Blowfish encryption stream
|
TBlowFishStream | Parent class for blowfish encryption/decryption streams
|
TOwnerStream
|
TStream
|
TObject

Description

The TBlowFishEncryptStream provides On-the-fly Blowfish encryption: all data that is written to it is encrypted and then written to a destination stream, which must be specified when the TBlowFishEncryptStream instance is created. The encryption key must also be created when the stream instance is created.

This is a write-only stream: it is not seekable, and data can only be written to it, reading is not possible. For reading encrypted data, the TBlowFishDecryptStream stream must be used.

See also

Create | Create a new instance of the TBlowFishStream class
TBlowFishDecryptStream | On-the-fly Blowfish decryption stream


TBlowFishEncryptStream
TBlowFishStream
 | ro | BlowFish
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


TBlowFishEncryptStream
 | Destroy
 | Write
 | Seek
 | Flush
TBlowFishStream
 | Create
 | Destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBlowFishStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TBlowFishStream)

Destroy (TBlowFishEncryptStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Flush (TBlowFishEncryptStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TBlowFishEncryptStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (TBlowFishEncryptStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TBlowFishEncryptStream

TBlowFishStream

TOwnerStream

TStream

TObject


TBlowFishEncryptStream.Destroy

Free the TBlowFishEncryptStream

Declaration

Source position: blowfish.pp line 70

public destructor TBlowFishEncryptStream.Destroy; override;

Description

Destroy flushes the encryption buffer, and writes it to the destination stream. After that the Inherited destructor is called to clean up the TBlowFishEncryptStream instance.

See also

Flush | Flush the encryption buffer
Create | Create a new instance of the TBlowFishStream class


TBlowFishEncryptStream.Flush

Flush the encryption buffer

Declaration

Source position: blowfish.pp line 73

public procedure TBlowFishEncryptStream.Flush;

Description

Flush writes the remaining data in the encryption buffer to the destination stream.

For efficiency, data is always written 4 bytes at a time, since this is the amount of bytes required by the Blowfish algorithm. If no multiple of 4 was written to the destination stream, the Flush mechanism can be used to write the remaining bytes.

Flush is called automatically when the stream is destroyed, so there is no need to call it after all data was written and the stream is no longer needed.

See also

Write | Write data to the stream
TBFBlock | Internal blowfish data structure


TBlowFishEncryptStream.Seek

Set the position in the stream

Declaration

Source position: blowfish.pp line 72

public function TBlowFishEncryptStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Offset from origin
Origin | Origin for seek operation

Function result

New position in the stream

Description

Read will raise an EBlowFishError exception: TBlowFishEncryptStream is a write-only stream, and cannot be positioned.

Errors

Calling this function always results in an EBlowFishError exception.

See also

TBlowFishEncryptStream.Write

Write data to the stream


TBlowFishEncryptStream.Write

Write data to the stream

Declaration

Source position: blowfish.pp line 71

public function TBlowFishEncryptStream.Write(

  const Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Buffer containing data to be written.
Count | Number of bytes to write.

Function result

Actual number of bytes written

Description

Write will encrypt and write Count bytes from Buffer to the destination stream. The function returns the actual number of bytes written. The data is not encrypted in-place, but placed in a special buffer for encryption.

Data is always written 4 bytes at a time, since this is the amount of bytes required by the Blowfish algorithm. If no multiple of 4 was written to the destination stream, the Flush mechanism can be used to write the remaining bytes.

See also

TBlowFishEncryptStream.Read

Read data from the stream


TBlowFishStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Parent class for blowfish encryption/decryption streams

Declaration

Source position: blowfish.pp line 52

type TBlowFishStream = class(TOwnerStream)
procedure Create(); | Create a new instance of the TBlowFishStream class
public
destructor Destroy; override; | Destroy the TBlowFishStream instance.
property BlowFish: TBlowFish; [r] | Blowfish instance used when encrypting/decrypting
end;

Inheritance

TBlowFishStream

Parent class for blowfish encryption/decryption streams
|

TOwnerStream
|

TStream
|

TObject

Description

TBlowFishStream is an abstract class which is used as a parent class for TBlowFishEncryptStream and TBlowFishDecryptStream. It simply provides a constructor and storage for a TBlowFish instance and for the source or destination stream.

Do not create an instance of TBlowFishStream directly. Instead create one of the descendent classes TBlowFishEncryptStream or TBlowFishDecryptStream.

See also

TBlowFishEncryptStream | On-the-fly Blowfish encryption stream
TBlowFishDecryptStream | On-the-fly Blowfish decryption stream
TBlowFish | Class implementing blowfish encryption/decription


TBlowFishStream
 | ro | BlowFish
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


TBlowFishStream
 | Create
 | Destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBlowFishStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TBlowFishStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TBlowFishStream

TOwnerStream

TStream

TObject


TBlowFishStream.BlowFish

Blowfish instance used when encrypting/decrypting

Declaration

Source position: blowfish.pp line 65

public property TBlowFishStream.BlowFish: TBlowFish
  read FBF;

Description

BlowFish is the TBlowFish instance which is created when the TBlowFishStream class is initialized. Normally it should not be used directly, it's intended for access by the descencent classes TBlowFishEncryptStream and TBlowFishDecryptStream.

See also

TBlowFishEncryptStream | On-the-fly Blowfish encryption stream
TBlowFishDecryptStream | On-the-fly Blowfish decryption stream
TBlowFish | Class implementing blowfish encryption/decription


TBlowFishStream.Create

Create a new instance of the TBlowFishStream class

Declaration

Source position: line 0

constructor TBlowFishStream.Create(

  AKey: TBlowFishKey;

  AKeySize: Byte;

  Dest: TStream

);

constructor TBlowFishStream.Create(

  const KeyPhrase: ;

  Dest: TStream

);

Arguments

AKey | Encryption/Decryption key
AKeySize | Actual key size.
Dest | Destination stream

Arguments

KeyPhrase | String to compute key from
Dest | Destination stream

Description

Create initializes a new instance of TBlowFishStream, and creates an internal instance of TBlowFish using AKey and AKeySize. The Dest stream is stored so the descendent classes can refer to it.

Do not create an instance of TBlowFishStream directly. Instead create one of the descendent classes TBlowFishEncryptStream or TBlowFishDecryptStream.

The overloaded version with the KeyPhrase string argument is used for easy access: it computes the blowfish key from the given string.

See also

TBlowFishEncryptStream | On-the-fly Blowfish encryption stream
TBlowFishDecryptStream | On-the-fly Blowfish decryption stream
TBlowFish | Class implementing blowfish encryption/decription


TBlowFishStream.Destroy

Destroy the TBlowFishStream instance.

Declaration

Source position: blowfish.pp line 64

public destructor TBlowFishStream.Destroy; override;

Description

Destroy cleans up the internal TBlowFish instance.

See also

Create | Create a new instance of the TBlowFishStream class
TBlowFish | Class implementing blowfish encryption/decription


TBufStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Common ancestor for buffered streams

Declaration

Source position: bufstream.pp line 32

type TBufStream = class(TOwnerStream)
procedure Create(); | Create a new TBufStream instance.
public
destructor Destroy; override; | Destroys the TBufStream instance
property Buffer: Pointer; [r] | The current buffer
property Capacity: Integer; [rw] | Current buffer capacity
property BufferPos: Integer; [r] | Current buffer position.
property BufferSize: Integer; [r] | Amount of data in the buffer
end;

Inheritance

TBufStream

Common ancestor for buffered streams
|

TOwnerStream
|

TStream
|

TObject

Description

TBufStream is the common ancestor for the TReadBufStream and TWriteBufStream streams. It completely handles the buffer memory management and position management. An instance of TBufStream should never be created directly. It also keeps the instance of the source stream.

See also

TReadBufStream | Read-only buffered stream.
TWriteBufStream | Write-only buffered stream.


TBufStream
 | ro | Buffer
 |  | Capacity
 | ro | BufferPos
 | ro | BufferSize
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


ro | Buffer (TBufStream)
ro | BufferPos (TBufStream)
ro | BufferSize (TBufStream)
 | Capacity (TBufStream)
 | Position (TStream)
 | Size (TStream)
ro |


TBufStream
 | Create
 | Destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBufStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TBufStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TBufStream

TOwnerStream

TStream

TObject


TBufStream.Buffer

The current buffer

Declaration

Source position: bufstream.pp line 50

public property TBufStream.Buffer: Pointer
  read Fbuffer;

Description

Buffer is a pointer to the actual buffer in use.

See also

TBufStream.Create | Create a new TBufStream instance.
TBufStream.Capacity | Current buffer capacity
TBufStream.BufferSize | Amount of data in the buffer


TBufStream.BufferPos

Current buffer position.

Declaration

Source position: bufstream.pp line 52

public property TBufStream.BufferPos: Integer
  read FBufPos;

Description

BufPos is the current stream position in the buffer. Depending on whether the stream is used for reading or writing, data will be read from this position, or will be written at this position in the buffer.

See also

TBufStream.Create | Create a new TBufStream instance.
TBufStream.Buffer | The current buffer
TBufStream.BufferSize | Amount of data in the buffer
TBufStream.Capacity | Current buffer capacity


TBufStream.BufferSize

Amount of data in the buffer

Declaration

Source position: bufstream.pp line 53

public property TBufStream.BufferSize: Integer
  read FBufSize;

Description

BufferSize is the actual amount of data in the buffer. This is always less than or equal to the Capacity.

See also

TBufStream.Create | Create a new TBufStream instance.
TBufStream.Buffer | The current buffer
TBufStream.BufferPos | Current buffer position.
TBufStream.Capacity | Current buffer capacity


TBufStream.Capacity

Current buffer capacity

Declaration

Source position: bufstream.pp line 51

public property TBufStream.Capacity: Integer
  read FCapacity
  write SetCapacity;

Description

Capacity is the amount of memory the buffer occupies. To change the buffer size, the capacity can be set. Note that the capacity cannot be set to a value that is less than the current buffer size, i.e. the current amount of data in the buffer.

See also

TBufStream.Create | Create a new TBufStream instance.
TBufStream.Buffer | The current buffer
TBufStream.BufferSize | Amount of data in the buffer
TBufStream.BufferPos | Current buffer position.


TBufStream.Create

Create a new TBufStream instance.

Declaration

Source position: line 0

constructor TBufStream.Create(

  ASource: TStream;

  ACapacity: Integer

);

constructor TBufStream.Create(

  ASource: TStream

);

Arguments

ASource | Source stream to buffer data from
ACapacity | Buffer capacity

Arguments

ASource

Source stream to buffer data from

Description

Create creates a new TBufStream instance. A buffer of size ACapacity is allocated, and the ASource source (or destination) stream is stored. If no capacity is specified, then DefaultBufferCapacity is used as the capacity.

An instance of TBufStream should never be instantiated directly. Instead, an instance of TReadBufStream or TWriteBufStream should be created.

Errors

If not enough memory is available for the buffer, then an exception may be raised.

See also

TBufStream.Destroy | Destroys the TBufStream instance
TReadBufStream | Read-only buffered stream.
TWriteBufStream | Write-only buffered stream.


TBufStream.Destroy

Destroys the TBufStream instance

Declaration

Source position: bufstream.pp line 49

public destructor TBufStream.Destroy; override;

Description

Destroy destroys the instance of TBufStream. It flushes the buffer, deallocates it, and then destroys the TBufStream instance.

See also

TBufStream.Create | Create a new TBufStream instance.
TReadBufStream | Read-only buffered stream.
TWriteBufStream | Write-only buffered stream.


TReadBufStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Read-only buffered stream.

Declaration

Source position: bufstream.pp line 58

type TReadBufStream = class(TBufStream)
public
function Seek(); override; | Set location in the buffer
function Read(); override; | Reads data from the stream
end;

Inheritance

TReadBufStream | Read-only buffered stream.
|
TBufStream | Common ancestor for buffered streams
|
TOwnerStream
|
TStream
|
TObject

Description

TReadBufStream is a read-only buffered stream. It implements the needed methods to read data from the buffer and fill the buffer with additional data when needed.

The stream provides limited forward-seek possibilities.

See also

TBufStream | Common ancestor for buffered streams
TWriteBufStream | Write-only buffered stream.


TReadBufStream
TBufStream
 | ro | Buffer
 |  | Capacity
 | ro | BufferPos
 | ro | BufferSize
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


TReadBufStream
 | Seek
 | Read
TBufStream
 | Create
 | Destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBufStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TBufStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

Read (TReadBufStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TReadBufStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TReadBufStream

TBufStream

TOwnerStream

TStream

TObject


TReadBufStream.Read

Reads data from the stream

Declaration

Source position: bufstream.pp line 61

public function TReadBufStream.Read(

  var ABuffer;

  ACount: LongInt

):Integer; override;

Arguments

ABuffer | Buffer to place read data in
ACount | Number of bytes to read

Function result

Number of bytes read

Description

Read reads at most ACount bytes from the stream and places them in Buffer. The number of actually read bytes is returned.

TReadBufStream first reads whatever data is still available in the buffer, and then refills the buffer, after which it continues to read data from the buffer. This is repeated untill ACount bytes are read, or no more data is available.

See also

TReadBufStream.Seek | Set location in the buffer
TReadBufStream.Read | Reads data from the stream


TReadBufStream.Seek

Set location in the buffer

Declaration

Source position: bufstream.pp line 60

public function TReadBufStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Offset (in bytes) of origin
Origin | Origin of seek operation

Function result

New position

Description

Seek sets the location in the buffer. Currently, only a forward seek is allowed. It is emulated by reading and discarding data. For an explanation of the parameters, see TStream.Seek"

The seek method needs enhancement to enable it to do a full-featured seek. This may be implemented in a future release of Free Pascal.

Errors

In case an illegal seek operation is attempted, an exception is raised.

See also

TWriteBufStream.Seek | Set stream position.
TReadBufStream.Read | Reads data from the stream
TReadBufStream.Write | Writes data to the stream


TWriteBufStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Write-only buffered stream.

Declaration

Source position: bufstream.pp line 66

type TWriteBufStream = class(TBufStream)
public
destructor Destroy; override; | Remove the TWriteBufStream instance from memory
function Seek(); override; | Set stream position.
function Write(); override; | Write data to the stream
end;

Inheritance

TWriteBufStream | Write-only buffered stream.
|
TBufStream | Common ancestor for buffered streams
|
TOwnerStream
|
TStream
|
TObject

Description

TWriteBufStream is a write-only buffered stream. It implements the needed methods to write data to the buffer and flush the buffer (i.e., write its contents to the source stream) when needed.

See also

TBufStream | Common ancestor for buffered streams
TReadBufStream | Read-only buffered stream.


TWriteBufStream
TBufStream
 | ro | Buffer
 |  | Capacity
 | ro | BufferPos
 | ro | BufferSize
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


TWriteBufStream
 | Destroy
 | Seek
 | Write
TBufStream
 | Create
 | Destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TBufStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TBufStream)

Destroy (TWriteBufStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TWriteBufStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (TWriteBufStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TWriteBufStream

TBufStream

TOwnerStream

TStream

TObject


TWriteBufStream.Destroy

Remove the TWriteBufStream instance from memory

Declaration

Source position: bufstream.pp line 68

public destructor TWriteBufStream.Destroy; override;

Description

Destroy flushes the buffer and then calls the inherited Destroy.

Errors

If an error occurs during flushing of the buffer, an exception may be raised.

See also

Create | Create a new TBufStream instance.
TBufStream.Destroy | Destroys the TBufStream instance


TWriteBufStream.Seek

Set stream position.

Declaration

Source position: bufstream.pp line 69

public function TWriteBufStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Offset (in bytes) of origin
Origin | Origin of seek operation

Function result

New position

Description

Seek always raises an EStreamError exception, except when the seek operation would not alter the current position.

A later implementation may perform a proper seek operation by flushing the buffer and doing a seek on the source stream.

See also

TWriteBufStream.Write | Write data to the stream
TWriteBufStream.Read | Read data from the stream
TReadBufStream.Seek | Set location in the buffer


TWriteBufStream.Write

Write data to the stream

Declaration

Source position: bufstream.pp line 70

public function TWriteBufStream.Write(

  const ABuffer;

  ACount: LongInt

):Integer; override;

Arguments

ABuffer | Buffer containing data to write
ACount | Number of bytes to write to stream

Function result

Number of bytes written

Description

Write writes at most ACount bytes from ABuffer to the stream. The data is written to the internal buffer first. As soon as the internal buffer is full, it is flushed to the destination stream, and the internal buffer is filled again. This process continues till all data is written (or an error occurs).

Errors

An exception may occur if the destination stream has problems writing.

See also

TWriteBufStream.Seek | Set stream position.
TWriteBufStream.Read | Read data from the stream
TReadBufStream.Write | Writes data to the stream


ECacheError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception class used in the cachecls unit.

Declaration

Source position: cachecls.pp line 32

type ECacheError = class(Exception) ;

Inheritance

ECacheError

Exception class used in the cachecls unit.
|

Exception
|

TObject


ECacheError
Exception
 | HelpContext
 | Message
TObject


ECacheError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


ECacheError

Exception

TObject


TCache

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Cache class

Declaration

Source position: cachecls.pp line 63

type TCache = class
public
constructor Create(); | Create a new cache class.
destructor Destroy; override; | Free the TCache class from memory
function Add(); | Add a data element to the list.
function AddNew(); | Add a new item to the list.
function FindSlot(); | Find data pointer in the list
function IndexOf(); | Return index of a data pointer in the list.
procedure Remove(); | Remove a data item from the list.
property Data: Pointer; [rw] | Indexed access to data items
property MRUSlot: PCacheSlot; [rw] | Most recent item slot.
property LRUSlot: PCacheSlot; [r] | Last used item
property SlotCount: Integer; [rw] | Number of slots in the list
property Slots: PCacheSlot; [r] | Indexed array to the slots
property OnIsDataEqual: TOnIsDataEqual; [rw] | Event to compare 2 items.
property OnFreeSlot: TOnFreeSlot; [rw] | Event called when a slot is freed
end;

Inheritance

TCache

Cache class
|

TObject

Description

TCache implements a cache class: it is a list-like class, but which uses a counting mechanism, and keeps a Most-Recent-Used list; this list represents the 'cache'. The list is internally kept as a doubly-linked list.

The Data property offers indexed access to the array of items. When accessing the array through this property, the MRUSlot property is updated.


TCache
 |  | Data
 |  | MRUSlot
 | ro | LRUSlot
 |  | SlotCount
 | ro | Slots


ro | LRUSlot (TCache)
 | MRUSlot (TCache)
 | SlotCount (TCache)
ro |


TCache
 | Create
 | Destroy
 | Add
 | AddNew
 | FindSlot
 | IndexOf
 | Remove


Add (TCache)

AddNew (TCache)

Create (TCache)

Destroy (TCache)

FindSlot (TCache)

IndexOf (TCache)

Remove (TCache)


TCache
 | OnIsDataEqual
 | OnFreeSlot


OnFreeSlot (TCache)

OnIsDataEqual (TCache)


TCache.Add

Add a data element to the list.

Declaration

Source position: cachecls.pp line 81

public function TCache.Add(

  AData: Pointer

):Integer;

Arguments

AData

Data pointer to add to the cache.

Function result

Index at which item was added.

Description

Add checks whether AData is already in the list. If so, the item is added to the top of the MRU list. If the item is not yet in the list, then the item is added to the list and placed at the top of the MRU list using the AddNew call.

The function returns the index at which the item was added.

If the maximum number of slots is reached, and a new item is being added, the least used item is dropped from the list.

See also

TCache.AddNew | Add a new item to the list.
TCache.FindSlot | Find data pointer in the list
TCache.IndexOf | Return index of a data pointer in the list.
TCache.Data | Indexed access to data items
TCache.MRUSlot | Most recent item slot.


TCache.AddNew

Add a new item to the list.

Declaration

Source position: cachecls.pp line 82

public function TCache.AddNew(

  AData: Pointer

):Integer;

Arguments

AData

Data pointer to add to the list

Function result

Position at which item is added to the list

Description

AddNew adds a new item to the list: in difference with the Add call, no checking is performed to see whether the item is already in the list.

The function returns the index at which the item was added.

If the maximum number of slots is reached, and a new item is being added, the least used item is dropped from the list.

See also

TCache.Add | Add a data element to the list.
TCache.FindSlot | Find data pointer in the list
TCache.IndexOf | Return index of a data pointer in the list.
TCache.Data | Indexed access to data items
TCache.MRUSlot | Most recent item slot.


TCache.Create

Create a new cache class.

Declaration

Source position: cachecls.pp line 78

public constructor TCache.Create(

  ASlotCount: Integer

);

Arguments

ASlotCount

Initial slot count

Description

Create instantiates a new instance of TCache. It allocates room for ASlotCount entries in the list. The number of slots can be increased later.

See also

TCache.SlotCount

Number of slots in the list


TCache.Data

Indexed access to data items

Declaration

Source position: cachecls.pp line 88

public property TCache.Data: Pointer
  read GetData
  write SetData;

Description

Data offers index-based access to the data pointers in the cache. By accessing an item in the list in this manner, the item is moved to the front of the MRU list, i.e. MRUSlot will point to the accessed item. The access is both read and write.

The index is zero-based and can maximally be SlotCount-1. Providing an invalid index will result in an exception.

See also

TCache.MRUSlot

Most recent item slot.


TCache.Destroy

Free the TCache class from memory

Declaration

Source position: cachecls.pp line 79

public destructor TCache.Destroy; override;

Description

Destroy cleans up the array for the elements, and calls the inherited Destroy. The elements in the array are not freed by this action.

See also

TCache.Create

Create a new cache class.


TCache.FindSlot

Find data pointer in the list

Declaration

Source position: cachecls.pp line 83

public function TCache.FindSlot(

  AData: Pointer

):PCacheSlot;

Arguments

AData

Data pointer to look for.

Function result

Slot which contains AData

Description

FindSlot checks all items in the list, and returns the slot which contains a data pointer that matches the pointer AData.

If no item with data pointer that matches AData is found, Nil is returned.

For this function to work correctly, the OnIsDataEqual event must be set.

Errors

If OnIsDataEqual is not set, an exception wil be raised.

See also

TCache.IndexOf | Return index of a data pointer in the list.
TCache.Add | Add a data element to the list.
TCache.OnIsDataEqual | Event to compare 2 items.


TCache.IndexOf

Return index of a data pointer in the list.

Declaration

Source position: cachecls.pp line 84

public function TCache.IndexOf(

  AData: Pointer

):Integer;

Arguments

AData

Data pointer to search for.

Function result

Index of item that matches AData

Description

IndexOF searches in the list for a slot with data pointer that matches AData and returns the index of the slot.

If no item with data pointer that matches AData is found, -1 is returned.

For this function to work correctly, the OnIsDataEqual event must be set.

Errors

If OnIsDataEqual is not set, an exception wil be raised.

See also

TCache.FindSlot | Find data pointer in the list
TCache.Add | Add a data element to the list.
TCache.OnIsDataEqual | Event to compare 2 items.


TCache.LRUSlot

Last used item

Declaration

Source position: cachecls.pp line 90

public property TCache.LRUSlot: PCacheSlot
  read FLRUSlot;

Description

LRUSlot points to the least recent used slot. It is the last item in the chain of slots.

See also

TCache.Add | Add a data element to the list.
TCache.AddNew | Add a new item to the list.
TCache.Data | Indexed access to data items
TCache.MRUSlot | Most recent item slot.


TCache.MRUSlot

Most recent item slot.

Declaration

Source position: cachecls.pp line 89

public property TCache.MRUSlot: PCacheSlot
  read FMRUSlot
  write SetMRUSlot;

Description

MRUSlot points to the most recent used slot. The most recent used slot is updated when the list is accessed through the Data property, or when an item is added to the list with Add or AddNew

See also

TCache.Add | Add a data element to the list.
TCache.AddNew | Add a new item to the list.
TCache.Data | Indexed access to data items
TCache.LRUSlot | Last used item


TCache.OnFreeSlot

Event called when a slot is freed

Declaration

Source position: cachecls.pp line 98

public property TCache.OnFreeSlot: TOnFreeSlot
  read FOnFreeSlot
  write FOnFreeSlot;

Description

OnFreeSlot is called when an item needs to be freed, i.e. when a new item is added to a full list, and the least recent used item needs to be dropped from the list.

The cache class instance and the index of the item to be removed are passed to the callback.

See also

TCache.Add | Add a data element to the list.
TCache.AddNew | Add a new item to the list.
TCache.SlotCount | Number of slots in the list


TCache.OnIsDataEqual

Event to compare 2 items.

Declaration

Source position: cachecls.pp line 94

public property TCache.OnIsDataEqual: TOnIsDataEqual
  read FOnIsDataEqual
  write FOnIsDataEqual;

Description

OnIsDataEqual is used by FindSlot and IndexOf to compare items when looking for a particular item. These functions are called by the Add method. Failing to set this event will result in an exception. The function should return True if the 2 data pointers should be considered equal.

See also

TCache.FindSlot | Find data pointer in the list
TCache.IndexOf | Return index of a data pointer in the list.
TCache.Add | Add a data element to the list.


TCache.Remove

Remove a data item from the list.

Declaration

Source position: cachecls.pp line 85

public procedure TCache.Remove(

  AData: Pointer

);

Arguments

AData

Data pointer to remove

Description

Remove searches the slot which matches AData and if it is found, sets the data pointer to Nil, thus effectively removing the pointer from the list.

Errors

None.

See also

TCache.FindSlot

Find data pointer in the list


TCache.SlotCount

Number of slots in the list

Declaration

Source position: cachecls.pp line 91

public property TCache.SlotCount: Integer
  read FSlotCount
  write SetSlotCount;

Description

SlotCount is the number of slots in the list. Its initial value is set when the TCache instance is created, but this can be changed at any time. If items are added to the list and the list is full, then the number of slots is not increased, but the least used item is dropped from the list. In that case OnFreeSlot is called.

See also

TCache.Create | Create a new cache class.
TCache.Data | Indexed access to data items
TCache.Slots | Indexed array to the slots


TCache.Slots

Indexed array to the slots

Declaration

Source position: cachecls.pp line 92

public property TCache.Slots: PCacheSlot
  read GetSlot;

Description

Slots provides index-based access to the TCacheSlot records in the list. Accessing the records directly does not change their position in the MRU list.

The index is zero-based and can maximally be SlotCount-1. Providing an invalid index will result in an exception.

See also

TCache.Data | Indexed access to data items
TCache.SlotCount | Number of slots in the list


TCacheSlot

Record representing 1 item in the cache list.

Declaration

Source position: cachecls.pp line 45

type TCacheSlot = record
Prev: PCacheSlot; | Pointer to previous element in the list.
Next: PCacheSlot; | Pointer to next element in the list.
Data: Pointer; | Data pointer for this item.
Index: Integer; | Index in the list.
end;

Description

TCacheSlot is internally used by the TCache class. It represents 1 element in the linked list.

See also

TCache | Cache class
PCacheSlot | Pointer to TCacheSlot record.


TCacheSlotArray

Array of TCacheSlot

Declaration

Source position: cachecls.pp line 52

type TCacheSlotArray = array [0..MaxIntdivSizeOf(TCacheSlot)-1] of TCacheSlot;

Description

TCacheSlotArray is an array of TCacheSlot items. Do not use TCacheSlotArray directly, instead, use PCacheSlotArray and allocate memory dynamically.

See also

TCacheSlot | Record representing 1 item in the cache list.
PCacheSlotArray | Pointer to TCacheSlotArray array


EDuplicate

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised when a key is stored twice in a hash table.

Declaration

Source position: contnrs.pp line 476

type EDuplicate = class(Exception) ;

Inheritance

EDuplicate

Exception raised when a key is stored twice in a hash table.
|

Exception
|

TObject

See also

TFPCustomHashTable.Add

Add a new key and its associated data to the hash.


EDuplicate
Exception
 | HelpContext
 | Message
TObject


EDuplicate
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EDuplicate

Exception

TObject


EKeyNotFound

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised when a key is not found.

Declaration

Source position: contnrs.pp line 477

type EKeyNotFound = class(Exception) ;

Inheritance

EKeyNotFound

Exception raised when a key is not found.
|

Exception
|

TObject

See also

TFPCustomHashTable.Delete

Delete a key from the hash list.


EKeyNotFound
Exception
 | HelpContext
 | Message
TObject


EKeyNotFound
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EKeyNotFound

Exception

TObject


TBucketList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Default bucket list implementation.

Declaration

Source position: contnrs.pp line 546

type TBucketList = class(TCustomBucketList)

public

  constructor Create();

Create a new TBucketList instance.

end;

Inheritance

TBucketList | Default bucket list implementation.
|
TCustomBucketList | Custom bucket list class
|
TObject

Description

TBucketList is a descendent of TCustomBucketList which allows to specify a bucket count which is a multiple of 2, up to 256 buckets. The size is passed to the constructor and cannot be changed in the lifetime of the bucket list instance.

The buckets for an item is determined by looking at the last bits of the item pointer: For 2 buckets, the last bit is examined, for 4 buckets, the last 2 bits are taken and so on. The algorithm takes into account the average granularity (4) of heap pointers.

See also

TCustomBucketList

Custom bucket list class


TBucketList

TCustomBucketList

Data

TObject


Data (TCustomBucketList)


TBucketList
 | Create
TCustomBucketList
 | Destroy
 | Clear
 | Add
 | Assign
 | Exists
 | Find
 | ForEach
 | Remove
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCustomBucketList)

AfterConstruction (TObject)

Assign (TCustomBucketList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCustomBucketList)

Create (TObject)

Create (TBucketList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TCustomBucketList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Exists (TCustomBucketList)

FieldAddress (TObject)

Find (TCustomBucketList)

ForEach (TCustomBucketList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Remove (TCustomBucketList)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TBucketList

TCustomBucketList

TObject


TBucketList.Create

Create a new TBucketList instance.

Declaration

Source position: contnrs.pp line 552

public constructor TBucketList.Create(

  ABuckets: TBucketListSizes = bl16

);

Arguments

ABuckets

Number of buckets to create

Description

Create instantiates a new bucketlist instance with a number of buckets determined by ABuckets. After creation, the number of buckets can no longer be changed.

Errors

If not enough memory is available to create the instance, an exception may be raised.

See also

TBucketListSizes

Enumerated type to indicate bucket list size


TBucketListSizes

Enumerated type to indicate bucket list size

Declaration

Source position: contnrs.pp line 542

type TBucketListSizes = (
bl2, | List with 2 buckets
bl4, | List with 4 buckets
bl8, | List with 8 buckets
bl16, | List with 16 buckets
bl32, | List with 32 buckets
bl64, | List with 64 buckets
bl128, | List with 128 buckets
bl256 | List with 256 buckets
);

Description

TBucketListSizes is used to set the bucket list size: It specified the number of buckets created by TBucketList.

See also

TBucketList | Default bucket list implementation.
TBucketList.Create | Create a new TBucketList instance.


TClassList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

List of classes.

Declaration

Source position: contnrs.pp line 114

type TClassList = class(TList)
public
function Add(); | Add a new class pointer to the list.
function Extract(); | Extract a class pointer from the list.
function Remove(); | Remove a class pointer from the list.
function IndexOf(); | Search for a class pointer in the list.
function First; | Return first non-nil class pointer
function Last; | Return last non-Nil class pointer
procedure Insert(); | Insert a new class pointer in the list.
property Items: TClass; default; [rw] | Index based access to class pointers.
end;

Inheritance

TClassList

List of classes.
|

TList
|

TObject

Description

TClassList is a Tlist descendent which stores class references instead of pointers. It introduces no new behaviour other than ensuring all stored pointers are class pointers.

The OwnsObjects property as found in TComponentList and TObjectList is not implemented as there are no actual instances.

See also

#rtl.classes.tlist
TComponentList | List to manage component instances.
TObjectList | List to manage object instances.


TClassList
 |  | Items
TList
 |  | Capacity
 |  | Count
 |  | Items
 | ro | List
TObject


 | Capacity (TList)
 | Count (TList)
 | Items (TList)
 | Items (TClassList)
ro |


TClassList
 | Add
 | Extract
 | Remove
 | IndexOf
 | First
 | Last
 | Insert
TList
 | CopyMove
 | MergeMove
 | DoCopy
 | DoSrcUnique
 | DoAnd
 | DoDestUnique
 | DoOr
 | DoXOr
 | Get
 | Grow
 | Put
 | Notify
 | SetCapacity
 | GetCapacity
 | SetCount
 | GetCount
 | GetList
 | Create
 | Destroy
 | AddList
 | Add
 | Clear
 | Delete
 | Error
 | Exchange
 | Expand
 | Extract
 | First
 | GetEnumerator
 | IndexOf
 | Insert
 | Last
 | Move
 | Assign
 | Remove
 | Pack
 | Sort
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TList)

Add (TClassList)

AddList (TList)

AfterConstruction (TObject)

Assign (TList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TList)

CopyMove (TList)

Create (TObject)

Create (TList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TList)

Destroy (TObject)

Destroy (TList)

Dispatch (TObject)

DispatchStr (TObject)

DoAnd (TList)

DoCopy (TList)

DoDestUnique (TList)

DoOr (TList)

DoSrcUnique (TList)

DoXOr (TList)

Equals (TObject)

Error (TList)

Exchange (TList)

Expand (TList)

Extract (TList)

Extract (TClassList)

FieldAddress (TObject)

First (TList)

First (TClassList)

Free (TObject)

FreeInstance (TObject)

Get (TList)

GetCapacity (TList)

GetCount (TList)

GetEnumerator (TList)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetList (TList)

Grow (TList)

IndexOf (TList)

IndexOf (TClassList)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TList)

Insert (TClassList)

InstanceSize (TObject)

Last (TList)

Last (TClassList)

MergeMove (TList)

MethodAddress (TObject)

MethodName (TObject)

Move (TList)

newinstance (TObject)

Notify (TList)

Pack (TList)

Put (TList)

Remove (TList)

Remove (TClassList)

SafeCallException (TObject)

SetCapacity (TList)

SetCount (TList)

Sort (TList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TClassList

TList

TObject


TClassList.Add

Add a new class pointer to the list.

Declaration

Source position: contnrs.pp line 119

public function TClassList.Add(

  AClass: TClass

):Integer;

Arguments

AClass

Class pointer to add.

Function result

Index at which the class pointer was added.

Description

Add adds AClass to the list, and returns the position at which it was added. It simply overrides the TList bevahiour, and introduces no new functionality.

Errors

If not enough memory is available to expand the list, an exception may be raised.

See also

TClassList.Extract

Extract a class pointer from the list.

#rtl.classes.tlist.add


TClassList.Extract

Extract a class pointer from the list.

Declaration

Source position: contnrs.pp line 120

public function TClassList.Extract(

  Item: TClass

):TClass;

Arguments

Item

Class pointer to extract from the list

Function result

The extracted class pointer or Nil if none was found.

Description

Extract extracts a class pointer Item from the list, if it is present in the list. It returns the extracted class pointer, or Nil if the class pointer was not present in the list. It simply overrides the implementation in TList so it accepts a class pointer instead of a simple pointer. No new behaviour is introduced.

Errors

None.

See also

TClassList.Remove

Remove a class pointer from the list.

#rtl.classes.Tlist.Extract


TClassList.First

Return first non-nil class pointer

Declaration

Source position: contnrs.pp line 123

public function TClassList.First: TClass;

Function result

The first non-Nil class pointer in the list.

Description

First returns a reference to the first non-Nil class pointer in the list. If no non-Nil element is found, Nil is returned.

Errors

None.

See also

TClassList.Last

Return last non-Nil class pointer

TClassList.Pack


TClassList.IndexOf

Search for a class pointer in the list.

Declaration

Source position: contnrs.pp line 122

public function TClassList.IndexOf(

  AClass: TClass

):Integer;

Arguments

AClass

Class pointer to search for

Function result

Position of the class pointer, or -1 if not found.

Description

IndexOf searches for AClass in the list, and returns it's position if it was found, or -1 if it was not found in the list.

Errors

None.

See also

#rtl.classes.tlist.indexof


TClassList.Insert

Insert a new class pointer in the list.

Declaration

Source position: contnrs.pp line 125

public procedure TClassList.Insert(

  Index: Integer;

  AClass: TClass

);

Arguments

Index | Position to insert class pointer at.
AClass | Class pointer to insert.

Description

Insert inserts a class pointer in the list at position Index. It simply overrides the parent implementation so it only accepts class pointers. It introduces no new behaviour.

Errors

None.

See also

#rtl.classes.TList.Insert
TClassList.Add | Add a new class pointer to the list.
TClassList.Remove | Remove a class pointer from the list.


TClassList.Items

Index based access to class pointers.

Declaration

Source position: contnrs.pp line 126

public property TClassList.Items: TClass
  read GetItems
  write SetItems;
  default;

Description

Items provides index-based access to the class pointers in the list. TClassList overrides the default Items implementation of TList so it returns class pointers instead of pointers.

See also

#rtl.classes.TList.Items

#rtl.classes.TList.Count


TClassList.Last

Return last non-Nil class pointer

Declaration

Source position: contnrs.pp line 124

public function TClassList.Last: TClass;

Function result

The last non-Nil class pointer in the list.

Description

Last returns a reference to the last non-Nil class pointer in the list. If no non-Nil element is found, Nil is returned.

Errors

None.

See also

TClassList.First

Return first non-nil class pointer

TClassList.Pack


TClassList.Remove

Remove a class pointer from the list.

Declaration

Source position: contnrs.pp line 121

public function TClassList.Remove(

  AClass: TClass

):Integer;

Arguments

AClass

Class pointer to remove from the list.

Function result

Index of the removed item

Description

Remove removes a class pointer Item from the list, if it is present in the list. It returns the index of the removed class pointer, or -1 if the class pointer was not present in the list. It simply overrides the implementation in TList so it accepts a class pointer instead of a simple pointer. No new behaviour is introduced.

Errors

None.

See also

TClassList.Extract

Extract a class pointer from the list.

#rtl.classes.Tlist.Remove


TComponentList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

List to manage component instances.

Declaration

Source position: contnrs.pp line 94

type TComponentList = class(TObjectList)
public
destructor Destroy; override; | Destroys the instance
function Add(); | Add a component to the list.
function Extract(); | Remove a component from the list without destroying it.
function Remove(); | Remove a component from the list, possibly destroying it.
function IndexOf(); | Search for an instance in the list
function First; | First non-nil instance in the list.
function Last; | Last non-nil instance in the list.
procedure Insert(); | Insert a new component in the list
property Items: TComponent; default; [rw] | Index-based access to the elements in the list.
end;

Inheritance

TComponentList | List to manage component instances.
|
TObjectList | List to manage object instances.
|
TList
|
TObject

Description

TComponentList is a TObjectList descendent which has as the default array property TComponents instead of objects. It overrides some methods so only components can be added.

In difference with TObjectList, TComponentList removes any TComponent from the list if the TComponent instance was freed externally. It uses the FreeNotification mechanism for this.

See also

#rtl.classes.TList
TFPObjectList | TFPList descendent which manages objects.
TObjectList | List to manage object instances.
TClassList | List of classes.


TComponentList
 |  | Items
TObjectList
 |  | OwnsObjects
 |  | Items
TList
 |  | Capacity
 |  | Count
 |  | Items
 | ro | List
TObject


 | Capacity (TList)
 | Count (TList)
 | Items (TList)
 | Items (TObjectList)
 | Items (TComponentList)
ro |


TComponentList
 | Destroy
 | Add
 | Extract
 | Remove
 | IndexOf
 | First
 | Last
 | Insert
TObjectList
 | create
 | Add
 | Extract
 | Remove
 | IndexOf
 | FindInstanceOf
 | Insert
 | First
 | Last
TList
 | CopyMove
 | MergeMove
 | DoCopy
 | DoSrcUnique
 | DoAnd
 | DoDestUnique
 | DoOr
 | DoXOr
 | Get
 | Grow
 | Put
 | Notify
 | SetCapacity
 | GetCapacity
 | SetCount
 | GetCount
 | GetList
 | Create
 | Destroy
 | AddList
 | Add
 | Clear
 | Delete
 | Error
 | Exchange
 | Expand
 | Extract
 | First
 | GetEnumerator
 | IndexOf
 | Insert
 | Last
 | Move
 | Assign
 | Remove
 | Pack
 | Sort
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TList)

Add (TObjectList)

Add (TComponentList)

AddList (TList)

AfterConstruction (TObject)

Assign (TList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TList)

CopyMove (TList)

Create (TObject)

Create (TList)

create (TObjectList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TList)

Destroy (TObject)

Destroy (TList)

Destroy (TComponentList)

Dispatch (TObject)

DispatchStr (TObject)

DoAnd (TList)

DoCopy (TList)

DoDestUnique (TList)

DoOr (TList)

DoSrcUnique (TList)

DoXOr (TList)

Equals (TObject)

Error (TList)

Exchange (TList)

Expand (TList)

Extract (TList)

Extract (TObjectList)

Extract (TComponentList)

FieldAddress (TObject)

FindInstanceOf (TObjectList)

First (TList)

First (TObjectList)

First (TComponentList)

Free (TObject)

FreeInstance (TObject)

Get (TList)

GetCapacity (TList)

GetCount (TList)

GetEnumerator (TList)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetList (TList)

Grow (TList)

IndexOf (TList)

IndexOf (TObjectList)

IndexOf (TComponentList)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TList)

Insert (TObjectList)

Insert (TComponentList)

InstanceSize (TObject)

Last (TList)

Last (TObjectList)

Last (TComponentList)

MergeMove (TList)

MethodAddress (TObject)

MethodName (TObject)

Move (TList)

newinstance (TObject)

Notify (TList)

Pack (TList)

Put (TList)

Remove (TList)

Remove (TObjectList)

Remove (TComponentList)

SafeCallException (TObject)

SetCapacity (TList)

SetCount (TList)

Sort (TList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TComponentList

TObjectList

TList

TObject


TComponentList.Add

Add a component to the list.

Declaration

Source position: contnrs.pp line 104

public function TComponentList.Add(

  AComponent: TComponent

):Integer;

Arguments

AComponent

The component to add.

Function result

Index at which the component was added.

Description

Add overrides the Add operation of it's ancestors, so it only accepts TComponent instances. It introduces no new behaviour.

The function returns the index at which the component was added.

Errors

If not enough memory is available to expand the list, an exception may be raised.

See also

TObjectList.Add

Add an object to the list.


TComponentList.Destroy

Destroys the instance

Declaration

Source position: contnrs.pp line 103

public destructor TComponentList.Destroy; override;

Description

Destroy unhooks the free notification handler and then calls the inherited destroy to clean up the TComponentList instance.

Errors

None.

See also

TObjectList

List to manage object instances.

#rtl.classes.TComponent


TComponentList.Extract

Remove a component from the list without destroying it.

Declaration

Source position: contnrs.pp line 105

public function TComponentList.Extract(

  Item: TComponent

):TComponent;

Arguments

Item

The component to extract.

Function result

The extracted component, or Nil if none was found.

Description

Extract removes a component (Item) from the list, without destroying it. It overrides the implementation of TObjectList so only TComponent descendents can be extracted. It introduces no new behaviour.

Extract returns the instance that was extracted, or Nil if no instance was found.

See also

TComponentList.Remove | Remove a component from the list, possibly destroying it.
TObjectList.Extract | Extract an object from the list.


TComponentList.First

First non-nil instance in the list.

Declaration

Source position: contnrs.pp line 108

public function TComponentList.First: TComponent;

Function result

The first non-nil instance in the list, or Nil

Description

First overrides the implementation of it's ancestors to return the first non-nil instance of TComponent in the list. If no non-nil instance is found, Nil is returned.

Errors

None.

See also

TComponentList.Last | Last non-nil instance in the list.
TObjectList.First | Return the first non-nil object in the list


TComponentList.IndexOf

Search for an instance in the list

Declaration

Source position: contnrs.pp line 107

public function TComponentList.IndexOf(

  AComponent: TComponent

):Integer;

Arguments

AComponent

Instance to look for.

Function result

Index of the found instance

Description

IndexOf searches for an instance in the list and returns it's position in the list. The position is zero-based. If no instance is found, -1 is returned.

IndexOf just overrides the implementation of the parent class so it accepts only TComponent instances. It introduces no new behaviour.

Errors

None.

See also

TObjectList.IndexOf

Search for an object in the list


TComponentList.Insert

Insert a new component in the list

Declaration

Source position: contnrs.pp line 110

public procedure TComponentList.Insert(

  Index: Integer;

  AComponent: TComponent

);

Arguments

Index | Position in the list where the component should be inserted
AComponent | Component instance to insert.

Description

Insert inserts a TComponent instance (AComponent) in the list at position Index. It simply overrides the parent implementation so it only accepts TComponent instances. It introduces no new behaviour.

Errors

None.

See also

TObjectList.Insert | Insert an object in the list.
TComponentList.Add | Add a component to the list.
TComponentList.Remove | Remove a component from the list, possibly destroying it.


TComponentList.Items

Index-based access to the elements in the list.

Declaration

Source position: contnrs.pp line 111

public property TComponentList.Items: TComponent
  read GetItems
  write SetItems;
  default;

Description

Items provides access to the components in the list using an index. It simply overrides the default property of the parent classes so it returns/accepts TComponent instances only. Note that the index is zero based.

See also

TObjectList.Items

Indexed access to the elements of the list.


TComponentList.Last

Last non-nil instance in the list.

Declaration

Source position: contnrs.pp line 109

public function TComponentList.Last: TComponent;

Function result

The last non-nil instance in the list, or Nil

Description

Last overrides the implementation of it's ancestors to return the last non-nil instance of TComponent in the list. If no non-nil instance is found, Nil is returned.

Errors

None.

See also

TComponentList.First | First non-nil instance in the list.
TObjectList.Last | Return the last non-nil object in the list.


TComponentList.Remove

Remove a component from the list, possibly destroying it.

Declaration

Source position: contnrs.pp line 106

public function TComponentList.Remove(

  AComponent: TComponent

):Integer;

Arguments

AComponent

Component to remove from the list

Function result

The index of the removed instance

Description

Remove removes item from the list, and if the list owns it's items, it also destroys it. It returns the index of the item that was removed, or -1 if no item was removed.

Remove simply overrides the implementation in TObjectList so it only accepts TComponent descendents. It introduces no new behaviour.

Errors

None.

See also

TComponentList.Extract | Remove a component from the list without destroying it.
TObjectList.Remove | Remove (and possibly free) an element from the list.


TCustomBucketList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Custom bucket list class

Declaration

Source position: contnrs.pp line 508

type TCustomBucketList = class(TObject)
public
destructor Destroy; override; | Frees the bucketlist from memory
procedure Clear; | Clear the list
function Add(); | Add an item to the list
procedure Assign(); | Assign one bucket list to another
function Exists(); | Check if an item exists in the list.
function Find(); | Find an item in the list
public
function ForEach(); | Loop over all items.
public
function Remove(); | Remove an item from the list.
property Data: Pointer; default; [rw] | Associative array for data pointers
end;

Inheritance

TCustomBucketList

Custom bucket list class
|

TObject

Description

TCustomBucketList is an associative list using buckets for storage. It scales better than a regular TList list class, escpecially when an item must be searched in the list.

Since the list associates a data pointer with each item pointer, it follows that each item pointer must be unique, and can be added to the list only once.

The TCustomBucketList class does not determine the number of buckets or the bucket hash mechanism, this must be done by descendent classes such as TBucketList. TCustomBucketList only takes care of storage and retrieval of items in the various buckets.

Because TCustomBucketList is an abstract class - it does not determine the number of buckets - one should never instantiate an instance of TCustomBucketList, but always use a descendent class such as TCustomBucketList.

See also

TBucketList

Default bucket list implementation.


TCustomBucketList

Data

TObject


TCustomBucketList
 | Destroy
 | Clear
 | Add
 | Assign
 | Exists
 | Find
 | ForEach
 | Remove
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCustomBucketList)

AfterConstruction (TObject)

Assign (TCustomBucketList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCustomBucketList)

Create (TObject)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TCustomBucketList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Exists (TCustomBucketList)

FieldAddress (TObject)

Find (TCustomBucketList)

ForEach (TCustomBucketList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Remove (TCustomBucketList)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TCustomBucketList

TObject


TCustomBucketList.Add

Add an item to the list

Declaration

Source position: contnrs.pp line 527

public function TCustomBucketList.Add(

  AItem: Pointer;

  AData: Pointer

):Pointer;

Arguments

AItem | Item to add to the list. Must uniquely identify AData.
AData | Data to be associated with AItem

Function result

The result is always AData

Description

Add adds AItem with it's associated AData to the list and returns AData.

Errors

If AItem is already in the list, an ElistError exception will be raised.

See also

TCustomBucketList.Exists | Check if an item exists in the list.
TCustomBucketList.Clear | Clear the list


TCustomBucketList.Assign

Assign one bucket list to another

Declaration

Source position: contnrs.pp line 528

public procedure TCustomBucketList.Assign(

  AList: TCustomBucketList

);

Arguments

AList

Source list to copy items from

Description

Assign is implemented by TCustomBucketList to copy the contents of another bucket list to the bucket list. It clears the contents prior to the copy operation.

See also

TCustomBucketList.Add | Add an item to the list
TCustomBucketList.Clear | Clear the list


TCustomBucketList.Clear

Clear the list

Declaration

Source position: contnrs.pp line 526

public procedure TCustomBucketList.Clear;

Description

Clear clears the list. The items and their data themselves are not disposed of, this must be done separately. Clear only removes all references to the items from the list.

Errors

None.

See also

TCustomBucketList.Add

Add an item to the list


TCustomBucketList.Data

Associative array for data pointers

Declaration

Source position: contnrs.pp line 534

public property TCustomBucketList.Data: Pointer
  read GetData
  write SetData;
  default;

Description

Data provides direct access to the Data pointers associated with the AItem pointers. If AItem is not in the list of pointers, an EListError exception will be raised.

See also

TCustomBucketList.Find | Find an item in the list
TCustomBucketList.Exists | Check if an item exists in the list.


TCustomBucketList.Destroy

Frees the bucketlist from memory

Declaration

Source position: contnrs.pp line 525

public destructor TCustomBucketList.Destroy; override;

Description

Detsroy frees all storage for the buckets from memory. The items themselves are not freed from memory.


TCustomBucketList.Exists

Check if an item exists in the list.

Declaration

Source position: contnrs.pp line 529

public function TCustomBucketList.Exists(

  AItem: Pointer

):Boolean;

Arguments

AItem

Item to search for

Function result

True if the item exists in the list, False if not.

Description

Exists searches the list and returns True if the AItem is already present in the list. If the item is not yet in the list, False is returne5Ad.

If the data pointer associated with AItem is also needed, then it is better to use Find.

See also

TCustomBucketList.Find

Find an item in the list


TCustomBucketList.Find

Find an item in the list

Declaration

Source position: contnrs.pp line 530

public function TCustomBucketList.Find(

  AItem: Pointer;

  out AData: Pointer

):Boolean;

Arguments

AItem | Item to search for in the list
AData | On return, contains the data pointer associated with AItem.

Function result

True if the item is present in the list.

Description

Find searches for AItem in the list and returns the data pointer associated with it in AData if the item was found. In that case the return value is True. If AItem is not found in the list, False is returned.

See also

TCustomBucketList.Exists

Check if an item exists in the list.


TCustomBucketList.ForEach

Loop over all items.

Declaration

Source position: line 0

function TCustomBucketList.ForEach(

  AProc: TBucketProc;

  AInfo: Pointer = Nil

):Boolean;

function TCustomBucketList.ForEach(

  AProc: TBucketProcObject

):Boolean;

Arguments

AProc | Callback handler to call for each item in the list.
AInfo | Extra info to pass to the procedural variant of the method.

Function result

True if all items were processed, False if the loop was stopped.

Arguments

AProc

Callback handler to call for each item in the list.

Description

Foreach loops over all items in the list and calls AProc, passing it in turn each item in the list.

AProc exists in 2 variants: one which is a simple procedure, and one which is a method. In the case of the simple procedure, the AInfo argument is passed as well in each call to AProc.

The loop stops when all items have been processed, or when the AContinue argument of AProc contains False on return.

The result of the function is True if all items were processed, or False if the loop was interrupted with a AContinue return of False.

Errors

None.

See also

TCustomBucketList.Data

Associative array for data pointers


TCustomBucketList.Remove

Remove an item from the list.

Declaration

Source position: contnrs.pp line 533

public function TCustomBucketList.Remove(

  AItem: Pointer

):Pointer;

Arguments

AItem

Item to remove from the list.

Function result

Data pointer associated with AItem

Description

Remove removes AItem from the list, and returns the associated data pointer of the removed item. If the item was not in the list, then Nil is returned.

See also

Find

Find an item in the list


TFPCustomHashTable

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Hash class

Declaration

Source position: contnrs.pp line 352

type TFPCustomHashTable = class(TObject)
public
constructor Create; | Instantiate a new TFPCustomHashTable instance using the default hash mechanism
constructor CreateWith(); | Instantiate a new TFPCustomHashTable instance with given algorithm and size
destructor Destroy; override; | Free the hash table.
procedure ChangeTableSize(); virtual; | Change the table size of the hash table.
procedure Clear; virtual; | Clear the hash table.
procedure Delete(); virtual; | Delete a key from the hash list.
function Find(); | Search for an item with a certain key value.
function IsEmpty; | Check if the hash table is empty.
property HashFunction: THashFunction; [rw] | Hash function currently in use
property Count: LongWord; [r] | Number of items in the hash table.
property HashTableSize: LongWord; [rw] | Size of the hash table
property HashTable: TFPObjectList; [r] | Hash table instance
property VoidSlots: LongWord; [r] | Number of empty slots in the hash table.
property LoadFactor: Double; [r] | Fraction of count versus size
property AVGChainLen: Double; [r] | Average chain length
property MaxChainLength: LongWord; [r] | Maximum chain length
property NumberOfCollisions: LongWord; [r] | Number of extra items
property Density: LongWord; [r] | Number of filled slots
end;

Inheritance

TFPCustomHashTable

Hash class
|

TObject

Description

TFPCustomHashTable is a general-purpose hashing class. It can store string keys and pointers associated with these strings. The hash mechanism is configurable and can be optionally be specified when a new instance of the class is created; A default hash mechanism is implemented in RSHash.

A TFPHasList should be used when fast lookup of data based on some key is required. The other container objects only offer linear search methods, while the hash list offers faster search mechanisms.

See also

THTCustomNode | Single item in the hash table.
TFPObjectList | TFPList descendent which manages objects.
RSHash | Standard hash value calculating function.


TFPCustomHashTable
 |  | HashFunction
 | ro | Count
 |  | HashTableSize
 | ro | HashTable
 | ro | VoidSlots
 | ro | LoadFactor
 | ro | AVGChainLen
 | ro | MaxChainLength
 | ro | NumberOfCollisions
 | ro | Density
TObject


ro | AVGChainLen (TFPCustomHashTable)
ro | Count (TFPCustomHashTable)
ro | Density (TFPCustomHashTable)
 | HashFunction (TFPCustomHashTable)
ro | HashTable (TFPCustomHashTable)
 | HashTableSize (TFPCustomHashTable)
ro | LoadFactor (TFPCustomHashTable)
ro | MaxChainLength (TFPCustomHashTable)
ro | NumberOfCollisions (TFPCustomHashTable)
ro |


TFPCustomHashTable
 | Create
 | CreateWith
 | Destroy
 | ChangeTableSize
 | Clear
 | Delete
 | Find
 | IsEmpty
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ChangeTableSize (TFPCustomHashTable)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TFPCustomHashTable)

Create (TObject)

Create (TFPCustomHashTable)

CreateWith (TFPCustomHashTable)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TFPCustomHashTable)

Destroy (TObject)

Destroy (TFPCustomHashTable)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Find (TFPCustomHashTable)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

IsEmpty (TFPCustomHashTable)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPCustomHashTable

TObject


TFPCustomHashTable.AVGChainLen

Average chain length

Declaration

Source position: contnrs.pp line 389

public property TFPCustomHashTable.AVGChainLen: Double
  read GetAVGChainLen;

Description

AVGChainLen is the average chain length, i.e. the ratio of elements in the table versus the number of filled slots. Calculating this is an expensive operation.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.LoadFactor | Fraction of count versus size
TFPCustomHashTable.MaxChainLength | Maximum chain length
TFPCustomHashTable.VoidSlots | Number of empty slots in the hash table.
TFPCustomHashTable.Density | Number of filled slots
TFPCustomHashTable.NumberOfCollisions | Number of extra items


TFPCustomHashTable.ChangeTableSize

Change the table size of the hash table.

Declaration

Source position: contnrs.pp line 378

public procedure TFPCustomHashTable.ChangeTableSize(

  const ANewSize: LongWord

); virtual;

Arguments

ANewSize

New hash table size

Description

ChangeTableSize changes the size of the hash table: it recomputes the hash value for all of the keys in the table, so this is an expensive operation.

Errors

If no memory is available, an exception may be raised.

See also

HashTableSize

Size of the hash table


TFPCustomHashTable.Clear

Clear the hash table.

Declaration

Source position: contnrs.pp line 379

public procedure TFPCustomHashTable.Clear; virtual;

Description

Clear removes all keys and their associated data from the hash table. The data itself is not freed from memory, this should be done by the programmer.

Errors

None.

See also

Destroy

Free the hash table.


TFPCustomHashTable.Count

Number of items in the hash table.

Declaration

Source position: contnrs.pp line 384

public property TFPCustomHashTable.Count: LongWord
  read FCount;

Description

Count is the number of items in the hash table.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.HashTableSize | Size of the hash table
TFPCustomHashTable.AVGChainLen | Average chain length
TFPCustomHashTable.MaxChainLength | Maximum chain length


TFPCustomHashTable.Create

Instantiate a new TFPCustomHashTable instance using the default hash mechanism

Declaration

Source position: contnrs.pp line 375

public constructor TFPCustomHashTable.Create;

Description

Create creates a new instance of TFPCustomHashTable with hash size 196613 and hash algorithm RSHash

Errors

If no memory is available, an exception may be raised.

See also

CreateWith

Instantiate a new TFPCustomHashTable instance with given algorithm and size


TFPCustomHashTable.CreateWith

Instantiate a new TFPCustomHashTable instance with given algorithm and size

Declaration

Source position: contnrs.pp line 376

public constructor TFPCustomHashTable.CreateWith(

  AHashTableSize: LongWord;

  aHashFunc: THashFunction

);

Arguments

AHashTableSize | Size of the hash table.
aHashFunc | Hash calculating function.

Description

CreateWith creates a new instance of TFPCustomHashTable with hash size AHashTableSize and hash calculating algorithm aHashFunc.

Errors

If no memory is available, an exception may be raised.

See also

Create

Instantiate a new TFPCustomHashTable instance using the default hash mechanism


TFPCustomHashTable.Delete

Delete a key from the hash list.

Declaration

Source position: contnrs.pp line 380

public procedure TFPCustomHashTable.Delete(

  const aKey:

); virtual;

Arguments

aKey

Key to delete from the list

Description

Delete deletes all keys with value AKey from the hash table. It does not free the data associated with key. If AKey is not in the list, nothing is removed.

Errors

None.

See also

TFPCustomHashTable.Find | Search for an item with a certain key value.
TFPCustomHashTable.Add | Add a new key and its associated data to the hash.


TFPCustomHashTable.Density

Number of filled slots

Declaration

Source position: contnrs.pp line 392

public property TFPCustomHashTable.Density: LongWord
  read GetDensity;

Description

Density is the number of filled slots in the hash table.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.LoadFactor | Fraction of count versus size
TFPCustomHashTable.AvgChainLength
TFPCustomHashTable.VoidSlots | Number of empty slots in the hash table.
TFPCustomHashTable.Density | Number of filled slots


TFPCustomHashTable.Destroy

Free the hash table.

Declaration

Source position: contnrs.pp line 377

public destructor TFPCustomHashTable.Destroy; override;

Description

Destroy removes the hash table from memory. If any data was associated with the keys in the hash table, then this data is not freed. This must be done by the programmer.

Errors

None.

See also

Destroy | Free the hash table.
Create | Instantiate a new TFPCustomHashTable instance using the default hash mechanism
Create | Instantiate a new TFPCustomHashTable instance with given algorithm and size
THTCustomNode.Data | Data associated with this hash value.


TFPCustomHashTable.Find

Search for an item with a certain key value.

Declaration

Source position: contnrs.pp line 381

public function TFPCustomHashTable.Find(

  const aKey:

):THTCustomNode;

Arguments

aKey

Key value to look for.

Function result

THTCustomNode instance matching AKey

Description

Find searches for the THTCustomNode instance with key value equal to Akey and if it finds it, it returns the instance. If no matching value is found, Nil is returned.

Note that the instance returned by this function cannot be freed; If it should be removed from the hash table, the Delete method should be used instead.

Errors

None.

See also

Add | Add a new key and its associated data to the hash.
Delete | Delete a key from the hash list.


TFPCustomHashTable.HashFunction

Hash function currently in use

Declaration

Source position: contnrs.pp line 383

public property TFPCustomHashTable.HashFunction: THashFunction
  read FHashFunction
  write SetHashFunction;

Description

HashFunction is the hash function currently in use to calculate hash values from keys. The property can be set, this simply calls SetHashFunction. Note that setting the hash function does NOT the hash value of all keys to be recomputed, so changing the value while there are still keys in the table is not a good idea.

See also

SetHashFunction

HashTableSize

Size of the hash table


TFPCustomHashTable.HashTable

Hash table instance

Declaration

Source position: contnrs.pp line 386

public property TFPCustomHashTable.HashTable: TFPObjectList
  read FHashTable;

Description

TFPCustomHashTable is the internal list object (TFPObjectList used for the hash table. Each element in this table is again a TFPObjectList instance or Nil.


TFPCustomHashTable.HashTableSize

Size of the hash table

Declaration

Source position: contnrs.pp line 385

public property TFPCustomHashTable.HashTableSize: LongWord
  read FHashTableSize
  write SetHashTableSize;

Description

HashTableSize is the size of the hash table. It can be set, in which case it will be rounded to the nearest prime number suitable for RSHash.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.AVGChainLen | Average chain length
TFPCustomHashTable.MaxChainLength | Maximum chain length
TFPCustomHashTable.VoidSlots | Number of empty slots in the hash table.
TFPCustomHashTable.Density | Number of filled slots


TFPCustomHashTable.IsEmpty

Check if the hash table is empty.

Declaration

Source position: contnrs.pp line 382

public function TFPCustomHashTable.IsEmpty: Boolean;

Function result

True if there are zero keys in the hashtable

Description

IsEmpty returns True if the hash table contains no elements, or False if there are still elements in the hash table.

See also

TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.HashTableSize | Size of the hash table
TFPCustomHashTable.AVGChainLen | Average chain length
TFPCustomHashTable.MaxChainLength | Maximum chain length


TFPCustomHashTable.LoadFactor

Fraction of count versus size

Declaration

Source position: contnrs.pp line 388

public property TFPCustomHashTable.LoadFactor: Double
  read GetLoadFactor;

Description

LoadFactor is the ratio of elements in the table versus table size. Ideally, this should be as small as possible.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.AVGChainLen | Average chain length
TFPCustomHashTable.MaxChainLength | Maximum chain length
TFPCustomHashTable.VoidSlots | Number of empty slots in the hash table.
TFPCustomHashTable.Density | Number of filled slots
TFPCustomHashTable.NumberOfCollisions | Number of extra items


TFPCustomHashTable.MaxChainLength

Maximum chain length

Declaration

Source position: contnrs.pp line 390

public property TFPCustomHashTable.MaxChainLength: LongWord
  read GetMaxChainLength;

Description

MaxChainLength is the length of the longest chain in the hash table. Calculating this is an expensive operation.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.LoadFactor | Fraction of count versus size
TFPCustomHashTable.AvgChainLength
TFPCustomHashTable.VoidSlots | Number of empty slots in the hash table.
TFPCustomHashTable.Density | Number of filled slots
TFPCustomHashTable.NumberOfCollisions | Number of extra items


TFPCustomHashTable.NumberOfCollisions

Number of extra items

Declaration

Source position: contnrs.pp line 391

public property TFPCustomHashTable.NumberOfCollisions: LongWord
  read GetNumberOfCollisions;

Description

NumberOfCollisions is the number of items which are not the first item in a chain. If this number is too big, the hash size may be too small.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.LoadFactor | Fraction of count versus size
TFPCustomHashTable.AvgChainLength
TFPCustomHashTable.VoidSlots | Number of empty slots in the hash table.
TFPCustomHashTable.Density | Number of filled slots


TFPCustomHashTable.VoidSlots

Number of empty slots in the hash table.

Declaration

Source position: contnrs.pp line 387

public property TFPCustomHashTable.VoidSlots: LongWord
  read GetVoidSlots;

Description

VoidSlots is the number of empty slots in the hash table. Calculating this is an expensive operation.

See also

TFPCustomHashTable.IsEmpty | Check if the hash table is empty.
TFPCustomHashTable.Count | Number of items in the hash table.
TFPCustomHashTable.AVGChainLen | Average chain length
TFPCustomHashTable.MaxChainLength | Maximum chain length
TFPCustomHashTable.LoadFactor | Fraction of count versus size
TFPCustomHashTable.Density | Number of filled slots
TFPCustomHashTable.NumberOfCollisions | Number of extra items


TFPDataHashTable

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Hash table for data pointers

Declaration

Source position: contnrs.pp line 410

type TFPDataHashTable = class(TFPCustomHashTable)
public
procedure Add(); virtual; | Add a data pointer to the list.
property Items: Pointer; default; [rw] | Key-based access to the items in the table
end;

Inheritance

TFPDataHashTable | Hash table for data pointers
|
TFPCustomHashTable | Hash class
|
TObject

Description

TFPDataHashTable is a TFPCustomHashTable descendent which stores simple data pointers together with the keys. In case the data associated with the keys are objects, it's better to use TFPObjectHashTable, or for string data, TFPStringHashTable is more suitable. The data pointers are exposed with their keys through the Items property.

See also

TFPObjectHashTable | Hash table for object instances
TFPStringHashTable | Hash table for string data.
Items | Key-based access to the items in the table


TFPDataHashTable
 |  | Items
TFPCustomHashTable
 |  | HashFunction
 | ro | Count
 |  | HashTableSize
 | ro | HashTable
 | ro | VoidSlots
 | ro | LoadFactor
 | ro | AVGChainLen
 | ro | MaxChainLength
 | ro | NumberOfCollisions
 | ro | Density
TObject


ro | AVGChainLen (TFPCustomHashTable)
ro | Count (TFPCustomHashTable)
ro | Density (TFPCustomHashTable)
 | HashFunction (TFPCustomHashTable)
ro | HashTable (TFPCustomHashTable)
 | HashTableSize (TFPCustomHashTable)
 | Items (TFPDataHashTable)
ro | LoadFactor (TFPCustomHashTable)
ro | MaxChainLength (TFPCustomHashTable)
ro | NumberOfCollisions (TFPCustomHashTable)
ro |


TFPDataHashTable
 | Add
TFPCustomHashTable
 | Create
 | CreateWith
 | Destroy
 | ChangeTableSize
 | Clear
 | Delete
 | Find
 | IsEmpty
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TFPDataHashTable)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ChangeTableSize (TFPCustomHashTable)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TFPCustomHashTable)

Create (TObject)

Create (TFPCustomHashTable)

CreateWith (TFPCustomHashTable)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TFPCustomHashTable)

Destroy (TObject)

Destroy (TFPCustomHashTable)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Find (TFPCustomHashTable)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

IsEmpty (TFPCustomHashTable)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPDataHashTable

TFPCustomHashTable

TObject


TFPDataHashTable.Add

Add a data pointer to the list.

Declaration

Source position: contnrs.pp line 418

public procedure TFPDataHashTable.Add(

  const aKey: ;

  AItem: pointer

); virtual;

Arguments

aKey | Key to insert in the hash table
AItem | Data pointer associated with AKey.

Description

Add adds a data pointer (AItem) to the list with key AKey.

Errors

If AKey already exists in the table, an exception is raised.

See also

TFPDataHashTable.Items

Key-based access to the items in the table


TFPDataHashTable.Items

Key-based access to the items in the table

Declaration

Source position: contnrs.pp line 419

public property TFPDataHashTable.Items: Pointer
  read GetData
  write SetData;
  default;

Description

Items provides access to the items in the hash table using their key: the array index Index is the key. A key which is not present will result in an Nil pointer.

See also

TFPStringHashTable.Add

Add a new string to the hash list


TFPHashList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Hash list class for pointer data

Declaration

Source position: contnrs.pp line 204

type TFPHashList = class(TObject)
public
constructor Create; | Create a new instance of the hashlist
destructor Destroy; override; | Removes an instance of the hashlist from the heap
function Add(); | Add a new key/data pair to the list
procedure Clear; | Clear the list
function NameOfIndex(); | Returns the key name of an item by index
function HashOfIndex(); | Return the hash valye of an item by index
function GetNextCollision(); | Get next collision number
procedure Delete(); | Delete an item from the list.
class procedure Error(); | Raise an error
function Expand; | Expand the list
function Extract(); | Extract a pointer from the list
function IndexOf(); | Return the index of the data pointer
function Find(); | Find data associated with key
function FindIndexOf(); | Return index of named item.
function FindWithHash(); | Find first element with given name and hash value
function Rename(); | Rename a key
function Remove(); | Remove first instance of a pointer
procedure Pack; | Remove nil pointers from the list
procedure ShowStatistics; | Return some statistics for the list.
public
procedure ForEachCall(); | Call a procedure for each element in the list
public
property Capacity: Integer; [rw] | Capacity of the list.
property Count: Integer; [rw] | Current number of elements in the list.
property Items: Pointer; default; [rw] | Indexed array with pointers
property List: PHashItemList; [r] | Low-level hash list
property Strs: PChar; [r] | Low-level memory area with strings.
end;

Inheritance

TFPHashList

Hash list class for pointer data
|

TObject

Description

TFPHashList implements a fast hash class. The class is built for speed, therefore the key values can be shortstrings only, and the data can only be pointers.

if a base class for an own hash class is wanted, the TFPCustomHashTable class can be used. If a hash class for objects is needed instead of pointers, the TFPHashObjectList class can be used.

See also

TFPCustomHashTable | Hash class
TFPHashObjectList
TFPDataHashTable | Hash table for data pointers
TFPStringHashTable | Hash table for string data.


TFPHashList
 |  | Capacity
 |  | Count
 |  | Items
 | ro | List
 | ro | Strs
TObject


ro | List (TFPHashList)
ro |


TFPHashList
 | Create
 | Destroy
 | Add
 | Clear
 | NameOfIndex
 | HashOfIndex
 | GetNextCollision
 | Delete
 | Error
 | Expand
 | Extract
 | IndexOf
 | Find
 | FindIndexOf
 | FindWithHash
 | Rename
 | Remove
 | Pack
 | ShowStatistics
 | ForEachCall
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TFPHashList)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TFPHashList)

Create (TObject)

Create (TFPHashList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TFPHashList)

Destroy (TObject)

Destroy (TFPHashList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Error (TFPHashList)

Expand (TFPHashList)

Extract (TFPHashList)

FieldAddress (TObject)

Find (TFPHashList)

FindIndexOf (TFPHashList)

FindWithHash (TFPHashList)

ForEachCall (TFPHashList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNextCollision (TFPHashList)

HashOfIndex (TFPHashList)

IndexOf (TFPHashList)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

NameOfIndex (TFPHashList)

newinstance (TObject)

Pack (TFPHashList)

Remove (TFPHashList)

Rename (TFPHashList)

SafeCallException (TObject)

ShowStatistics (TFPHashList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPHashList

TObject


TFPHashList.Add

Add a new key/data pair to the list

Declaration

Source position: contnrs.pp line 233

public function TFPHashList.Add(

  const AName: shortstring;

  Item: Pointer

):Integer;

Arguments

AName | Key name associated with data.
Item | Data pointer

Function result

Position of the new item in the list

Description

Add adds a new data pointer (Item) with key AName to the list. It returns the position of the item in the list.

Errors

If not enough memory is available to hold the key and data, an exception may be raised.

See also

TFPHashList.Extract | Extract a pointer from the list
TFPHashList.Remove | Remove first instance of a pointer
TFPHashList.Delete | Delete an item from the list.


TFPHashList.Capacity

Capacity of the list.

Declaration

Source position: contnrs.pp line 252

public property TFPHashList.Capacity: Integer
  read FCapacity
  write SetCapacity;

Description

Capacity returns the current capacity of the list. The capacity is expanded as more elements are added to the list. If a good estimate of the number of elements that will be added to the list, the property can be set to a sufficiently large value to avoid reallocation of memory each time the list needs to grow.

See also

Count | Current number of elements in the list.
Items | Indexed array with pointers


TFPHashList.Clear

Clear the list

Declaration

Source position: contnrs.pp line 234

public procedure TFPHashList.Clear;

Description

Clear removes all items from the list. It does not free the data items themselves. It frees all memory needed to contain the items.

Errors

None.

See also

TFPHashList.Extract | Extract a pointer from the list
TFPHashList.Remove | Remove first instance of a pointer
TFPHashList.Delete | Delete an item from the list.
TFPHashList.Add | Add a new key/data pair to the list


TFPHashList.Count

Current number of elements in the list.

Declaration

Source position: contnrs.pp line 253

public property TFPHashList.Count: Integer
  read FCount
  write SetCount;

Description

Count is the current number of elements in the list.

See also

Capacity | Capacity of the list.
Items | Indexed array with pointers


TFPHashList.Create

Create a new instance of the hashlist

Declaration

Source position: contnrs.pp line 231

public constructor TFPHashList.Create;

Description

Create creates a new instance of TFPHashList on the heap and sets the hash capacity to 1.

See also

TFPHashList.Destroy

Removes an instance of the hashlist from the heap


TFPHashList.Delete

Delete an item from the list.

Declaration

Source position: contnrs.pp line 238

public procedure TFPHashList.Delete(

  Index: Integer

);

Arguments

Index

Index of item to remove from the list

Description

Delete deletes the item at position Index. The data to which it points is not freed from memory.

Errors

TFPHashList.Extract TFPHashList.Remove TFPHashList.Add


TFPHashList.Destroy

Removes an instance of the hashlist from the heap

Declaration

Source position: contnrs.pp line 232

public destructor TFPHashList.Destroy; override;

Description

Destroy cleans up the memory structures maintained by the hashlist and removes the TFPHashList instance from the heap.

Destroy should not be called directly, it's better to use Free or FreeAndNil instead.

See also

TFPHashList.Create | Create a new instance of the hashlist
TFPHashList.Clear | Clear the list


TFPHashList.Error

Raise an error

Declaration

Source position: contnrs.pp line 239

public class procedure TFPHashList.Error(

  const Msg: ;

  Data: PtrInt

);

Arguments

Msg | Message string
Data | Data pointer

Description

Error raises an EListError exception, with message Msg. The Data pointer is used to format the message.


TFPHashList.Expand

Expand the list

Declaration

Source position: contnrs.pp line 240

public function TFPHashList.Expand: TFPHashList;

Function result

Returns self

Description

Expand enlarges the capacity of the list if the maximum capacity was reached. It returns itself.

Errors

If not enough memory is available, an exception may be raised.

See also

TFPHashList.Clear

Clear the list


TFPHashList.Extract

Extract a pointer from the list

Declaration

Source position: contnrs.pp line 241

public function TFPHashList.Extract(

  item: Pointer

):Pointer;

Arguments

item

Pointer to be removed.

Function result

The removed pointer or nil.

Description

Extract removes the data item from the list, if it is in the list. It returns the pointer if it was removed from the list, Nil otherwise.

Extract does a linear search, and is not very efficient.

See also

TFPHashList.Delete | Delete an item from the list.
TFPHashList.Remove | Remove first instance of a pointer
TFPHashList.Clear | Clear the list


TFPHashList.Find

Find data associated with key

Declaration

Source position: contnrs.pp line 243

public function TFPHashList.Find(

  const AName: shortstring

):Pointer;

Arguments

AName

Key name to search for.

Function result

Data associated with AName or Nil if it does not exist.

Description

Find searches (using the hash) for the data item associated with item AName and returns the data pointer associated with it. If the item is not found, Nil is returned. It uses the hash value of the key to perform the search.

See also

TFPHashList.HashOfIndex | Return the hash valye of an item by index
TFPHashList.NameOfIndex | Returns the key name of an item by index
TFPHashList.IndexOf | Return the index of the data pointer
TFPHashList.FindIndexOf | Return index of named item.
TFPHashList.FindWithHash | Find first element with given name and hash value


TFPHashList.FindIndexOf

Return index of named item.

Declaration

Source position: contnrs.pp line 244

public function TFPHashList.FindIndexOf(

  const AName: shortstring

):Integer;

Arguments

AName

Key value to look for

Function result

Index of the key

Description

FindIndexOf returns the index of the key AName, or -1 if the key does not exist in the list. It uses the hash value to search for the key.

See also

TFPHashList.HashOfIndex | Return the hash valye of an item by index
TFPHashList.NameOfIndex | Returns the key name of an item by index
TFPHashList.IndexOf | Return the index of the data pointer
TFPHashList.Find | Find data associated with key
TFPHashList.FindWithHash | Find first element with given name and hash value


TFPHashList.FindWithHash

Find first element with given name and hash value

Declaration

Source position: contnrs.pp line 245

public function TFPHashList.FindWithHash(

  const AName: shortstring;

  AHash: LongWord

):Pointer;

Arguments

AName | Key value to search for.
AHash | Hash value of the key AName

Function result

Data pointer associated with key AName

Description

FindWithHash searches for the item with key AName. It uses the provided hash value AHash to perform the search. If the item exists, the data pointer is returned, if not, the result is Nil.

See also

TFPHashList.HashOfIndex | Return the hash valye of an item by index
TFPHashList.NameOfIndex | Returns the key name of an item by index
TFPHashList.IndexOf | Return the index of the data pointer
TFPHashList.Find | Find data associated with key
TFPHashList.FindIndexOf | Return index of named item.


TFPHashList.ForEachCall

Call a procedure for each element in the list

Declaration

Source position: line 0

procedure TFPHashList.ForEachCall(

  proc2call: TListCallback;

  arg: pointer

);

procedure TFPHashList.ForEachCall(

  proc2call: TListStaticCallback;

  arg: pointer

);

Arguments

proc2call | Callback procedure
arg | Additional argument passed to proc2call

Arguments

proc2call | Callback procedure
arg | Additional argument passed to proc2call

Description

ForEachCall loops over the items in the list and calls proc2call, passing it the item and arg.


TFPHashList.GetNextCollision

Get next collision number

Declaration

Source position: contnrs.pp line 237

public function TFPHashList.GetNextCollision(

  Index: Integer

):Integer;

Arguments

Index

Index of hash item

Description

GetNextCollision returns the next collision in hash item Index. This is the count of items with the same hash.means that the next it


TFPHashList.HashOfIndex

Return the hash valye of an item by index

Declaration

Source position: contnrs.pp line 236

public function TFPHashList.HashOfIndex(

  Index: Integer

):LongWord;

Arguments

Index

Index of item for which to return hash value

Function result

Hash value of item Index

Description

HashOfIndex returns the hash value of the item at position Index.

Errors

If Index is out of the valid range, an exception is raised.

See also

TFPHashList.HashOfName
TFPHashList.Find | Find data associated with key
TFPHashList.FindIndexOf | Return index of named item.
TFPHashList.FindWithHash | Find first element with given name and hash value


TFPHashList.IndexOf

Return the index of the data pointer

Declaration

Source position: contnrs.pp line 242

public function TFPHashList.IndexOf(

  Item: Pointer

):Integer;

Arguments

Item

Data pointer to search for.

Function result

Index of Item in the list.

Description

IndexOf returns the index of the first occurrence of pointer Item. If the item is not in the list, -1 is returned.

The performed search is linear, and not very efficient.

See also

TFPHashList.HashOfIndex | Return the hash valye of an item by index
TFPHashList.NameOfIndex | Returns the key name of an item by index
TFPHashList.Find | Find data associated with key
TFPHashList.FindIndexOf | Return index of named item.
TFPHashList.FindWithHash | Find first element with given name and hash value


TFPHashList.Items

Indexed array with pointers

Declaration

Source position: contnrs.pp line 254

public property TFPHashList.Items: Pointer
  read Get
  write Put;
  default;

Description

Items provides indexed access to the pointers, the index runs from 0 to Count-1.

Errors

Specifying an invalid index will result in an exception.

See also

Capacity | Capacity of the list.
Count | Current number of elements in the list.


TFPHashList.List

Low-level hash list

Declaration

Source position: contnrs.pp line 255

public property TFPHashList.List: PHashItemList
  read FHashList;

Description

List exposes the low-level item list. It should not be used directly.

See also

Strs | Low-level memory area with strings.
THashItemList | array of THashItem records.


TFPHashList.NameOfIndex

Returns the key name of an item by index

Declaration

Source position: contnrs.pp line 235

public function TFPHashList.NameOfIndex(

  Index: Integer

):ShortString;

Arguments

Index

Index of item for which to return name

Function result

Key name of item Index

Description

NameOfIndex returns the key name of the item at position Index.

Errors

If Index is out of the valid range, an exception is raised.

See also

TFPHashList.HashOfIndex | Return the hash valye of an item by index
TFPHashList.Find | Find data associated with key
TFPHashList.FindIndexOf | Return index of named item.
TFPHashList.FindWithHash | Find first element with given name and hash value


TFPHashList.Pack

Remove nil pointers from the list

Declaration

Source position: contnrs.pp line 248

public procedure TFPHashList.Pack;

Description

Pack removes all Nil items from the list, and frees all unused memory.

See also

TFPHashList.Clear

Clear the list


TFPHashList.Remove

Remove first instance of a pointer

Declaration

Source position: contnrs.pp line 247

public function TFPHashList.Remove(

  Item: Pointer

):Integer;

Arguments

Item

Item to remove from the list.

Function result

Data pointer which was removed

Description

Remove removes the first occurence of the data pointer Item in the list, if it is present. The return value is the removed data pointer, or Nil if no data pointer was removed.

See also

TFPHashList.Delete | Delete an item from the list.
TFPHashList.Clear | Clear the list
TFPHashList.Extract | Extract a pointer from the list


TFPHashList.Rename

Rename a key

Declaration

Source position: contnrs.pp line 246

public function TFPHashList.Rename(

  const AOldName: shortstring;

  const ANewName: shortstring

):Integer;

Arguments

AOldName | Key to rename
ANewName | New name of key

Function result

New position in the list

Description

Rename renames key AOldname to ANewName. The hash value is recomputed and the item is moved in the list to it's new position.

Errors

If an item with ANewName already exists, an exception will be raised.


TFPHashList.ShowStatistics

Return some statistics for the list.

Declaration

Source position: contnrs.pp line 249

public procedure TFPHashList.ShowStatistics;

Description

ShowStatistics prints some information about the hash list to standard output. It prints the following values:

HashSize
Size of the hash table
HashMean
Mean hash value
HashStdDev
Standard deviation of hash values
ListSize
Size and capacity of the list
StringSize
Size and capacity of key strings


TFPHashList.Strs

Low-level memory area with strings.

Declaration

Source position: contnrs.pp line 256

public property TFPHashList.Strs: PChar
  read FStrs;

Description

Strs exposes the raw memory area with the strings.

See also

List

Low-level hash list


TFPHashObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Hash-list aware object

Declaration

Source position: contnrs.pp line 268

type TFPHashObject = class
public
constructor CreateNotOwned; | Create an instance not owned by any list.
constructor Create(); | Create a named instance, and insert in a hash list.
procedure ChangeOwner(); | Change the list owning the object.
procedure ChangeOwnerAndName(); | Simultaneously change the list owning the object and the name of the object.
procedure Rename(); | Rename the object
property Name: shortstring; [r] | Current name of the object
property Hash: LongWord; [r] | Hash value
end;

Inheritance

TFPHashObject

Hash-list aware object
|

TObject

Description

TFPHashObject is a TObject descendent which is aware of the TFPHashObjectList class. It has a name property and an owning list: if the name is changed, it will reposition itself in the list which owns it. It offers methods to change the owning list: the object will correctly remove itself from the list which currently owns it, and insert itself in the new list.

See also

TFPHashObject.Name | Current name of the object
TFPHashObject.ChangeOwner | Change the list owning the object.
TFPHashObject.ChangeOwnerAndName | Simultaneously change the list owning the object and the name of the object.


TFPHashObject
 | ro | Name
 | ro | Hash


ro | Hash (TFPHashObject)
ro |


TFPHashObject
 | CreateNotOwned
 | Create
 | ChangeOwner
 | ChangeOwnerAndName
 | Rename


ChangeOwner (TFPHashObject)

ChangeOwnerAndName (TFPHashObject)

Create (TFPHashObject)

CreateNotOwned (TFPHashObject)

Rename (TFPHashObject)


TFPHashObject


TFPHashObject.ChangeOwner

Change the list owning the object.

Declaration

Source position: contnrs.pp line 280

public procedure TFPHashObject.ChangeOwner(

  HashObjectList: TFPHashObjectList

);

Arguments

HashObjectList

Hash list in which to insert object.

Description

ChangeOwner can be used to move the object between hash lists: The object will be removed correctly from the hash list that currently owns it, and will be inserted in the list HashObjectList.

Errors

If an object with the same name already is present in the new hash list, an exception will be raised.

See also

ChangeOwnerAndName | Simultaneously change the list owning the object and the name of the object.
Name | Current name of the object


TFPHashObject.ChangeOwnerAndName

Simultaneously change the list owning the object and the name of the object.

Declaration

Source position: contnrs.pp line 281

public procedure TFPHashObject.ChangeOwnerAndName(

  HashObjectList: TFPHashObjectList;

  const s: shortstring

);

Arguments

HashObjectList | Hash list in which to insert object.
s | New name with which to insert object.

Description

ChangeOwnerAndName can be used to move the object between hash lists: The object will be removed correctly from the hash list that currently owns it (using the current name), and will be inserted in the list HashObjectList with the new name S.

Errors

If the new name already is present in the new hash list, an exception will be raised.

See also

ChangeOwner | Change the list owning the object.
Name | Current name of the object


TFPHashObject.Create

Create a named instance, and insert in a hash list.

Declaration

Source position: contnrs.pp line 279

public constructor TFPHashObject.Create(

  HashObjectList: TFPHashObjectList;

  const s: shortstring

);

Arguments

HashObjectList | Hash list to which the object should be added.
s | Name for the object

Description

Create creates an instance of TFPHashObject, gives it the name S and inserts it in the hash list HashObjectList.

See also

CreateNotOwned | Create an instance not owned by any list.
TFPHashObject.ChangeOwner | Change the list owning the object.
TFPHashObject.Name | Current name of the object


TFPHashObject.CreateNotOwned

Create an instance not owned by any list.

Declaration

Source position: contnrs.pp line 278

public constructor TFPHashObject.CreateNotOwned;

Description

CreateNotOwned creates an instance of TFPHashObject which is not owned by any TFPHashObjectList hash list. It also has no name when created in this way.

See also

TFPHashObject.Name | Current name of the object
TFPHashObject.ChangeOwner | Change the list owning the object.
TFPHashObject.ChangeOwnerAndName | Simultaneously change the list owning the object and the name of the object.


TFPHashObject.Hash

Hash value

Declaration

Source position: contnrs.pp line 284

public property TFPHashObject.Hash: LongWord
  read GetHash;

Description

Hash is the hash value of the object in the hash list that owns it.

See also

Name

Current name of the object


TFPHashObject.Name

Current name of the object

Declaration

Source position: contnrs.pp line 283

public property TFPHashObject.Name: shortstring
  read GetName;

Description

Name is the name of the object, it is stored in the hash list using this name as the key.

See also

Rename | Rename the object
ChangeOwnerAndName | Simultaneously change the list owning the object and the name of the object.


TFPHashObject.Rename

Rename the object

Declaration

Source position: contnrs.pp line 282

public procedure TFPHashObject.Rename(

  const ANewName: shortstring

);

Arguments

ANewName

New name for the object

Description

Rename changes the name of the object, and notifies the hash list of this change.

Errors

If the new name already is present in the hash list, an exception will be raised.

See also

ChangeOwner | Change the list owning the object.
ChangeOwnerAndName | Simultaneously change the list owning the object and the name of the object.
Name | Current name of the object


TFPHashObjectList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Declaration

Source position: contnrs.pp line 287

type TFPHashObjectList = class(TObject)
public
constructor Create(); | Create a new instance of the hashlist
destructor Destroy; override; | Removes an instance of the hashlist from the heap
procedure Clear; | Clear the list
function Add(); | Add a new key/data pair to the list
function NameOfIndex(); | Returns the key name of an object by index
function HashOfIndex(); | Return the hash valye of an object by index
function GetNextCollision(); | Get next collision number
procedure Delete(); | Delete an object from the list.
function Expand; | Expand the list
function Extract(); | Extract a object instance from the list
function Remove(); | Remove first occurrence of a object instance
function IndexOf(); | Return the index of the object instance
function Find(); | Find data associated with key
function FindIndexOf(); | Return index of named object.
function FindWithHash(); | Find first element with given name and hash value
function Rename(); | Rename a key
function FindInstanceOf(); | Search an instance of a certain class
procedure Pack; | Remove nil object instances from the list
procedure ShowStatistics; | Return some statistics for the list.
public
procedure ForEachCall(); | Call a procedure for each object in the list
public
property Capacity: Integer; [rw] | Capacity of the list.
property Count: Integer; [rw] | Current number of elements in the list.
property OwnsObjects: Boolean; [rw] | Does the list own the objects it contains
property Items: TObject; default; [rw] | Indexed array with object instances
property List: TFPHashList; [r] | Low-level hash list
end;

Inheritance

TFPHashObjectList
|

TObject


TFPHashObjectList
 |  | Capacity
 |  | Count
 |  | OwnsObjects
 |  | Items
 | ro | List
TObject


TFPHashObjectList
 | Create
 | Destroy
 | Clear
 | Add
 | NameOfIndex
 | HashOfIndex
 | GetNextCollision
 | Delete
 | Expand
 | Extract
 | Remove
 | IndexOf
 | Find
 | FindIndexOf
 | FindWithHash
 | Rename
 | FindInstanceOf
 | Pack
 | ShowStatistics
 | ForEachCall
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TFPHashObjectList)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TFPHashObjectList)

Create (TObject)

Create (TFPHashObjectList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TFPHashObjectList)

Destroy (TObject)

Destroy (TFPHashObjectList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Expand (TFPHashObjectList)

Extract (TFPHashObjectList)

FieldAddress (TObject)

Find (TFPHashObjectList)

FindIndexOf (TFPHashObjectList)

FindInstanceOf (TFPHashObjectList)

FindWithHash (TFPHashObjectList)

ForEachCall (TFPHashObjectList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNextCollision (TFPHashObjectList)

HashOfIndex (TFPHashObjectList)

IndexOf (TFPHashObjectList)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

NameOfIndex (TFPHashObjectList)

newinstance (TObject)

Pack (TFPHashObjectList)

Remove (TFPHashObjectList)

Rename (TFPHashObjectList)

SafeCallException (TObject)

ShowStatistics (TFPHashObjectList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPHashObjectList

TObject


TFPHashObjectList.Add

Add a new key/data pair to the list

Declaration

Source position: contnrs.pp line 302

public function TFPHashObjectList.Add(

  const AName: shortstring;

  AObject: TObject

):Integer;

Arguments

AName | Key name associated with object instance.
AObject | object instance

Function result

Position of the new object in the list

Description

Add adds a new object instance (AObject) with key AName to the list. It returns the position of the object in the list.

Errors

If not enough memory is available to hold the key and data, an exception may be raised. If an object with this name already exists in the list, an exception is raised.

See also

TFPHashObjectList.Extract | Extract a object instance from the list
TFPHashObjectList.Remove | Remove first occurrence of a object instance
TFPHashObjectList.Delete | Delete an object from the list.


TFPHashObjectList.Capacity

Capacity of the list.

Declaration

Source position: contnrs.pp line 320

public property TFPHashObjectList.Capacity: Integer
  read GetCapacity
  write SetCapacity;

Description

Capacity returns the current capacity of the list. The capacity is expanded as more elements are added to the list. If a good estimate of the number of elements that will be added to the list, the property can be set to a sufficiently large value to avoid reallocation of memory each time the list needs to grow.

See also

Count | Current number of elements in the list.
Items | Indexed array with object instances


TFPHashObjectList.Clear

Clear the list

Declaration

Source position: contnrs.pp line 301

public procedure TFPHashObjectList.Clear;

Description

Clear removes all objects from the list. It does not free the objects themselves, unless OwnsObjects is True. It always frees all memory needed to contain the objects.

Errors

None.

See also

TFPHashObjectList.Extract | Extract a object instance from the list
TFPHashObjectList.Remove | Remove first occurrence of a object instance
TFPHashObjectList.Delete | Delete an object from the list.
TFPHashObjectList.Add | Add a new key/data pair to the list


TFPHashObjectList.Count

Current number of elements in the list.

Declaration

Source position: contnrs.pp line 321

public property TFPHashObjectList.Count: Integer
  read GetCount
  write SetCount;

Description

Count is the current number of elements in the list.

See also

Capacity | Capacity of the list.
Items | Indexed array with object instances


TFPHashObjectList.Create

Create a new instance of the hashlist

Declaration

Source position: contnrs.pp line 299

public constructor TFPHashObjectList.Create(

  FreeObjects: Boolean = True

);

Arguments

FreeObjects

Does the list own the objects

Description

Create creates a new instance of TFPHashObjectList on the heap and sets the hash capacity to 1.

If FreeObjects is True (the default), then the list owns the objects: when an object is removed from the list, it is destroyed (freed from memory). Clearing the list will free all objects in the list.

See also

TFPHashObjectList.Destroy | Removes an instance of the hashlist from the heap
TFPHashObjectList.OwnsObjects | Does the list own the objects it contains


TFPHashObjectList.Delete

Delete an object from the list.

Declaration

Source position: contnrs.pp line 306

public procedure TFPHashObjectList.Delete(

  Index: Integer

);

Arguments

Index

Index of object to remove from the list

Description

Delete deletes the object at position Index. If OwnsObjects is True, then the object itself is also freed from memory.

See also

TFPHashObjectList.Extract | Extract a object instance from the list
TFPHashObjectList.Remove | Remove first occurrence of a object instance
TFPHashObjectList.Add | Add a new key/data pair to the list
OwnsObjects | Does the list own the objects it contains


TFPHashObjectList.Destroy

Removes an instance of the hashlist from the heap

Declaration

Source position: contnrs.pp line 300

public destructor TFPHashObjectList.Destroy; override;

Description

Destroy cleans up the memory structures maintained by the hashlist and removes the TFPHashObjectList instance from the heap. If the list owns its objects, they are freed from memory as well.

Destroy should not be called directly, it's better to use Free or FreeAndNil instead.

See also

TFPHashObjectList.Create | Create a new instance of the hashlist
TFPHashObjectList.Clear | Clear the list


TFPHashObjectList.Expand

Expand the list

Declaration

Source position: contnrs.pp line 307

public function TFPHashObjectList.Expand: TFPHashObjectList;

Function result

Returns self

Description

Expand enlarges the capacity of the list if the maximum capacity was reached. It returns itself.

Errors

If not enough memory is available, an exception may be raised.

See also

TFPHashObjectList.Clear

Clear the list


TFPHashObjectList.Extract

Extract a object instance from the list

Declaration

Source position: contnrs.pp line 308

public function TFPHashObjectList.Extract(

  Item: TObject

):TObject;

Arguments

Item

Object instance to be removed.

Function result

The removed object instance or nil.

Description

Extract removes the data object from the list, if it is in the list. It returns the object instance if it was removed from the list, Nil otherwise. The object is not freed from memory, regardless of the value of OwnsObjects.

Extract does a linear search, and is not very efficient.

See also

TFPHashObjectList.Delete | Delete an object from the list.
TFPHashObjectList.Remove | Remove first occurrence of a object instance
TFPHashObjectList.Clear | Clear the list


TFPHashObjectList.Find

Find data associated with key

Declaration

Source position: contnrs.pp line 311

public function TFPHashObjectList.Find(

  const s: shortstring

):TObject;

Arguments

s

Key name to search for.

Function result

Object associated with AName or Nil if it does not exist.

Description

Find searches (using the hash) for the data object associated with key AName and returns the data object instance associated with it. If the object is not found, Nil is returned. It uses the hash value of the key to perform the search.

See also

TFPHashObjectList.HashOfIndex | Return the hash valye of an object by index
TFPHashObjectList.NameOfIndex | Returns the key name of an object by index
TFPHashObjectList.IndexOf | Return the index of the object instance
TFPHashObjectList.FindIndexOf | Return index of named object.
TFPHashObjectList.FindWithHash | Find first element with given name and hash value


TFPHashObjectList.FindIndexOf

Return index of named object.

Declaration

Source position: contnrs.pp line 312

public function TFPHashObjectList.FindIndexOf(

  const s: shortstring

):Integer;

Arguments

s

Key value to look for

Function result

Index of the key

Description

FindIndexOf returns the index of the key AName, or -1 if the key does not exist in the list. It uses the hash value to search for the key.

See also

TFPHashObjectList.HashOfIndex | Return the hash valye of an object by index
TFPHashObjectList.NameOfIndex | Returns the key name of an object by index
TFPHashObjectList.IndexOf | Return the index of the object instance
TFPHashObjectList.Find | Find data associated with key
TFPHashObjectList.FindWithHash | Find first element with given name and hash value


TFPHashObjectList.FindInstanceOf

Search an instance of a certain class

Declaration

Source position: contnrs.pp line 315

public function TFPHashObjectList.FindInstanceOf(

  AClass: TClass;

  AExact: Boolean;

  AStartAt: Integer

):Integer;

Arguments

AClass | Class to search for.
AExact | Should the class match exactly, or also consider descendents
AStartAt | Position in list to start search.

Function result

First instance of AClass after position AStartAt

Description

FindInstanceOf searches the list for an instance of class AClass. It starts searching at position AStartAt. If AExact is True, only instances of class AClass are considered. If AExact is False, then descendent classes of AClass are also taken into account when searching. If no instance is found, Nil is returned.


TFPHashObjectList.FindWithHash

Find first element with given name and hash value

Declaration

Source position: contnrs.pp line 313

public function TFPHashObjectList.FindWithHash(

  const AName: shortstring;

  AHash: LongWord

):Pointer;

Arguments

AName | Key value to search for.
AHash | Hash value of the key AName

Function result

Object instance associated with key AName

Description

FindWithHash searches for the object with key AName. It uses the provided hash value AHash to perform the search. If the object exists, the data object instance is returned, if not, the result is Nil.

See also

TFPHashObjectList.HashOfIndex | Return the hash valye of an object by index
TFPHashObjectList.NameOfIndex | Returns the key name of an object by index
TFPHashObjectList.IndexOf | Return the index of the object instance
TFPHashObjectList.Find | Find data associated with key
TFPHashObjectList.FindIndexOf | Return index of named object.


TFPHashObjectList.ForEachCall

Call a procedure for each object in the list

Declaration

Source position: line 0

procedure TFPHashObjectList.ForEachCall(

  proc2call: TObjectListCallback;

  arg: pointer

);

procedure TFPHashObjectList.ForEachCall(

  proc2call: TObjectListStaticCallback;

  arg: pointer

);

Arguments

proc2call | Callback procedure
arg | Additional argument passed to proc2call

Arguments

proc2call | Callback procedure
arg | Additional argument passed to proc2call

Description

ForEachCall loops over the objects in the list and calls proc2call, passing it the object and arg.


TFPHashObjectList.GetNextCollision

Get next collision number

Declaration

Source position: contnrs.pp line 305

public function TFPHashObjectList.GetNextCollision(

  Index: Integer

):Integer;

Arguments

Index

Index of hash item


TFPHashObjectList.HashOfIndex

Return the hash valye of an object by index

Declaration

Source position: contnrs.pp line 304

public function TFPHashObjectList.HashOfIndex(

  Index: Integer

):LongWord;

Arguments

Index

Index of object for which to return hash value

Function result

Hash value of object at position Index

Description

HashOfIndex returns the hash value of the object at position Index.

Errors

If Index is out of the valid range, an exception is raised.

See also

TFPHashObjectList.HashOfName
TFPHashObjectList.Find | Find data associated with key
TFPHashObjectList.FindIndexOf | Return index of named object.
TFPHashObjectList.FindWithHash | Find first element with given name and hash value


TFPHashObjectList.IndexOf

Return the index of the object instance

Declaration

Source position: contnrs.pp line 310

public function TFPHashObjectList.IndexOf(

  AObject: TObject

):Integer;

Arguments

AObject

Data object instance to search for.

Function result

Index of Item in the list.

Description

IndexOf returns the index of the first occurrence of object instance AObject. If the object is not in the list, -1 is returned.

The performed search is linear, and not very efficient.

See also

TFPHashObjectList.HashOfIndex | Return the hash valye of an object by index
TFPHashObjectList.NameOfIndex | Returns the key name of an object by index
TFPHashObjectList.Find | Find data associated with key
TFPHashObjectList.FindIndexOf | Return index of named object.
TFPHashObjectList.FindWithHash | Find first element with given name and hash value


TFPHashObjectList.Items

Indexed array with object instances

Declaration

Source position: contnrs.pp line 323

public property TFPHashObjectList.Items: TObject
  read GetItem
  write SetItem;
  default;

Description

Items provides indexed access to the object instances, the index runs from 0 to Count-1.

Errors

Specifying an invalid index will result in an exception.

See also

Capacity | Capacity of the list.
Count | Current number of elements in the list.


TFPHashObjectList.List

Low-level hash list

Declaration

Source position: contnrs.pp line 324

public property TFPHashObjectList.List: TFPHashList
  read FHashList;

Description

List exposes the low-level hash list. It should not be used directly.

See also

TFPHashList

Hash list class for pointer data


TFPHashObjectList.NameOfIndex

Returns the key name of an object by index

Declaration

Source position: contnrs.pp line 303

public function TFPHashObjectList.NameOfIndex(

  Index: Integer

):ShortString;

Arguments

Index

Index of object for which to return name

Function result

Key name of object at position Index

Description

NameOfIndex returns the key name of the object at position Index.

Errors

If Index is out of the valid range, an exception is raised.

See also

TFPHashObjectList.HashOfIndex | Return the hash valye of an object by index
TFPHashObjectList.Find | Find data associated with key
TFPHashObjectList.FindIndexOf | Return index of named object.
TFPHashObjectList.FindWithHash | Find first element with given name and hash value


TFPHashObjectList.OwnsObjects

Does the list own the objects it contains

Declaration

Source position: contnrs.pp line 322

public property TFPHashObjectList.OwnsObjects: Boolean
  read FFreeObjects
  write FFreeObjects;

Description

OwnsObjects determines what to do when an object is removed from the list: if it is True (the default), then the list owns the objects: when an object is removed from the list, it is destroyed (freed from memory). Clearing the list will free all objects in the list.

The value of OwnsObjects is set when the hash list is created, and cannot be changed during the lifetime of the hash list.

See also

TFPHashObjectList.Create

Create a new instance of the hashlist


TFPHashObjectList.Pack

Remove nil object instances from the list

Declaration

Source position: contnrs.pp line 316

public procedure TFPHashObjectList.Pack;

Description

Pack removes all Nil objects from the list, and frees all unused memory.

See also

TFPHashObjectList.Clear

Clear the list


TFPHashObjectList.Remove

Remove first occurrence of a object instance

Declaration

Source position: contnrs.pp line 309

public function TFPHashObjectList.Remove(

  AObject: TObject

):Integer;

Arguments

AObject

Object instance to remove from the list.

Function result

Position of object instance which was removed

Description

Remove removes the first occurence of the object instance Item in the list, if it is present. The return value is the location of the removed object instance, or -1 if no object instance was removed.

If OwnsObjects is True, then the object itself is also freed from memory.

See also

TFPHashObjectList.Delete | Delete an object from the list.
TFPHashObjectList.Clear | Clear the list
TFPHashObjectList.Extract | Extract a object instance from the list


TFPHashObjectList.Rename

Rename a key

Declaration

Source position: contnrs.pp line 314

public function TFPHashObjectList.Rename(

  const AOldName: shortstring;

  const ANewName: shortstring

):Integer;

Arguments

AOldName | Key to rename
ANewName | New name of key

Function result

New position in the list

Description

Rename renames key AOldname to ANewName. The hash value is recomputed and the object is moved in the list to it's new position.

Errors

If an object with ANewName already exists, an exception will be raised.


TFPHashObjectList.ShowStatistics

Return some statistics for the list.

Declaration

Source position: contnrs.pp line 317

public procedure TFPHashObjectList.ShowStatistics;

Description

ShowStatistics prints some information about the hash list to standard output. It prints the following values:

HashSize
Size of the hash table
HashMean
Mean hash value
HashStdDev
Standard deviation of hash values
ListSize
Size and capacity of the list
StringSize
Size and capacity of key strings


TFPObjectHashTable

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Hash table for object instances

Declaration

Source position: contnrs.pp line 459

type TFPObjectHashTable = class(TFPCustomHashTable)
public
constructor Create(); | Create a new instance of TFPObjectHashTable
constructor CreateWith(); | Create a new hash table with given size and hash function
procedure Add(); virtual; | Add a new object to the hash table
property Items: TObject; default; [rw] | Key-based access to the objects
property OwnsObjects: Boolean; [rw] | Does the hash table own the objects ?
end;

Inheritance

TFPObjectHashTable | Hash table for object instances
|
TFPCustomHashTable | Hash class
|
TObject

Description

TFPStringHashTable is a TFPCustomHashTable descendent which stores object instances together with the keys. In case the data associated with the keys are strings themselves, it's better to use TFPStringHashTable, or for arbitrary pointer data, TFPDataHashTable is more suitable. The objects are exposed with their keys through the Items property.

See also

TFPStringHashTable | Hash table for string data.
TFPDataHashTable | Hash table for data pointers
TFPObjectHashTable.Items | Key-based access to the objects


TFPObjectHashTable
 |  | Items
 |  | OwnsObjects
TFPCustomHashTable
 |  | HashFunction
 | ro | Count
 |  | HashTableSize
 | ro | HashTable
 | ro | VoidSlots
 | ro | LoadFactor
 | ro | AVGChainLen
 | ro | MaxChainLength
 | ro | NumberOfCollisions
 | ro | Density
TObject


ro | AVGChainLen (TFPCustomHashTable)
ro | Count (TFPCustomHashTable)
ro | Density (TFPCustomHashTable)
 | HashFunction (TFPCustomHashTable)
ro | HashTable (TFPCustomHashTable)
 | HashTableSize (TFPCustomHashTable)
 | Items (TFPObjectHashTable)
ro | LoadFactor (TFPCustomHashTable)
ro | MaxChainLength (TFPCustomHashTable)
ro | NumberOfCollisions (TFPCustomHashTable)
 | OwnsObjects (TFPObjectHashTable)
ro |


TFPObjectHashTable
 | Create
 | CreateWith
 | Add
TFPCustomHashTable
 | Create
 | CreateWith
 | Destroy
 | ChangeTableSize
 | Clear
 | Delete
 | Find
 | IsEmpty
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TFPObjectHashTable)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ChangeTableSize (TFPCustomHashTable)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TFPCustomHashTable)

Create (TObject)

Create (TFPCustomHashTable)

Create (TFPObjectHashTable)

CreateWith (TFPCustomHashTable)

CreateWith (TFPObjectHashTable)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TFPCustomHashTable)

Destroy (TObject)

Destroy (TFPCustomHashTable)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Find (TFPCustomHashTable)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

IsEmpty (TFPCustomHashTable)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPObjectHashTable

TFPCustomHashTable

TObject


TFPObjectHashTable.Add

Add a new object to the hash table

Declaration

Source position: contnrs.pp line 471

public procedure TFPObjectHashTable.Add(

  const aKey: ;

  AItem: TObject

); virtual;

Arguments

aKey | key Associated with object
AItem | Object to store

Description

Add adds the object AItem to the hash table, and associates it with key aKey.

Errors

If the key aKey is already in the hash table, an exception will be raised.

See also

TFPObjectHashTable.Items

Key-based access to the objects


TFPObjectHashTable.Create

Create a new instance of TFPObjectHashTable

Declaration

Source position: contnrs.pp line 469

public constructor TFPObjectHashTable.Create(

  AOwnsObjects: Boolean = True

);

Arguments

AOwnsObjects

Does the hash table own the objects stored in it?

Description

Create creates a new instance of TFPObjectHashTable on the heap. It sets the OwnsObjects property to AOwnsObjects, and then calls the inherited Create. If AOwnsObjects is set to True, then the hash table owns the objects: whenever an object is removed from the list, it is automatically freed.

Errors

If not enough memory is available on the heap, an exception may be raised.

See also

TFPObjectHashTable.OwnsObjects | Does the hash table own the objects ?
TFPObjectHashTable.CreateWith | Create a new hash table with given size and hash function
TFPObjectHashTable.Items | Key-based access to the objects


TFPObjectHashTable.CreateWith

Create a new hash table with given size and hash function

Declaration

Source position: contnrs.pp line 470

public constructor TFPObjectHashTable.CreateWith(

  AHashTableSize: LongWord;

  aHashFunc: THashFunction;

  AOwnsObjects: Boolean = True

);

Arguments

AHashTableSize | Hash table size
aHashFunc | Hash function to use
AOwnsObjects | Does the hash table own the objects stored in it?

Description

CreateWith sets the OwnsObjects property to AOwnsObjects, and then calls the inherited CreateWith. If AOwnsObjects is set to True, then the hash table owns the objects: whenever an object is removed from the list, it is automatically freed.

This constructor should be used when a table size and hash algorithm should be specified that differ from the default table size and hash algorithm.

Errors

If not enough memory is available on the heap, an exception may be raised.

See also

TFPObjectHashTable.OwnsObjects | Does the hash table own the objects ?
TFPObjectHashTable.Create | Create a new instance of TFPObjectHashTable
TFPObjectHashTable.Items | Key-based access to the objects


TFPObjectHashTable.Items

Key-based access to the objects

Declaration

Source position: contnrs.pp line 472

public property TFPObjectHashTable.Items: TObject
  read GetData
  write SetData;
  default;

Description

Items provides access to the objects in the hash table using their key: the array index Index is the key. A key which is not present will result in an Nil instance.

See also

TFPObjectHashTable.Add

Add a new object to the hash table


TFPObjectHashTable.OwnsObjects

Does the hash table own the objects ?

Declaration

Source position: contnrs.pp line 473

public property TFPObjectHashTable.OwnsObjects: Boolean
  read FOwnsObjects
  write FOwnsObjects;

Description

OwnsObjects determines what happens with objects which are removed from the hash table: if True, then removing an object from the hash list will free the object. If False, the object is not freed. Note that way in which the object is removed is not relevant: be it Delete, Remove or Clear.

See also

TFPObjectHashTable.Create | Create a new instance of TFPObjectHashTable
TFPObjectHashTable.Items | Key-based access to the objects


TFPObjectList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TFPList descendent which manages objects.

Declaration

Source position: contnrs.pp line 31

type TFPObjectList = class(TObject)
procedure Create(); | Create a new object list
public
destructor Destroy; override; | Clears the list and destroys the list instance
procedure Clear; | Clear all elements in the list.
function Add(); | Add an object to the list.
procedure Delete(); | Delete an element from the list.
procedure Exchange(); | Exchange the location of two objects
function Expand; | Expand the capacity of the list.
function Extract(); | Extract an object from the list
function Remove(); | Remove an item from the list.
function IndexOf(); | Search for an object in the list
function FindInstanceOf(); | Search for an instance of a certain class
procedure Insert(); | Insert a new object in the list
function First; | Return the first non-nil object in the list
function Last; | Return the last non-nil object in the list.
procedure Move(); | Move an object to another location in the list.
procedure Assign(); | Copy the contents of a list.
procedure Pack; | Remove all Nil references from the list
procedure Sort(); | Sort the list of objects
public
procedure ForEachCall(); | For each object in the list, call a method or procedure, passing it the object.
public
property Capacity: Integer; [rw] | Capacity of the list
property Count: Integer; [rw] | Number of elements in the list.
property OwnsObjects: Boolean; [rw] | Should the list free elements when they are removed.
property Items: TObject; default; [rw] | Indexed access to the elements of the list.
property List: TFPList; [r] | Internal list used to keep the objects.
end;

Inheritance

TFPObjectList

TFPList descendent which manages objects.
|

TObject

Description

TFPObjectList is a TFPList based list which has as the default array property TObjects instead of pointers. By default it also manages the objects: when an object is deleted or removed from the list, it is automatically freed. This behaviour can be disabled when the list is created.

In difference with TObjectList, TFPObjectList offers no notification mechanism of list operations, allowing it to be faster than TObjectList. For the same reason, it is also not a descendent of TFPList (although it uses one internally).

See also

#rtl.classes.TFPList

TObjectList

List to manage object instances.


TFPObjectList
 |  | Capacity
 |  | Count
 |  | OwnsObjects
 |  | Items
 | ro | List
TObject


TFPObjectList
 | Create
 | Destroy
 | Clear
 | Add
 | Delete
 | Exchange
 | Expand
 | Extract
 | Remove
 | IndexOf
 | FindInstanceOf
 | Insert
 | First
 | Last
 | Move
 | Assign
 | Pack
 | Sort
 | ForEachCall
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TFPObjectList)

AfterConstruction (TObject)

Assign (TFPObjectList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TFPObjectList)

Create (TObject)

Create (TFPObjectList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TFPObjectList)

Destroy (TObject)

Destroy (TFPObjectList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Exchange (TFPObjectList)

Expand (TFPObjectList)

Extract (TFPObjectList)

FieldAddress (TObject)

FindInstanceOf (TFPObjectList)

First (TFPObjectList)

ForEachCall (TFPObjectList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

IndexOf (TFPObjectList)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TFPObjectList)

InstanceSize (TObject)

Last (TFPObjectList)

MethodAddress (TObject)

MethodName (TObject)

Move (TFPObjectList)

newinstance (TObject)

Pack (TFPObjectList)

Remove (TFPObjectList)

SafeCallException (TObject)

Sort (TFPObjectList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPObjectList

TObject


TFPObjectList.Add

Add an object to the list.

Declaration

Source position: contnrs.pp line 47

public function TFPObjectList.Add(

  AObject: TObject

):Integer;

Arguments

AObject

The object to add

Function result

The index of the object in the list.

Description

Add adds AObject to the list and returns the index of the object in the list.

Note that when OwnsObjects is True, an object should not be added twice to the list: this will result in memory corruption when the object is freed (as it will be freed twice). The Add method does not check this, however.

Errors

None.

See also

TFPObjectList.OwnsObjects | Should the list free elements when they are removed.
TFPObjectList.Delete | Delete an element from the list.


TFPObjectList.Assign

Copy the contents of a list.

Declaration

Source position: contnrs.pp line 59

public procedure TFPObjectList.Assign(

  Obj: TFPObjectList

);

Arguments

Obj

The source list to copy from.

Description

Assign copies the contents of Obj if Obj is of type TFPObjectList

Errors

None.


TFPObjectList.Capacity

Capacity of the list

Declaration

Source position: contnrs.pp line 64

public property TFPObjectList.Capacity: Integer
  read GetCapacity
  write SetCapacity;

Description

Capacity is the number of elements that the list can contain before it needs to expand itself, i.e., reserve more memory for pointers. It is always equal or larger than Count.

See also

TFPObjectList.Count

Number of elements in the list.


TFPObjectList.Clear

Clear all elements in the list.

Declaration

Source position: contnrs.pp line 46

public procedure TFPObjectList.Clear;

Description

Removes all objects from the list, freeing all objects in the list if OwnsObjects is True.

See also

TObjectList.Destroy


TFPObjectList.Count

Number of elements in the list.

Declaration

Source position: contnrs.pp line 65

public property TFPObjectList.Count: Integer
  read GetCount
  write SetCount;

Description

Count is the number of elements in the list. Note that this includes Nil elements.

See also

TFPObjectList.Capacity

Capacity of the list


TFPObjectList.Create

Create a new object list

Declaration

Source position: line 0

constructor TFPObjectList.Create;

constructor TFPObjectList.Create(

  FreeObjects: Boolean

);

Arguments

FreeObjects

Should objects be freed when removing them from the list

Description

Create instantiates a new object list. The FreeObjects parameter determines whether objects that are removed from the list should also be freed from memory. By default this is True. This behaviour can be changed after the list was instantiated.

Errors

None.

See also

TFPObjectList.Destroy | Clears the list and destroys the list instance
TFPObjectList.OwnsObjects | Should the list free elements when they are removed.
TObjectList | List to manage object instances.


TFPObjectList.Delete

Delete an element from the list.

Declaration

Source position: contnrs.pp line 48

public procedure TFPObjectList.Delete(

  Index: Integer

);

Arguments

Index

Index of the object to delete.

Description

Delete removes the object at index Index from the list. When OwnsObjects is True, the object is also freed.

Errors

An access violation may occur when OwnsObjects is True and either the object was freed externally, or when the same object is in the same list twice.

See also

TFPObjectList.Remove | Remove an item from the list.
TFPObjectList.Extract | Extract an object from the list
TFPObjectList.OwnsObjects | Should the list free elements when they are removed.
TFPObjectList.Add | Add an object to the list.
TFPObjectList.Clear | Clear all elements in the list.


TFPObjectList.Destroy

Clears the list and destroys the list instance

Declaration

Source position: contnrs.pp line 45

public destructor TFPObjectList.Destroy; override;

Description

Destroy clears the list, freeing all objects in the list if OwnsObjects is True.

See also

TFPObjectList.OwnsObjects | Should the list free elements when they are removed.
TObjectList.Create | Create a new object list.


TFPObjectList.Exchange

Exchange the location of two objects

Declaration

Source position: contnrs.pp line 49

public procedure TFPObjectList.Exchange(

  Index1: Integer;

  Index2: Integer

);

Arguments

Index1 | Location of first object
Index2 | Location of second object

Description

Exchange exchanges the objects at indexes Index1 and Index2 in a direct operation (i.e. no delete/add is performed).

Errors

If either Index1 or Index2 is invalid, an exception will be raised.

See also

TFPObjectList.Add | Add an object to the list.
TFPObjectList.Delete | Delete an element from the list.


TFPObjectList.Expand

Expand the capacity of the list.

Declaration

Source position: contnrs.pp line 50

public function TFPObjectList.Expand: TFPObjectList;

Function result

A reference to the expanded list.

Description

Expand increases the capacity of the list. It calls #rtl.classes.tfplist.expand and then returns a reference to itself.

Errors

If there is not enough memory to expand the list, an exception will be raised.

See also

TFPObjectList.Pack | Remove all Nil references from the list
TFPObjectList.Clear | Clear all elements in the list.
#rtl.classes.tfplist.expand


TFPObjectList.Extract

Extract an object from the list

Declaration

Source position: contnrs.pp line 51

public function TFPObjectList.Extract(

  Item: TObject

):TObject;

Arguments

Item

The object to extract

Function result

The extracted object, or Nil if none was extracted.

Description

Extract removes Item from the list, if it is present in the list. It returns Item if it was found, Nil if item was not present in the list.

Note that the object is not freed, and that only the first found object is removed from the list.

Errors

None.

See also

TFPObjectList.Pack | Remove all Nil references from the list
TFPObjectList.Clear | Clear all elements in the list.
TFPObjectList.Remove | Remove an item from the list.
TFPObjectList.Delete | Delete an element from the list.


TFPObjectList.FindInstanceOf

Search for an instance of a certain class

Declaration

Source position: contnrs.pp line 54

public function TFPObjectList.FindInstanceOf(

  AClass: TClass;

  AExact: Boolean;

  AStartAt: Integer

):Integer;

Arguments

AClass | The class to look for
AExact | Should the class match exact or nor
AStartAt | Index to start the search at

Function result

The first instance of the requested class.

Description

FindInstanceOf will look through the instances in the list and will return the first instance which is a descendent of class AClass if AExact is False. If AExact is true, then the instance should be of class AClass.

If no instance of the requested class is found, Nil is returned.

Errors

None.

See also

TFPObjectList.IndexOf

Search for an object in the list


TFPObjectList.First

Return the first non-nil object in the list

Declaration

Source position: contnrs.pp line 56

public function TFPObjectList.First: TObject;

Function result

The first non-nil element in the list.

Description

First returns a reference to the first non-Nil element in the list. If no non-Nil element is found, Nil is returned.

Errors

None.

See also

TFPObjectList.Last | Return the last non-nil object in the list.
TFPObjectList.Pack | Remove all Nil references from the list


TFPObjectList.ForEachCall

For each object in the list, call a method or procedure, passing it the object.

Declaration

Source position: line 0

procedure TFPObjectList.ForEachCall(

  proc2call: TObjectListCallback;

  arg: pointer

);

procedure TFPObjectList.ForEachCall(

  proc2call: TObjectListStaticCallback;

  arg: pointer

);

Arguments

proc2call | Procedure or method to be called.
arg | Additional pointer passed to proc2call

Arguments

proc2call | Procedure or method to be called.
arg | Additional pointer passed to proc2call

Description

ForEachCall loops through all objects in the list, and calls proc2call, passing it the object in the list. Additionally, arg is also passed to the procedure. Proc2call can be a plain procedure or can be a method of a class.

Errors

None.

See also

TObjectListStaticCallback | Plan procedure callback type for TFPObjectList.ForEachCall
TObjectListCallback | Method callback type for TFPObjectList.ForEachCall


TFPObjectList.IndexOf

Search for an object in the list

Declaration

Source position: contnrs.pp line 53

public function TFPObjectList.IndexOf(

  AObject: TObject

):Integer;

Arguments

AObject

Object instance to search for.

Function result

Index of the object in the list, -1 if not present.

Description

IndexOf searches for the presence of AObject in the list, and returns the location (index) in the list. The index is 0-based, and -1 is returned if AObject was not found in the list.

Errors

None.

See also

TFPObjectList.Items | Indexed access to the elements of the list.
TFPObjectList.Remove | Remove an item from the list.
TFPObjectList.Extract | Extract an object from the list


TFPObjectList.Insert

Insert a new object in the list

Declaration

Source position: contnrs.pp line 55

public procedure TFPObjectList.Insert(

  Index: Integer;

  AObject: TObject

);

Arguments

Index | Position Index to insert the object in
AObject | Object to insert in the list

Description

Insert inserts AObject at position Index in the list. All elements in the list after this position are shifted. The index is zero based, i.e. an insert at position 0 will insert an object at the first position of the list.

Errors

None.

See also

TFPObjectList.Add | Add an object to the list.
TFPObjectList.Delete | Delete an element from the list.


TFPObjectList.Items

Indexed access to the elements of the list.

Declaration

Source position: contnrs.pp line 67

public property TFPObjectList.Items: TObject
  read GetItem
  write SetItem;
  default;

Description

Items is the default property of the list. It provides indexed access to the elements in the list. The index Index is zero based, i.e., runs from 0 (zero) to Count-1.

See also

TFPObjectList.Count

Number of elements in the list.


TFPObjectList.Last

Return the last non-nil object in the list.

Declaration

Source position: contnrs.pp line 57

public function TFPObjectList.Last: TObject;

Function result

The last non-nil object in the list.

Description

Last returns a reference to the last non-Nil element in the list. If no non-Nil element is found, Nil is returned.

Errors

None.

See also

TFPObjectList.First | Return the first non-nil object in the list
TFPObjectList.Pack | Remove all Nil references from the list


TFPObjectList.List

Internal list used to keep the objects.

Declaration

Source position: contnrs.pp line 68

public property TFPObjectList.List: TFPList
  read FList;

Description

List is a reference to the TFPList instance used to manage the elements in the list.

See also

#rtl.classes.tfplist


TFPObjectList.Move

Move an object to another location in the list.

Declaration

Source position: contnrs.pp line 58

public procedure TFPObjectList.Move(

  CurIndex: Integer;

  NewIndex: Integer

);

Arguments

CurIndex | The current index of the object
NewIndex | The new index of the object

Description

Move moves the object at current location CurIndex to location NewIndex. Note that the NewIndex is determined after the object was removed from location CurIndex, and can hence be shifted with 1 position if CurIndex is less than NewIndex.

Contrary to exchange, the move operation is done by extracting the object from it's current location and inserting it at the new location.

Errors

If either CurIndex or NewIndex is out of range, an exception may occur.

See also

TFPObjectList.Exchange | Exchange the location of two objects
TFPObjectList.Delete | Delete an element from the list.
TFPObjectList.Insert | Insert a new object in the list


TFPObjectList.OwnsObjects

Should the list free elements when they are removed.

Declaration

Source position: contnrs.pp line 66

public property TFPObjectList.OwnsObjects: Boolean
  read FFreeObjects
  write FFreeObjects;

Description

OwnsObjects determines whether the objects in the list should be freed when they are removed (not extracted) from the list, or when the list is cleared. If the property is True then they are freed. If the property is False the elements are not freed.

The value is usually set in the constructor, and is seldom changed during the lifetime of the list. It defaults to True.

See also

TFPObjectList.Create | Create a new object list
TFPObjectList.Delete | Delete an element from the list.
TFPObjectList.Remove | Remove an item from the list.
TFPObjectList.Clear | Clear all elements in the list.


TFPObjectList.Pack

Remove all Nil references from the list

Declaration

Source position: contnrs.pp line 60

public procedure TFPObjectList.Pack;

Description

Pack removes all Nil elements from the list.

Errors

None.

See also

TFPObjectList.First | Return the first non-nil object in the list
TFPObjectList.Last | Return the last non-nil object in the list.


TFPObjectList.Remove

Remove an item from the list.

Declaration

Source position: contnrs.pp line 52

public function TFPObjectList.Remove(

  AObject: TObject

):Integer;

Arguments

AObject

Object to remove from the list.

Function result

Index of the removed object or -1 if none was removed.

Description

Remove removes Item from the list, if it is present in the list. It frees Item if OwnsObjects is True, and returns the index of the object that was found in the list, or -1 if the object was not found.

Note that only the first found object is removed from the list.

Errors

None.

See also

TFPObjectList.Pack | Remove all Nil references from the list
TFPObjectList.Clear | Clear all elements in the list.
TFPObjectList.Delete | Delete an element from the list.
TFPObjectList.Extract | Extract an object from the list


TFPObjectList.Sort

Sort the list of objects

Declaration

Source position: contnrs.pp line 61

public procedure TFPObjectList.Sort(

  Compare: TListSortCompare

);

Arguments

Compare

Compare function for two objects.

Description

Sort will perform a quick-sort on the list, using Compare as the compare algorithm. This function should accept 2 pointers and should return the following result:

less than 0
If the first pointer comes before the second.
equal to 0
If the pointers have the same value.
larger than 0
If the first pointer comes after the second.

The function should be able to deal with Nil values.

Errors

None.

See also

#rtl.classes.TList.Sort


TFPStringHashTable

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Hash table for string data.

Declaration

Source position: contnrs.pp line 431

type TFPStringHashTable = class(TFPCustomHashTable)
public
procedure Add(); virtual; | Add a new string to the hash list
property Items: ; default; [rw] | Key based access to the strings in the hash table
end;

Inheritance

TFPStringHashTable | Hash table for string data.
|
TFPCustomHashTable | Hash class
|
TObject

Description

TFPStringHashTable is a TFPCustomHashTable descendent which stores simple strings together with the keys. In case the data associated with the keys are objects, it's better to use TFPObjectHashTable, or for arbitrary pointer data, TFPDataHashTable is more suitable. The strings are exposed with their keys through the Items property.

See also

TFPObjectHashTable | Hash table for object instances
TFPDataHashTable | Hash table for data pointers
Items | Key based access to the strings in the hash table


TFPStringHashTable
 |  | Items
TFPCustomHashTable
 |  | HashFunction
 | ro | Count
 |  | HashTableSize
 | ro | HashTable
 | ro | VoidSlots
 | ro | LoadFactor
 | ro | AVGChainLen
 | ro | MaxChainLength
 | ro | NumberOfCollisions
 | ro | Density
TObject


ro | AVGChainLen (TFPCustomHashTable)
ro | Count (TFPCustomHashTable)
ro | Density (TFPCustomHashTable)
 | HashFunction (TFPCustomHashTable)
ro | HashTable (TFPCustomHashTable)
 | HashTableSize (TFPCustomHashTable)
 | Items (TFPStringHashTable)
ro | LoadFactor (TFPCustomHashTable)
ro | MaxChainLength (TFPCustomHashTable)
ro | NumberOfCollisions (TFPCustomHashTable)
ro |


TFPStringHashTable
 | Add
TFPCustomHashTable
 | Create
 | CreateWith
 | Destroy
 | ChangeTableSize
 | Clear
 | Delete
 | Find
 | IsEmpty
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TFPStringHashTable)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ChangeTableSize (TFPCustomHashTable)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TFPCustomHashTable)

Create (TObject)

Create (TFPCustomHashTable)

CreateWith (TFPCustomHashTable)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TFPCustomHashTable)

Destroy (TObject)

Destroy (TFPCustomHashTable)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Find (TFPCustomHashTable)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

IsEmpty (TFPCustomHashTable)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPStringHashTable

TFPCustomHashTable

TObject


TFPStringHashTable.Add

Add a new string to the hash list

Declaration

Source position: contnrs.pp line 439

public procedure TFPStringHashTable.Add(

  const aKey: ;

  const aItem:

); virtual;

Arguments

aKey | Key value associated with aItem
aItem | String data

Description

Add adds a new string AItem to the hash list with key AKey.

Errors

If a string with key Akey already exists in the hash table, an exception will be raised.

See also

TFPStringHashTable.Items

Key based access to the strings in the hash table


TFPStringHashTable.Items

Key based access to the strings in the hash table

Declaration

Source position: contnrs.pp line 440

public property TFPStringHashTable.Items:
  read GetData
  write SetData;
  default;

Description

Items provides access to the strings in the hash table using their key: the array index Index is the key. A key which is not present will result in an empty string.

See also

TFPStringHashTable.Add

Add a new string to the hash list


THTCustomNode

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Single item in the hash table.

Declaration

Source position: contnrs.pp line 339

type THTCustomNode = class(TObject)
public
constructor CreateWith(); | Create a new instance of THTCustomNode
function HasKey(); | Check whether this node matches the given key.
property Key: ; [r] | Key value associated with this hash item.
end;

Inheritance

THTCustomNode

Single item in the hash table.
|

TObject

Description

THTCustomNode is used by the TFPCustomHashTable class to store the keys and associated values.

See also

TFPCustomHashTable

Hash class


THTCustomNode

ro

Key

TObject


THTCustomNode
 | CreateWith
 | HasKey
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

CreateWith (THTCustomNode)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

HasKey (THTCustomNode)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


THTCustomNode

TObject


THTCustomNode.CreateWith

Create a new instance of THTCustomNode

Declaration

Source position: contnrs.pp line 343

public constructor THTCustomNode.CreateWith(

  const AString:

);

Arguments

AString

Key value for this node.

Description

CreateWith creates a new instance of THTCustomNode and stores the string AString in it. It should never be necessary to call this method directly, it will be called by the TFPCustomHashTable class when needed.

Errors

If no more memory is available, an exception may be raised.

See also

TFPCustomHashTable

Hash class


THTCustomNode.HasKey

Check whether this node matches the given key.

Declaration

Source position: contnrs.pp line 344

public function THTCustomNode.HasKey(

  const AKey:

):Boolean;

Arguments

AKey

Key to check for

Function result

True if the key matches, False if not.

Description

HasKey checks whether this node matches the given key AKey, by comparing it with the stored key. It returns True if it does, False if not.

Errors

None.

See also

THTCustomNode.Key

Key value associated with this hash item.


THTCustomNode.Key

Key value associated with this hash item.

Declaration

Source position: contnrs.pp line 345

public property THTCustomNode.Key:
  read FKey;

Description

Key is the key value associated with this hash item. It is stored when the item is created, and is read-only.

See also

THTCustomNode.CreateWith

Create a new instance of THTCustomNode


THTCustomNodeClass

Class of THTCustomNodeClass.

Declaration

Source position: contnrs.pp line 347

type THTCustomNodeClass = class of THTCustomNode;

Description

THTCustomNodeClass was used by TFPCustomHashTable to decide which class should be created for elements in the list.

See also

TFPCustomHashTable | Hash class
THTCustomNode | Single item in the hash table.


THTDataNode

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Data node for pointer hashtable

Declaration

Source position: contnrs.pp line 397

type THTDataNode = class(THTCustomNode)

public

  property Data: pointer; [rw]

Data pointer

end;

Inheritance

THTDataNode | Data node for pointer hashtable
|
THTCustomNode | Single item in the hash table.
|
TObject

Description

THTDataNode is used by TFPDataHashTable to store the hash items in. It simply holds the data pointer.

It should not be necessary to use THTDataNode directly, it's only for inner use by TFPDataHashTable

See also

TFPDataHashTable | Hash table for data pointers
THTObjectNode | Node type for TFPObjectHashTable
THTStringNode | Node type for TFPStringHashTable


THTDataNode
 |  | Data
THTCustomNode
 | ro | Key
TObject


THTDataNode
THTCustomNode
 | CreateWith
 | HasKey
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


THTDataNode

THTCustomNode

TObject


THTDataNode.Data

Data pointer

Declaration

Source position: contnrs.pp line 401

public property THTDataNode.Data: pointer
  read FData
  write FData;

Description

Pointer containing the user data associated with the hash value.


THTObjectNode

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Node type for TFPObjectHashTable

Declaration

Source position: contnrs.pp line 446

type THTObjectNode = class(THTCustomNode)

public

  property Data: TObject; [rw]

Object instance

end;

Inheritance

THTObjectNode | Node type for TFPObjectHashTable
|
THTCustomNode | Single item in the hash table.
|
TObject

Description

THTObjectNode is a THTCustomNode descendent which holds the data in the TFPObjectHashTable hash table. It exposes a data string.

It should not be necessary to use THTObjectNode directly, it's only for inner use by TFPObjectHashTable

See also

TFPObjectHashTable

Hash table for object instances


THTObjectNode
 |  | Data
THTCustomNode
 | ro | Key
TObject


THTObjectNode
THTCustomNode
 | CreateWith
 | HasKey
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


THTObjectNode

THTCustomNode

TObject


THTObjectNode.Data

Object instance

Declaration

Source position: contnrs.pp line 450

public property THTObjectNode.Data: TObject
  read FData
  write FData;

Description

Data is the object instance associated with the key value. It is exposed in TFPObjectHashTable.Items

See also

TFPObjectHashTable | Hash table for object instances
TFPObjectHashTable.Items | Key-based access to the objects
THTOwnedObjectNode | Node type for owned objects.


THTOwnedObjectNode

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Node type for owned objects.

Declaration

Source position: contnrs.pp line 453

type THTOwnedObjectNode = class(THTObjectNode)

public

  destructor Destroy; override;

Destroys the node and the object.

end;

Inheritance

THTOwnedObjectNode | Node type for owned objects.
|
THTObjectNode | Node type for TFPObjectHashTable
|
THTCustomNode | Single item in the hash table.
|
TObject

Description

THTOwnedObjectNode is used instead of THTObjectNode in case TFPObjectHashTable owns it's objects. When this object is destroyed, the associated data object is also destroyed.

See also

TFPObjectHashTable | Hash table for object instances
THTObjectNode | Node type for TFPObjectHashTable
TFPObjectHashTable.OwnsObjects | Does the hash table own the objects ?


THTOwnedObjectNode
THTObjectNode
 |  | Data
THTCustomNode
 | ro | Key
TObject


THTOwnedObjectNode
 | Destroy
THTObjectNode
THTCustomNode
 | CreateWith
 | HasKey
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

CreateWith (THTCustomNode)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (THTOwnedObjectNode)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

HasKey (THTCustomNode)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


THTOwnedObjectNode

THTObjectNode

THTCustomNode

TObject


THTOwnedObjectNode.Destroy

Destroys the node and the object.

Declaration

Source position: contnrs.pp line 455

public destructor THTOwnedObjectNode.Destroy; override;

Description

Destroy first frees the data object, and then only frees itself.

See also

THTOwnedObjectNode | Node type for owned objects.
TFPObjectHashTable.OwnsObjects | Does the hash table own the objects ?


THTStringNode

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Node type for TFPStringHashTable

Declaration

Source position: contnrs.pp line 423

type THTStringNode = class(THTCustomNode)

public

  property Data: ; [rw]

String data

end;

Inheritance

THTStringNode | Node type for TFPStringHashTable
|
THTCustomNode | Single item in the hash table.
|
TObject

Description

THTStringNode is a THTCustomNode descendent which holds the data in the TFPStringHashTable hash table. It exposes a data string.

It should not be necessary to use THTStringNode directly, it's only for inner use by TFPStringHashTable

See also

TFPStringHashTable

Hash table for string data.


THTStringNode
 |  | Data
THTCustomNode
 | ro | Key
TObject


THTStringNode
THTCustomNode
 | CreateWith
 | HasKey
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


THTStringNode

THTCustomNode

TObject


THTStringNode.Data

String data

Declaration

Source position: contnrs.pp line 427

public property THTStringNode.Data:
  read FData
  write FData;

Description

Data is the data of this has node. The data is a string, associated with the key. It is also exposed in TFPStringHashTable.Items

See also

TFPStringHashTable

Hash table for string data.


TObjectBucketList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Bucket list using objects instead of pointers.

Declaration

Source position: contnrs.pp line 561

type TObjectBucketList = class(TBucketList)
public
function Add(); | Add an object to the list
function Remove(); | Remove an object from the list
property Data: TObject; default; [rw] | Associative array of data items
end;

Inheritance

TObjectBucketList | Bucket list using objects instead of pointers.
|
TBucketList | Default bucket list implementation.
|
TCustomBucketList | Custom bucket list class
|
TObject

Description

TObjectBucketList is a class that redefines the associative Data array using TObject instead of Pointer. It also adds some overloaded versions of the Add and Remove calls using TObject instead of Pointer for the argument and result types.

See also

TObjectBucketList

Bucket list using objects instead of pointers.


TObjectBucketList
 | Data
TBucketList
TCustomBucketList
 | Data
TObject


Data (TCustomBucketList)

Data (TObjectBucketList)


TObjectBucketList
 | Add
 | Remove
TBucketList
 | Create
TCustomBucketList
 | Destroy
 | Clear
 | Add
 | Assign
 | Exists
 | Find
 | ForEach
 | Remove
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCustomBucketList)

Add (TObjectBucketList)

AfterConstruction (TObject)

Assign (TCustomBucketList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCustomBucketList)

Create (TObject)

Create (TBucketList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TCustomBucketList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Exists (TCustomBucketList)

FieldAddress (TObject)

Find (TCustomBucketList)

ForEach (TCustomBucketList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Remove (TCustomBucketList)

Remove (TObjectBucketList)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TObjectBucketList

TBucketList

TCustomBucketList

TObject


TObjectBucketList.Add

Add an object to the list

Declaration

Source position: contnrs.pp line 566

public function TObjectBucketList.Add(

  AItem: TObject;

  AData: TObject

):TObject;

Arguments

AItem | Item to add to the list
AData | Data associated with AItem

Function result

The result is always AData

Description

Add adds AItem to the list and associated AData with it.

See also

TObjectBucketList.Data | Associative array of data items
TObjectBucketList.Remove | Remove an object from the list


TObjectBucketList.Data

Associative array of data items

Declaration

Source position: contnrs.pp line 568

public property TObjectBucketList.Data: TObject
  read GetData
  write SetData;
  default;

Description

Data provides associative access to the data in the list: it returns the data object associated with the AItem object. If the AItem object is not in the list, an EListError exception is raised.

See also

TObjectBucketList.Add

Add an object to the list


TObjectBucketList.Remove

Remove an object from the list

Declaration

Source position: contnrs.pp line 567

public function TObjectBucketList.Remove(

  AItem: TObject

):TObject;

Arguments

AItem

Object to remove from the list

Function result

Data item associated with AItem

Description

Remove removes the object AItem from the list. It returns the Data object which was associated with the item. If AItem was not in the list, then Nil is returned.

See also

TObjectBucketList.Add | Add an object to the list
TObjectBucketList.Data | Associative array of data items


TObjectList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

List to manage object instances.

Declaration

Source position: contnrs.pp line 72

type TObjectList = class(TList)
procedure create(); | Create a new object list.
public
function Add(); | Add an object to the list.
function Extract(); | Extract an object from the list.
function Remove(); | Remove (and possibly free) an element from the list.
function IndexOf(); | Search for an object in the list
function FindInstanceOf(); | Search for an instance of a certain class
procedure Insert(); | Insert an object in the list.
function First; | Return the first non-nil object in the list
function Last; | Return the last non-nil object in the list.
property OwnsObjects: Boolean; [rw] | Should the list free elements when they are removed.
property Items: TObject; default; [rw] | Indexed access to the elements of the list.
end;

Inheritance

TObjectList

List to manage object instances.
|

TList
|

TObject

Description

TObjectList is a TList descendent which has as the default array property TObjects instead of pointers. By default it also manages the objects: when an object is deleted or removed from the list, it is automatically freed. This behaviour can be disabled when the list is created.

In difference with TFPObjectList, TObjectList offers a notification mechanism of list change operations: insert, delete. This slows down bulk operations, so if the notifications are not needed, TFPObjectList may be more appropriate.

See also

#rtl.classes.TList
TFPObjectList | TFPList descendent which manages objects.
TComponentList | List to manage component instances.
TClassList | List of classes.


TObjectList
 |  | OwnsObjects
 |  | Items
TList
 |  | Capacity
 |  | Count
 |  | Items
 | ro | List
TObject


 | Capacity (TList)
 | Count (TList)
 | Items (TList)
 | Items (TObjectList)
ro |


TObjectList
 | create
 | Add
 | Extract
 | Remove
 | IndexOf
 | FindInstanceOf
 | Insert
 | First
 | Last
TList
 | CopyMove
 | MergeMove
 | DoCopy
 | DoSrcUnique
 | DoAnd
 | DoDestUnique
 | DoOr
 | DoXOr
 | Get
 | Grow
 | Put
 | Notify
 | SetCapacity
 | GetCapacity
 | SetCount
 | GetCount
 | GetList
 | Create
 | Destroy
 | AddList
 | Add
 | Clear
 | Delete
 | Error
 | Exchange
 | Expand
 | Extract
 | First
 | GetEnumerator
 | IndexOf
 | Insert
 | Last
 | Move
 | Assign
 | Remove
 | Pack
 | Sort
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TList)

Add (TObjectList)

AddList (TList)

AfterConstruction (TObject)

Assign (TList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TList)

CopyMove (TList)

Create (TObject)

Create (TList)

create (TObjectList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TList)

Destroy (TObject)

Destroy (TList)

Dispatch (TObject)

DispatchStr (TObject)

DoAnd (TList)

DoCopy (TList)

DoDestUnique (TList)

DoOr (TList)

DoSrcUnique (TList)

DoXOr (TList)

Equals (TObject)

Error (TList)

Exchange (TList)

Expand (TList)

Extract (TList)

Extract (TObjectList)

FieldAddress (TObject)

FindInstanceOf (TObjectList)

First (TList)

First (TObjectList)

Free (TObject)

FreeInstance (TObject)

Get (TList)

GetCapacity (TList)

GetCount (TList)

GetEnumerator (TList)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetList (TList)

Grow (TList)

IndexOf (TList)

IndexOf (TObjectList)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TList)

Insert (TObjectList)

InstanceSize (TObject)

Last (TList)

Last (TObjectList)

MergeMove (TList)

MethodAddress (TObject)

MethodName (TObject)

Move (TList)

newinstance (TObject)

Notify (TList)

Pack (TList)

Put (TList)

Remove (TList)

Remove (TObjectList)

SafeCallException (TObject)

SetCapacity (TList)

SetCount (TList)

Sort (TList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TObjectList

TList

TObject


TObjectList.Add

Add an object to the list.

Declaration

Source position: contnrs.pp line 82

public function TObjectList.Add(

  AObject: TObject

):Integer;

Arguments

AObject

Object to add to the list.

Function result

Position at which the object was added

Description

Add overrides the TList implementation to accept objects (AObject) instead of pointers.

The function returns the index of the position where the object was added.

Errors

If the list must be expanded, and not enough memory is available, an exception may be raised.

See also

TObjectList.Insert | Insert an object in the list.
#rtl.classes.TList.Delete
TObjectList.Extract | Extract an object from the list.
TObjectList.Remove | Remove (and possibly free) an element from the list.


TObjectList.create

Create a new object list.

Declaration

Source position: line 0

constructor TObjectList.create;

constructor TObjectList.create(

  freeobjects: Boolean

);

Arguments

freeobjects

Should removed items be freed from memory

Description

Create instantiates a new object list. The FreeObjects parameter determines whether objects that are removed from the list should also be freed from memory. By default this is True. This behaviour can be changed after the list was instantiated.

Errors

None.

See also

TObjectList.Destroy
TObjectList.OwnsObjects | Should the list free elements when they are removed.
TFPObjectList | TFPList descendent which manages objects.


TObjectList.Extract

Extract an object from the list.

Declaration

Source position: contnrs.pp line 83

public function TObjectList.Extract(

  Item: TObject

):TObject;

Arguments

Item

Element to remove from the list.

Function result

The removed element, or Nil

Description

Extract removes the object Item from the list if it is present in the list. Contrary to Remove, Extract does not free the extracted element if OwnsObjects is True

The function returns a reference to the item which was removed from the list, or Nil if no element was removed.

Errors

None.

See also

TObjectList.Remove

Remove (and possibly free) an element from the list.


TObjectList.FindInstanceOf

Search for an instance of a certain class

Declaration

Source position: contnrs.pp line 86

public function TObjectList.FindInstanceOf(

  AClass: TClass;

  AExact: Boolean;

  AStartAt: Integer

):Integer;

Arguments

AClass | Class of which result should be a descendent
AExact | Should the class of the result be exactly the requested class.
AStartAt | Index to start the search

Function result

Instance found or Nil if none was found

Description

FindInstanceOf will look through the instances in the list and will return the first instance which is a descendent of class AClass if AExact is False. If AExact is true, then the instance should be of class AClass.

If no instance of the requested class is found, Nil is returned.

Errors

None.

See also

TObjectList.IndexOf

Search for an object in the list


TObjectList.First

Return the first non-nil object in the list

Declaration

Source position: contnrs.pp line 88

public function TObjectList.First: TObject;

Function result

First non-nil object in the list.

Description

First returns a reference to the first non-Nil element in the list. If no non-Nil element is found, Nil is returned.

Errors

None.

See also

TObjectList.Last

Return the last non-nil object in the list.

TObjectList.Pack


TObjectList.IndexOf

Search for an object in the list

Declaration

Source position: contnrs.pp line 85

public function TObjectList.IndexOf(

  AObject: TObject

):Integer;

Arguments

AObject

Object to search for.

Function result

Position (index) at which object was found

Description

IndexOf overrides the TList implementation to accept an object instance instead of a pointer.

The function returns the index of the first match for AObject in the list, or -1 if no match was found.

Errors

None.

See also

TObjectList.FindInstanceOf

Search for an instance of a certain class


TObjectList.Insert

Insert an object in the list.

Declaration

Source position: contnrs.pp line 87

public procedure TObjectList.Insert(

  Index: Integer;

  AObject: TObject

);

Arguments

Index | Position to insert object at.
AObject | Object to insert

Description

Insert inserts AObject in the list at position Index. The index is zero-based. This method overrides the implementation in TList to accept objects instead of pointers.

Errors

If an invalid Index is specified, an exception is raised.

See also

TObjectList.Add | Add an object to the list.
TObjectList.Remove | Remove (and possibly free) an element from the list.


TObjectList.Items

Indexed access to the elements of the list.

Declaration

Source position: contnrs.pp line 91

public property TObjectList.Items: TObject
  read GetItem
  write SetItem;
  default;

Description

Items is the default property of the list. It provides indexed access to the elements in the list. The index Index is zero based, i.e., runs from 0 (zero) to Count-1.

See also

#rtl.classes.TList.Count


TObjectList.Last

Return the last non-nil object in the list.

Declaration

Source position: contnrs.pp line 89

public function TObjectList.Last: TObject;

Function result

Last non-nil object in the list.

Description

Last returns a reference to the last non-Nil element in the list. If no non-Nil element is found, Nil is returned.

Errors

None.

See also

TObjectList.First

Return the first non-nil object in the list

TObjectList.Pack


TObjectList.OwnsObjects

Should the list free elements when they are removed.

Declaration

Source position: contnrs.pp line 90

public property TObjectList.OwnsObjects: Boolean
  read FFreeObjects
  write FFreeObjects;

Description

OwnsObjects determines whether the objects in the list should be freed when they are removed (not extracted) from the list, or when the list is cleared. If the property is True then they are freed. If the property is False the elements are not freed.

The value is usually set in the constructor, and is seldom changed during the lifetime of the list. It defaults to True.

See also

TObjectList.Create | Create a new object list.
TObjectList.Delete
TObjectList.Remove | Remove (and possibly free) an element from the list.
TObjectList.Clear


TObjectList.Remove

Remove (and possibly free) an element from the list.

Declaration

Source position: contnrs.pp line 84

public function TObjectList.Remove(

  AObject: TObject

):Integer;

Arguments

AObject

Object to remove from the list.

Function result

Index of the removed object, or -1 if none was removed.

Description

Remove removes Item from the list, if it is present in the list. It frees Item if OwnsObjects is True, and returns the index of the object that was found in the list, or -1 if the object was not found.

Note that only the first found object is removed from the list.

Errors

None.

See also

TObjectList.Extract

Extract an object from the list.


TObjectListCallback

Method callback type for TFPObjectList.ForEachCall

Declaration

Source position: contnrs.pp line 28

type TObjectListCallback = procedure(

  data: TObject;

  arg: pointer

) of object;

Arguments

data | Object from the list
arg | Data passed to ForEachCall

Description

TObjectListCallback is used as the prototype for the TFPObjectList.ForEachCall link call when a method should be called. The Data argument will contain each of the objects in the list in turn, and the Data argument will contain the data passed to the ForEachCall call.

See also

TFPObjectList.ForEachCall

For each object in the list, call a method or procedure, passing it the object.


TObjectListStaticCallback

Plan procedure callback type for TFPObjectList.ForEachCall

Declaration

Source position: contnrs.pp line 29

type TObjectListStaticCallback = procedure(

  data: TObject;

  arg: pointer

);

Arguments

data | Object from the list
arg | Data passed to ForEachCall

Description

TObjectListCallback is used as the prototype for the TFPObjectList.ForEachCall link call when a plain procedure should be called. The Data argument will contain each of the objects in the list in turn, and the Data argument will contain the data passed to the ForEachCall call.

See also

TFPObjectList.ForEachCall

For each object in the list, call a method or procedure, passing it the object.


TObjectQueue

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Declaration

Source position: contnrs.pp line 172

type TObjectQueue = class(TQueue)
public
function Push(); | Push an object on the queue
function Pop; | Pop the first element off the queue
function Peek; | Look at the first object in the queue.
end;

Inheritance

TObjectQueue
|
TQueue | Pointer queue
|
TOrderedList | Base class for queues and stacks.
|
TObject


TObjectQueue

TQueue

TOrderedList

TObject


TObjectQueue
 | Push
 | Pop
 | Peek
TQueue
TOrderedList
 | Create
 | Destroy
 | Count
 | AtLeast
 | Push
 | Pop
 | Peek
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

AtLeast (TOrderedList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Count (TOrderedList)

Create (TObject)

Create (TOrderedList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOrderedList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Peek (TOrderedList)

Peek (TObjectQueue)

Pop (TOrderedList)

Pop (TObjectQueue)

Push (TOrderedList)

Push (TObjectQueue)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TObjectQueue.Peek

Look at the first object in the queue.

Declaration

Source position: contnrs.pp line 176

public function TObjectQueue.Peek: TObject;

Function result

The first element in the queue, or Nil if the queue is empty

Description

Peek returns the first object in the queue, without removing it from the queue. If there are no more objects in the queue, Nil is returned.

Errors

None

See also

TObjectQueue.Push | Push an object on the queue
TObjectQueue.Pop | Pop the first element off the queue


TObjectQueue.Pop

Pop the first element off the queue

Declaration

Source position: contnrs.pp line 175

public function TObjectQueue.Pop: TObject;

Function result

The first element in the queue, or Nil if the queue is empty

Description

Pop removes the first element in the queue, and returns a reference to the instance. If the queue is empty, Nil is returned.

Errors

None.

See also

TObjectQueue.Push | Push an object on the queue
TObjectQueue.Peek | Look at the first object in the queue.


TObjectQueue.Push

Push an object on the queue

Declaration

Source position: contnrs.pp line 174

public function TObjectQueue.Push(

  AObject: TObject

):TObject;

Arguments

AObject

Object to push on the queue

Function result

The element just pushed on the queue

Description

Push pushes another object on the queue. It overrides the Push method as implemented in TQueue so it accepts only objects as arguments.

Errors

If not enough memory is available to expand the queue, an exception may be raised.

See also

TObjectQueue.Pop | Pop the first element off the queue
TObjectQueue.Peek | Look at the first object in the queue.


TObjectStack

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Object instances stack

Declaration

Source position: contnrs.pp line 156

type TObjectStack = class(TStack)
public
function Push(); | Push an object on the stack.
function Pop; | Pop the top object of the stack.
function Peek; | Look at the top object in the stack.
end;

Inheritance

TObjectStack | Object instances stack
|
TStack | Pointer Stack
|
TOrderedList | Base class for queues and stacks.
|
TObject

Description

TObjectStack is a stack implementation which manages pointers only.

TObjectStack introduces no new behaviour, it simply overrides some methods to accept and/or return TObject instances instead of pointers.

See also

TOrderedList | Base class for queues and stacks.
TStack | Pointer Stack
TQueue | Pointer queue
TObjectQueue


TObjectStack

TStack

TOrderedList

TObject


TObjectStack
 | Push
 | Pop
 | Peek
TStack
TOrderedList
 | Create
 | Destroy
 | Count
 | AtLeast
 | Push
 | Pop
 | Peek
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

AtLeast (TOrderedList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Count (TOrderedList)

Create (TObject)

Create (TOrderedList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOrderedList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Peek (TOrderedList)

Peek (TObjectStack)

Pop (TOrderedList)

Pop (TObjectStack)

Push (TOrderedList)

Push (TObjectStack)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TObjectStack.Peek

Look at the top object in the stack.

Declaration

Source position: contnrs.pp line 160

public function TObjectStack.Peek: TObject;

Function result

The top object on the stack, or Nil if the stack is empty.

Description

Peek returns the top object of the stack, without removing it from the stack. If there are no more objects on the stack, Nil is returned.

Errors

None

See also

TObjectStack.Push | Push an object on the stack.
TObjectStack.Pop | Pop the top object of the stack.


TObjectStack.Pop

Pop the top object of the stack.

Declaration

Source position: contnrs.pp line 159

public function TObjectStack.Pop: TObject;

Function result

The top object on the stack, or Nil if the stack is empty.

Description

Pop pops the top object of the stack, and returns the object instance. If there are no more objects on the stack, Nil is returned.

Errors

None

See also

TObjectStack.Push | Push an object on the stack.
TObjectStack.Peek | Look at the top object in the stack.


TObjectStack.Push

Push an object on the stack.

Declaration

Source position: contnrs.pp line 158

public function TObjectStack.Push(

  AObject: TObject

):TObject;

Arguments

AObject

The object instance to push on the stack.

Function result

The element pushed on the stack.

Description

Push pushes another object on the stack. It overrides the Push method as implemented in TStack so it accepts only objects as arguments.

Errors

If not enough memory is available to expand the stack, an exception may be raised.

See also

TObjectStack.Pop | Pop the top object of the stack.
TObjectStack.Peek | Look at the top object in the stack.


TOrderedList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for queues and stacks.

Declaration

Source position: contnrs.pp line 129

type TOrderedList = class(TObject)
public
constructor Create; | Create a new ordered list
destructor Destroy; override; | Free an ordered list
function Count; | Number of elements on the list.
function AtLeast(); | Check whether the list contains a certain number of elements.
function Push(); | Push another element on the list.
function Pop; | Remove an element from the list.
function Peek; | Return the next element to be popped from the list.
end;

Inheritance

TOrderedList

Base class for queues and stacks.
|

TObject

Description

TOrderedList provides the base class for TQueue and TStack. It provides an interface for pushing and popping elements on or off the list, and manages the internal list of pointers.

Note that TOrderedList does not manage objects on the stack, i.e. objects are not freed when the ordered list is destroyed.

See also

TQueue | Pointer queue
TStack | Pointer Stack


TOrderedList

TObject


TOrderedList
 | Create
 | Destroy
 | Count
 | AtLeast
 | Push
 | Pop
 | Peek
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

AtLeast (TOrderedList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Count (TOrderedList)

Create (TObject)

Create (TOrderedList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOrderedList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Peek (TOrderedList)

Pop (TOrderedList)

Push (TOrderedList)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TOrderedList.AtLeast

Check whether the list contains a certain number of elements.

Declaration

Source position: contnrs.pp line 141

public function TOrderedList.AtLeast(

  ACount: Integer

):Boolean;

Arguments

ACount

Required number of elements

Function result

True if ACount or more elements in the list.

Description

AtLeast returns True if the number of elements in the list is equal to or bigger than ACount. It returns False otherwise.

Errors

None.

See also

TOrderedList.Count

Number of elements on the list.


TOrderedList.Count

Number of elements on the list.

Declaration

Source position: contnrs.pp line 140

public function TOrderedList.Count: Integer;

Function result

Number of elements on the list.

Description

Count is the number of pointers in the list.

Errors

None.

See also

TOrderedList.AtLeast

Check whether the list contains a certain number of elements.


TOrderedList.Create

Create a new ordered list

Declaration

Source position: contnrs.pp line 138

public constructor TOrderedList.Create;

Description

Create instantiates a new ordered list. It initializes the internal pointer list.

Errors

None.

See also

TOrderedList.Destroy

Free an ordered list


TOrderedList.Destroy

Free an ordered list

Declaration

Source position: contnrs.pp line 139

public destructor TOrderedList.Destroy; override;

Description

Destroy cleans up the internal pointer list, and removes the TOrderedList instance from memory.

Errors

None.

See also

TOrderedList.Create

Create a new ordered list


TOrderedList.Peek

Return the next element to be popped from the list.

Declaration

Source position: contnrs.pp line 144

public function TOrderedList.Peek: Pointer;

Function result

Next element to be popped from the list.

Description

Peek returns the element that will be popped from the list at the next call to Pop, without actually popping it from the list.

Errors

None.

See also

TOrderedList.Pop | Remove an element from the list.
TOrderedList.Push | Push another element on the list.


TOrderedList.Pop

Remove an element from the list.

Declaration

Source position: contnrs.pp line 143

public function TOrderedList.Pop: Pointer;

Function result

The element removed from the list.

Description

Pop removes an element from the list, and returns the element that was removed from the list. If no element is on the list, Nil is returned.

Errors

None.

See also

TOrderedList.Peek | Return the next element to be popped from the list.
TOrderedList.Push | Push another element on the list.


TOrderedList.Push

Push another element on the list.

Declaration

Source position: contnrs.pp line 142

public function TOrderedList.Push(

  AItem: Pointer

):Pointer;

Arguments

AItem

Item to add to the list.

Function result

The element added to the list.

Description

Push adds AItem to the list, and returns AItem.

Errors

If not enough memory is available to expand the list, an exception may be raised.

See also

TOrderedList.Pop | Remove an element from the list.
TOrderedList.Peek | Return the next element to be popped from the list.


TQueue

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Pointer queue

Declaration

Source position: contnrs.pp line 165

type TQueue = class(TOrderedList)

end;

Inheritance

TQueue | Pointer queue
|
TOrderedList | Base class for queues and stacks.
|
TObject

Description

TQueue is a descendent of TOrderedList which implements Push and Pop behaviour as a queue: what is first pushed on the queue, is popped of first (FIFO: First in, first out).

TQueue offers no new methods, it merely implements some abstract methods introduced by TOrderedList

See also

TOrderedList | Base class for queues and stacks.
TObjectQueue
TStack | Pointer Stack


TQueue

TOrderedList

TObject


TQueue
TOrderedList
 | Create
 | Destroy
 | Count
 | AtLeast
 | Push
 | Pop
 | Peek
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TStack

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Pointer Stack

Declaration

Source position: contnrs.pp line 149

type TStack = class(TOrderedList)

end;

Inheritance

TStack | Pointer Stack
|
TOrderedList | Base class for queues and stacks.
|
TObject

Description

TStack is a descendent of TOrderedList which implements Push and Pop behaviour as a stack: what is last pushed on the stack, is popped of first (LIFO: Last in, first out).

TStack offers no new methods, it merely implements some abstract methods introduced by TOrderedList

See also

TOrderedList | Base class for queues and stacks.
TObjectStack | Object instances stack
TQueue | Pointer queue


TStack

TOrderedList

TObject


TStack
TOrderedList
 | Create
 | Destroy
 | Count
 | AtLeast
 | Push
 | Pop
 | Peek
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TCustomApplication

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ancestor class for TApplication classes.

Declaration

Source position: custapp.pp line 29

type TCustomApplication = class(TComponent)
public
constructor Create(); override; | Create a new instance of the TCustomApplication class
destructor Destroy; override; | Destroys the TCustomApplication instance.
procedure HandleException(); virtual; | Handle an exception.
procedure Initialize; virtual; | Initialize the application
procedure Run; | Runs the application.
procedure ShowException(); virtual; | Show an exception to the user
procedure Terminate; virtual; | Terminate the application.
function FindOptionIndex(); | Return the index of an option.
public
function GetOptionValue(); | Return the value of a command-line option.
function HasOption(); | Check whether an option was specified.
function CheckOptions(); | Check whether all given options on the command-line are valid.
procedure GetEnvironmentList(); | Return a list of environment variables.
public
procedure Log(); | Write a message to the event log
property ExeName: ; [r] | Name of the executable.
property HelpFile: ; [rw] | Location of the application help file.
property Terminated: Boolean; [r] | Was Terminate called or not
property Title: ; [rw] | Application title
property OnException: TExceptionEvent; [rw] | Exception handling event
property ConsoleApplication: Boolean; [r] | Is the application a console application or not
property Location: ; [r] | Application location
property Params: ; [r] | Command-line parameters
property ParamCount: Integer; [r] | Number of command-line parameters
property EnvironmentVariable: ; [r] | Environment variable access
property OptionChar: Char; [rw] | Command-line switch character
property CaseSensitiveOptions: Boolean; [rw] | Are options interpreted case sensitive or not
property StopOnException: Boolean; [rw] | Should the program loop stop on an exception
property EventLogFilter: TEventLogTypes; [rw] | Event to filter events, before they are sent to the system log
end;

Inheritance

TCustomApplication

Ancestor class for TApplication classes.
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TCustomApplication is the ancestor class for classes that whish to implement a global application class instance. It introduces several application-wide functionalities.

  • Exception handling in HandleException, ShowException, OnException and StopOnException.
  • Command-line parameter parsing in FindOptionIndex, GetOptionValue, CheckOptions and HasOption
  • Environment variable handling in GetEnvironmentList and EnvironmentVariable.

Descendent classes need to override the DoRun protected method to implement the functionality of the program.


TCustomApplication
 | ro | ExeName
 |  | HelpFile
 | ro | Terminated
 |  | Title
 | ro | ConsoleApplication
 | ro | Location
 | ro | Params
 | ro | ParamCount
 | ro | EnvironmentVariable
 |  | OptionChar
 |  | CaseSensitiveOptions
 |  | StopOnException
 |  | EventLogFilter
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


ro | ComObject (TComponent)
ro | ComponentCount (TComponent)
 | ComponentIndex (TComponent)
ro | Components (TComponent)
ro | ComponentState (TComponent)
ro | ComponentStyle (TComponent)
ro | ConsoleApplication (TCustomApplication)
 | DesignInfo (TComponent)
ro | EnvironmentVariable (TCustomApplication)
 | EventLogFilter (TCustomApplication)
ro | ExeName (TCustomApplication)
 | HelpFile (TCustomApplication)
ro | Location (TCustomApplication)
 | Name (TComponent)
 | OptionChar (TCustomApplication)
ro | Owner (TComponent)
ro | ParamCount (TCustomApplication)
ro | Params (TCustomApplication)
 | StopOnException (TCustomApplication)
 | Tag (TComponent)
ro |


TCustomApplication
 | Create
 | Destroy
 | HandleException
 | Initialize
 | Run
 | ShowException
 | Terminate
 | FindOptionIndex
 | GetOptionValue
 | HasOption
 | CheckOptions
 | GetEnvironmentList
 | Log
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckOptions (TCustomApplication)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TCustomApplication)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TCustomApplication)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FindOptionIndex (TCustomApplication)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetEnvironmentList (TCustomApplication)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOptionValue (TCustomApplication)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HandleException (TCustomApplication)

HasOption (TCustomApplication)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

Initialize (TCustomApplication)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

Log (TCustomApplication)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

Run (TCustomApplication)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

ShowException (TCustomApplication)

StringMessageTable (TObject)

Terminate (TCustomApplication)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TCustomApplication

OnException

TComponent

TPersistent

TObject


OnException (TCustomApplication)


TCustomApplication.CaseSensitiveOptions

Are options interpreted case sensitive or not

Declaration

Source position: custapp.pp line 85

public property TCustomApplication.CaseSensitiveOptions: Boolean
  read FCaseSensitiveOptions
  write FCaseSensitiveOptions;

Description

CaseSensitiveOptions determines whether FindOptionIndex and CheckOptions perform searches in a case sensitive manner or not. By default, the search is case-sensitive. Setting this property to False makes the search case-insensitive.

See also

FindOptionIndex | Return the index of an option.
GetOptionValue | Return the value of a command-line option.
HasOption | Check whether an option was specified.
OptionChar | Command-line switch character
CheckOptions | Check whether all given options on the command-line are valid.


TCustomApplication.CheckOptions

Check whether all given options on the command-line are valid.

Declaration

Source position: line 0

function TCustomApplication.CheckOptions(

  const ShortOptions: ;

  const Longopts: TStrings;

  Opts: TStrings;

  NonOpts: TStrings

):;

function TCustomApplication.CheckOptions(

  const ShortOptions: ;

  const Longopts: TStrings

):;

function TCustomApplication.CheckOptions(

  const ShortOptions: ;

  const LongOpts: array of

):;

function TCustomApplication.CheckOptions(

  const ShortOptions: ;

  const LongOpts:

):;

Arguments

ShortOptions | List of valid short options.
Longopts | List of valid long options.
Opts | Valid options passed to the program.
NonOpts | Non-option strings passed to the program.

Function result

Empty string or error-message

Arguments

ShortOptions | List of valid short options.
Longopts | List of valid long options.

Arguments

ShortOptions | List of valid short options.
LongOpts | List of valid long options.

Arguments

ShortOptions | List of valid short options.
LongOpts | List of valid long options.

Description

CheckOptions scans the command-line and checks whether the options given are valid options. It also checks whether options that require a valued are indeed specified with a value.

The ShortOptions contains a string with valid short option characters. Each character in the string is a valid option character. If a character is followed by a colon (:), then a value must be specified. If it is followed by 2 colon characters (::) then the value is optional.

LongOpts is a list of strings (which can be specified as an array, a TStrings instance or a string with whitespace-separated values) of valid long options.

When the function returns, if Opts is non-Nil, the Opts stringlist is filled with the passed valid options. If NonOpts is non-nil, it is filled with any non-option strings that were passed on the command-line.

The function returns an empty string if all specified options were valid options, and whether options requiring a value have a value. If an error was found during the check, the return value is a string describing the error.

Options are identified as command-line parameters which start with OptionChar (by default the dash ('-') character).

Errors

if an error was found during the check, the return value is a string describing the error.

See also

FindOptionIndex | Return the index of an option.
GetOptionValue | Return the value of a command-line option.
HasOption | Check whether an option was specified.
CaseSensitiveOptions | Are options interpreted case sensitive or not
OptionChar | Command-line switch character


TCustomApplication.ConsoleApplication

Is the application a console application or not

Declaration

Source position: custapp.pp line 79

public property TCustomApplication.ConsoleApplication: Boolean
  read GetConsoleApplication;

Description

ConsoleApplication returns True if the application is compiled as a console application (the default) or False if not. The result of this property is determined at compile-time by the settings of the compiler: it returns the value of the IsConsole constant.

See also

IsConsole


TCustomApplication.Create

Create a new instance of the TCustomApplication class

Declaration

Source position: custapp.pp line 51

public constructor TCustomApplication.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner component. Usually Nil.

Description

Create creates a new instance of the TCustomApplication class. It sets some defaults for the various properties, and then calls the inherited Create.

See also

TCustomApplication.Destroy

Destroys the TCustomApplication instance.


TCustomApplication.Destroy

Destroys the TCustomApplication instance.

Declaration

Source position: custapp.pp line 52

public destructor TCustomApplication.Destroy; override;

Description

Destroy simply calls the inherited Destroy.

See also

TCustomApplication.Create

Create a new instance of the TCustomApplication class


TCustomApplication.EnvironmentVariable

Environment variable access

Declaration

Source position: custapp.pp line 83

public property TCustomApplication.EnvironmentVariable:
  read GetEnvironmentVar;

Description

EnvironmentVariable gives access to the environment variables of the application: It returns the value of the environment variable EnvName, or an empty string if no such value is available.

To use this property, the name of the environment variable must be known. To get a list of available names (and values), GetEnvironmentList can be used.

See also

GetEnvironmentList | Return a list of environment variables.
TCustomApplication.Params | Command-line parameters


TCustomApplication.EventLogFilter

Event to filter events, before they are sent to the system log

Declaration

Source position: custapp.pp line 87

public property TCustomApplication.EventLogFilter: TEventLogTypes
  read FEventLogFilter
  write FEventLogFilter;

Description

EventLogFilter can be set to a set of event types that should be logged to the system log. If the set is empty, all event types are sent to the system log. If the set is non-empty, the TCustomApplication.Log routine will check if the log event type is in the set, and if not, will not send the message to the system log.

See also

TCustomApplication.Log

Write a message to the event log


TCustomApplication.ExeName

Name of the executable.

Declaration

Source position: custapp.pp line 73

public property TCustomApplication.ExeName:
  read GetExeName;

Description

ExeName returns the full name of the executable binary (path+filename). This is equivalent to Paramstr(0)

Note that some operating systems do not return the full pathname of the binary.

See also

ParamStr


TCustomApplication.FindOptionIndex

Return the index of an option.

Declaration

Source position: custapp.pp line 60

public function TCustomApplication.FindOptionIndex(

  const S: ;

  var Longopt: Boolean

):Integer;

Arguments

S | Short option to search for.
Longopt | Long option to search for.

Function result

Position on commandline of option.

Description

FindOptionIndex will return the index of the option S or the long option LongOpt. Neither of them should include the switch character. If no such option was specified, -1 is returned. If either the long or short option was specified, then the position on the command-line is returned.

Depending on the value of the CaseSensitiveOptions property, the search is performed case sensitive or case insensitive.

Options are identified as command-line parameters which start with OptionChar (by default the dash ('-') character).

See also

HasOption | Check whether an option was specified.
GetOptionValue | Return the value of a command-line option.
CheckOptions | Check whether all given options on the command-line are valid.
CaseSensitiveOptions | Are options interpreted case sensitive or not
OptionChar | Command-line switch character


TCustomApplication.GetEnvironmentList

Return a list of environment variables.

Declaration

Source position: line 0

procedure TCustomApplication.GetEnvironmentList(

  List: TStrings;

  NamesOnly: Boolean

);

procedure TCustomApplication.GetEnvironmentList(

  List: TStrings

);

Arguments

List | List to return environment strings in.
NamesOnly | If True, only environment variable names will be returned.

Arguments

List

List to return environment strings in.

Description

GetEnvironmentList returns a list of environment variables in List. They are in the form Name=Value, one per item in list. If NamesOnly is True, then only the names are returned.

See also

EnvironmentVariable

Environment variable access


TCustomApplication.GetOptionValue

Return the value of a command-line option.

Declaration

Source position: line 0

function TCustomApplication.GetOptionValue(

  const S:

):;

function TCustomApplication.GetOptionValue(

  const C: Char;

  const S:

):;

Arguments

S

Long option string

Function result

Option value, or empty string.

Arguments

C | Short option character
S | Long option string

Description

GetOptionValue returns the value of an option. Values are specified in the usual GNU option format, either of

--longopt=Value

or

-c Value

is supported.

The function returns the specified value, or the empty string if none was specified.

Depending on the value of the CaseSensitiveOptions property, the search is performed case sensitive or case insensitive.

Options are identified as command-line parameters which start with OptionChar (by default the dash ('-') character).

See also

FindOptionIndex | Return the index of an option.
HasOption | Check whether an option was specified.
CheckOptions | Check whether all given options on the command-line are valid.
CaseSensitiveOptions | Are options interpreted case sensitive or not
OptionChar | Command-line switch character


TCustomApplication.HandleException

Handle an exception.

Declaration

Source position: custapp.pp line 54

public procedure TCustomApplication.HandleException(

  Sender: TObject

); virtual;

Arguments

Sender

Sender class calling this routine

Description

HandleException is called (or can be called) to handle the exception Sender. If the exception is not of class Exception then the default handling of exceptions in the SysUtils unit is called.

If the exception is of class Exception and the OnException handler is set, the handler is called with the exception object and Sender argument.

If the OnException handler is not set, then the exception is passed to the ShowException routine, which can be overridden by descendent application classes to show the exception in a way that is fit for the particular class of application. (a GUI application might show the exception in a message dialog.

When the exception is handled in the above manner, and the StopOnException property is set to True, the Terminated property is set to True, which will cause the Run loop to stop, and the application will exit.

See also

ShowException | Show an exception to the user
StopOnException | Should the program loop stop on an exception
Terminated | Was Terminate called or not
Run | Runs the application.


TCustomApplication.HasOption

Check whether an option was specified.

Declaration

Source position: line 0

function TCustomApplication.HasOption(

  const S:

):Boolean;

function TCustomApplication.HasOption(

  const C: Char;

  const S:

):Boolean;

Arguments

S

Long option string

Function result

True if the option S or C was specified on the command-line.

Arguments

C | Short option character.
S | Long option string

Description

HasOption returns True if the specified option was given on the command line. Either the short option character C or the long option S may be used. Note that both options (requiring a value) and switches can be specified.

Depending on the value of the CaseSensitiveOptions property, the search is performed case sensitive or case insensitive.

Options are identified as command-line parameters which start with OptionChar (by default the dash ('-') character).

See also

FindOptionIndex | Return the index of an option.
GetOptionValue | Return the value of a command-line option.
CheckOptions | Check whether all given options on the command-line are valid.
CaseSensitiveOptions | Are options interpreted case sensitive or not
OptionChar | Command-line switch character


TCustomApplication.HelpFile

Location of the application help file.

Declaration

Source position: custapp.pp line 74

public property TCustomApplication.HelpFile:
  read FHelpFile
  write FHelpFile;

Description

HelpFile is the location of the application help file. It is a simple string property which can be set by an IDE such as Lazarus, and is mainly provided for compatibility with Delphi's TApplication implementation.

See also

TCustomApplication.Title

Application title


TCustomApplication.Initialize

Initialize the application

Declaration

Source position: custapp.pp line 55

public procedure TCustomApplication.Initialize; virtual;

Description

Initialize can be overridden by descendent applications to perform any initialization after the class was created. It can be used to react to properties being set at program startup. End-user code should call Initialize prior to calling Run

In TCustomApplication, Initialize sets Terminated to False.

See also

TCustomApplication.Run | Runs the application.
TCustomApplication.Terminated | Was Terminate called or not


TCustomApplication.Location

Application location

Declaration

Source position: custapp.pp line 80

public property TCustomApplication.Location:
  read GetLocation;

Description

Location returns the directory part of the application binary. This property works on most platforms, although some platforms do not allow to retrieve this information (Mac OS under certain circumstances). See the discussion of Paramstr in the RTL documentation.

See also

Paramstr

Params

Command-line parameters


TCustomApplication.Log

Write a message to the event log

Declaration

Source position: custapp.pp line 71

public procedure TCustomApplication.Log(

  EventType: TEventType;

  const Msg:

);

Arguments

EventType | Type of event
Msg | Message to log

Description

Log is meant for all applications to have a default logging mechanism. By default it does not do anything, descendent classes should override this method to provide appropriate logging: they should write the message Msg with type EventType to some log mechanism such as #fcl.eventlog.TEventLog

Errors

None.

See also

#rtl.sysutils.TEventType


TCustomApplication.OnException

Exception handling event

Declaration

Source position: custapp.pp line 77

public property TCustomApplication.OnException: TExceptionEvent
  read FOnException
  write FOnException;

Description

OnException can be set to provide custom handling of events, instead of the default action, which is simply to show the event using ShowEvent.

If set, OnException is called by the HandleEvent routine. Do not use the OnException event directly, instead call HandleEvent

See also

ShowEvent


TCustomApplication.OptionChar

Command-line switch character

Declaration

Source position: custapp.pp line 84

public property TCustomApplication.OptionChar: Char
  read FoptionChar
  write FOptionChar;

Description

OptionChar is the character used for command line switches. By default, this is the dash ('-') character, but it can be set to any other non-alphanumerical character (although no check is performed on this).

See also

FindOptionIndex | Return the index of an option.
GetOptionValue | Return the value of a command-line option.
HasOption | Check whether an option was specified.
CaseSensitiveOptions | Are options interpreted case sensitive or not
CheckOptions | Check whether all given options on the command-line are valid.


TCustomApplication.ParamCount

Number of command-line parameters

Declaration

Source position: custapp.pp line 82

public property TCustomApplication.ParamCount: Integer
  read GetParamCount;

Description

ParamCount returns the number of command-line parameters that were passed to the program. The actual parameters can be retrieved with the Params property.

See also

Params

Command-line parameters

Paramstr

ParamCount


TCustomApplication.Params

Command-line parameters

Declaration

Source position: custapp.pp line 81

public property TCustomApplication.Params:
  read GetParams;

Description

Params gives access to the command-line parameters. They contain the value of the Index-th parameter, where Index runs from 0 to ParamCount. It is equivalent to calling ParamStr.

See also

ParamCount

Number of command-line parameters

Paramstr


TCustomApplication.Run

Runs the application.

Declaration

Source position: custapp.pp line 56

public procedure TCustomApplication.Run;

Description

Run is the start of the user code: when called, it starts a loop and repeatedly calls DoRun until Terminated is set to True. If an exception is raised during the execution of DoRun, it is caught and handled to TCustomApplication.HandleException. If TCustomApplication.StopOnException is set to True (which is not the default), Run will exit, and the application will then terminate. The default is to call DoRun again, which is useful for applications running a message loop such as services and GUI applications.

See also

TCustomApplication.HandleException

Handle an exception.

TCustomApplication.StopException


TCustomApplication.ShowException

Show an exception to the user

Declaration

Source position: custapp.pp line 57

public procedure TCustomApplication.ShowException(

  E: Exception

); virtual;

Arguments

E

Exception object to show

Description

ShowException should be overridden by descendent classes to show an exception message to the user. The default behaviour is to call the ShowException procedure in the SysUtils unit.

Descendent classes should do something appropriate for their context: GUI applications can show a message box, daemon applications can write the exception message to the system log, web applications can send a 500 error response code.

Errors

None.

See also

ShowException

TCustomApplication.HandleException

Handle an exception.

TCustomApplication.StopException


TCustomApplication.StopOnException

Should the program loop stop on an exception

Declaration

Source position: custapp.pp line 86

public property TCustomApplication.StopOnException: Boolean
  read FStopOnException
  write FStopOnException;

Description

StopOnException controls the behaviour of the Run and HandleException procedures in case of an unhandled exception in the DoRun code. If StopOnException is True then Terminate will be called after the exception was handled.

See also

Run | Runs the application.
HandleException | Handle an exception.
Terminate | Terminate the application.


TCustomApplication.Terminate

Terminate the application.

Declaration

Source position: custapp.pp line 58

public procedure TCustomApplication.Terminate; virtual;

Description

Terminate sets the Terminated property to True. By itself, this does not terminate the application. Instead, descendent classes should in their DoRun method, check the value of the Terminated property and properly shut down the application if it is set to True.

See also

TCustomApplication.Terminated | Was Terminate called or not
TCustomApplication.Run | Runs the application.


TCustomApplication.Terminated

Was Terminate called or not

Declaration

Source position: custapp.pp line 75

public property TCustomApplication.Terminated: Boolean
  read FTerminated;

Description

Terminated indicates whether Terminate was called or not. Descendent classes should check Terminated at regular intervals in their implementation of DoRun, and if it is set to True, should exit gracefully the DoRun method.

See also

Terminate

Terminate the application.


TCustomApplication.Title

Application title

Declaration

Source position: custapp.pp line 76

public property TCustomApplication.Title:
  read FTitle
  write SetTitle;

Description

Title is a simple string property which can be set to any string describing the application. It does nothing by itself, and is mainly introduced for compatibility with Delphi's TApplication implementation.

See also

HelpFile

Location of the application help file.


EDaemon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception used in all daemon application code

Declaration

Source position: daemonapp.pp line 384

type EDaemon = class(Exception) ;

Inheritance

EDaemon

Exception used in all daemon application code
|

Exception
|

TObject

Description

EDaemon is the exception class used by all code in the DaemonApp unit.

See also

DaemonError

Raise an EDaemon exception


EDaemon
Exception
 | HelpContext
 | Message
TObject


EDaemon
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EDaemon

Exception

TObject


TCustomDaemon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base daemon application class

Declaration

Source position: daemonapp.pp line 41

type TCustomDaemon = class(TDataModule)
public
procedure LogMessage(); | Log a message to the system log
procedure ReportStatus; | Report the current status to the operating system
property Definition: TDaemonDef; [r] | The definition used to instantiate this daemon instance
property DaemonThread: TThread; [r] | Thread in which daemon is running
property Controller: TDaemonController; [r] | TDaemonController instance controlling this daemon instance
property Status: TCurrentStatus; [rw] | Current status of the daemon
property Logger: TEventLog; [r] | TEventLog instance used to send messages to the system log
end;

Inheritance

TCustomDaemon

Base daemon application class
|

TDataModule
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TCustomDaemon implements all the basic calls that are needed for a daemon to function. Descendents of TCustomDaemon can override these calls to implement the daemon-specific behaviour.

TCustomDaemon is an abstract class, it should never be instantiated. Either a descendent of it must be created and instantiated, or a descendent of TDaemon can be designed to implement the behaviour of the daemon.

See also

TDaemon | Daemon class for visual development
TDaemonDef | Daemon definition
TDaemonController | Internal daemon controller class
TDaemonApplication | Default descendent of CustomDaemonApplication


TCustomDaemon
 | ro | Definition
 | ro | DaemonThread
 | ro | Controller
 |  | Status
 | ro | Logger
TDataModule
 |  | DesignOffset
 |  | DesignSize
 |  | OldCreateOrder
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


ro | ComObject (TComponent)
ro | ComponentCount (TComponent)
 | ComponentIndex (TComponent)
ro | Components (TComponent)
ro | ComponentState (TComponent)
ro | ComponentStyle (TComponent)
ro | Controller (TCustomDaemon)
ro | DaemonThread (TCustomDaemon)
ro | Definition (TCustomDaemon)
 | DesignInfo (TComponent)
 | DesignOffset (TDataModule)
 | DesignSize (TDataModule)
ro | Logger (TCustomDaemon)
 | Name (TComponent)
 | OldCreateOrder (TDataModule)
ro | Owner (TComponent)
 | Status (TCustomDaemon)
 | Tag (TComponent)
 | VCLComObject (TComponent)


TCustomDaemon
 | LogMessage
 | ReportStatus
TDataModule
 | ReadT
 | WriteT
 | ReadL
 | WriteL
 | ReadW
 | WriteW
 | ReadH
 | WriteH
 | DoCreate
 | DoDestroy
 | DefineProperties
 | GetChildren
 | HandleCreateException
 | ReadState
 | Create
 | CreateNew
 | Destroy
 | AfterConstruction
 | BeforeDestruction
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

BeforeDestruction (TDataModule)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TDataModule)

CreateNew (TDataModule)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

DefineProperties (TDataModule)

Destroy (TObject)

Destroy (TComponent)

Destroy (TDataModule)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

DoCreate (TDataModule)

DoDestroy (TDataModule)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetChildren (TDataModule)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HandleCreateException (TDataModule)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

LogMessage (TCustomDaemon)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadH (TDataModule)

ReadL (TDataModule)

ReadLeft (TComponent)

ReadState (TComponent)

ReadState (TDataModule)

ReadT (TDataModule)

ReadTop (TComponent)

ReadW (TDataModule)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

ReportStatus (TCustomDaemon)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteH (TDataModule)

WriteL (TDataModule)

WriteLeft (TComponent)

WriteState (TComponent)

WriteT (TDataModule)

WriteTop (TComponent)

WriteW (TDataModule)

_AddRef (TComponent)

_Release (TComponent)


TCustomDaemon
TDataModule
 | OnCreate
 | OnDestroy
TComponent
TPersistent
TObject


OnCreate (TDataModule)

OnDestroy (TDataModule)


TCustomDaemon.Controller

TDaemonController instance controlling this daemon instance

Declaration

Source position: daemonapp.pp line 66

public property TCustomDaemon.Controller: TDaemonController
  read FController;

Description

Controller points to the TDaemonController instance that was created by the application instance to control this daemon.

See also

DaemonThread

Thread in which daemon is running


TCustomDaemon.DaemonThread

Thread in which daemon is running

Declaration

Source position: daemonapp.pp line 65

public property TCustomDaemon.DaemonThread: TThread
  read FThread;

Description

DaemonThread is the thread in which the daemon instance is running. Each daemon instance in the application runs in it's own thread, none of which are the main thread of the application. The application main thread is used to handle control messages coming from the operating system.

See also

Controller

TDaemonController instance controlling this daemon instance


TCustomDaemon.Definition

The definition used to instantiate this daemon instance

Declaration

Source position: daemonapp.pp line 64

public property TCustomDaemon.Definition: TDaemonDef
  read FDaemonDef;

Description

Definition is the TDaemonDef definition that was used to start the daemon instance. It can be used to retrieve additional information about the intended behaviour of the daemon.

See also

TDaemonDef

Daemon definition


TCustomDaemon.Logger

TEventLog instance used to send messages to the system log

Declaration

Source position: daemonapp.pp line 68

public property TCustomDaemon.Logger: TEventLog
  read GetLogger;

Description

Logger is the TEventLog instance used to send messages to the system log. It is used by the LogMessage call, but is acessible through the Logger property in case more configurable logging is needed than offered by LogMessage.

See also

LogMessage | Log a message to the system log
TEventLog | Event logging class


TCustomDaemon.LogMessage

Log a message to the system log

Declaration

Source position: daemonapp.pp line 60

public procedure TCustomDaemon.LogMessage(

  const Msg:

);

Arguments

Msg

Message to send to the system log

Description

LogMessage can be used to send a message Msg to the system log. A TEventLog instance is used to actually send messages to the system log.

The message is sent with an 'error' flag (using TEventLog.Error).

Errors

None.

See also

ReportStatus

Report the current status to the operating system


TCustomDaemon.ReportStatus

Report the current status to the operating system

Declaration

Source position: daemonapp.pp line 61

public procedure TCustomDaemon.ReportStatus;

Description

ReportStatus can be used to report the current status to the operating system. The start and stop or pause and continue operations can be slow to start up. This call can (and should) be used to report the current status to the operating system during such lengthy operations, or else it may conclude that the daemon has died.

This call is mostly important on windows operating systems, to notify the service manager that the operation is still in progress.

The implementation of ReportStatus simply calls ReportStatus in the controller.

Errors

None.

See also

LogMessage

Log a message to the system log


TCustomDaemon.Status

Current status of the daemon

Declaration

Source position: daemonapp.pp line 67

public property TCustomDaemon.Status: TCurrentStatus
  read FStatus
  write SetStatus;

Description

Status indicates the current status of the daemon. It is set by the various operations that the controller operates on the daemon, and should not be set manually.

Status is the value which ReportStatus will send to the operating system.

See also

ReportStatus

Report the current status to the operating system


TCustomDaemonApplication

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Custom daemon application class

Declaration

Source position: daemonapp.pp line 328

type TCustomDaemonApplication = class(TCustomApplication)
public
destructor Destroy; override; | Clean up the TCustomDaemonApplication instance
procedure ShowException(); override; | Show an exception
function CreateDaemon(); | Create daemon instance
procedure StopDaemons(); | Stop all daemons
procedure InstallDaemons; | Install all daemons.
procedure RunDaemons; | Run all daemons.
procedure UnInstallDaemons; | Uninstall all daemons
procedure ShowHelp; | Display a help message
procedure CreateForm(); virtual; | Create a component
property OnRun: TNotifyEvent; [rw] | Event executed when the daemon is run.
property EventLog: TEventLog; [r] | Event logger instance
property GUIMainLoop: TGuiLoopEvent; [rw] | GUI main loop callback
property GuiHandle: THandle; [rw] | Handle of GUI loop main application window handle
property RunMode: TDaemonRunMode; [r] | Application mode
end;

Inheritance

TCustomDaemonApplication | Custom daemon application class
|
TCustomApplication | Ancestor class for TApplication classes.
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TCustomDaemonApplication is a TCustomApplication descendent which is the main application instance for a daemon. It handles the command-line and decides what to do when the application is started, depending on the command-line options given to the application, by calling the various methods.

It creates the necessary TDaemon instances by checking the TCustomDaemonMapperClass instance that contains the daemon maps.

See also

TCustomApplication | Ancestor class for TApplication classes.
TCustomDaemonMapperClass | Class of TCustomDaemonMapper


TCustomDaemonApplication
 | ro | EventLog
 |  | GUIMainLoop
 |  | GuiHandle
 | ro | RunMode
TCustomApplication
 | ro | ExeName
 |  | HelpFile
 | ro | Terminated
 |  | Title
 | ro | ConsoleApplication
 | ro | Location
 | ro | Params
 | ro | ParamCount
 | ro | EnvironmentVariable
 |  | OptionChar
 |  | CaseSensitiveOptions
 |  | StopOnException
 |  | EventLogFilter
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


ro | ComObject (TComponent)
ro | ComponentCount (TComponent)
 | ComponentIndex (TComponent)
ro | Components (TComponent)
ro | ComponentState (TComponent)
ro | ComponentStyle (TComponent)
ro | ConsoleApplication (TCustomApplication)
 | DesignInfo (TComponent)
ro | EnvironmentVariable (TCustomApplication)
ro | EventLog (TCustomDaemonApplication)
 | EventLogFilter (TCustomApplication)
ro | ExeName (TCustomApplication)
 | GuiHandle (TCustomDaemonApplication)
 | GUIMainLoop (TCustomDaemonApplication)
 | HelpFile (TCustomApplication)
ro | Location (TCustomApplication)
 | Name (TComponent)
 | OptionChar (TCustomApplication)
ro | Owner (TComponent)
ro | ParamCount (TCustomApplication)
ro | Params (TCustomApplication)
ro | RunMode (TCustomDaemonApplication)
 | StopOnException (TCustomApplication)
 | Tag (TComponent)
ro |


TCustomDaemonApplication
 | Destroy
 | ShowException
 | CreateDaemon
 | StopDaemons
 | InstallDaemons
 | RunDaemons
 | UnInstallDaemons
 | ShowHelp
 | CreateForm
TCustomApplication
 | Create
 | Destroy
 | HandleException
 | Initialize
 | Run
 | ShowException
 | Terminate
 | FindOptionIndex
 | GetOptionValue
 | HasOption
 | CheckOptions
 | GetEnvironmentList
 | Log
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckOptions (TCustomApplication)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TCustomApplication)

CreateDaemon (TCustomDaemonApplication)

CreateForm (TCustomDaemonApplication)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TCustomApplication)

Destroy (TCustomDaemonApplication)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FindOptionIndex (TCustomApplication)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetEnvironmentList (TCustomApplication)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOptionValue (TCustomApplication)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HandleException (TCustomApplication)

HasOption (TCustomApplication)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

Initialize (TCustomApplication)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstallDaemons (TCustomDaemonApplication)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

Log (TCustomApplication)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

Run (TCustomApplication)

RunDaemons (TCustomDaemonApplication)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

ShowException (TCustomApplication)

ShowException (TCustomDaemonApplication)

ShowHelp (TCustomDaemonApplication)

StopDaemons (TCustomDaemonApplication)

StringMessageTable (TObject)

Terminate (TCustomApplication)

ToString (TObject)

UnInstallDaemons (TCustomDaemonApplication)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TCustomDaemonApplication
 | OnRun
TCustomApplication
 | OnException
TComponent
TPersistent
TObject


OnException (TCustomApplication)

OnRun (TCustomDaemonApplication)


TCustomDaemonApplication.CreateDaemon

Create daemon instance

Declaration

Source position: daemonapp.pp line 367

public function TCustomDaemonApplication.CreateDaemon(

  DaemonDef: TDaemonDef

):TCustomDaemon;

Arguments

DaemonDef

Daemon definition containing information to create a daemon.

Function result

New TCustomDaemon instance.

Description

CreateDaemon is called whenever a TCustomDaemon instance must be created from a TDaemonDef daemon definition, passed in DaemonDef. It initializes the TCustomDaemon instance, and creates a controller instance of type TDaemonController to control the daemon. Finally, it assigns the created daemon to the TDaemonDef.Instance property.

Errors

In case of an error, an exception may be raised.

See also

TDaemonController | Internal daemon controller class
TCustomDaemon | Base daemon application class
TDaemonDef | Daemon definition
TDaemonDef.Instance | Instance of the daemon class


TCustomDaemonApplication.CreateForm

Create a component

Declaration

Source position: daemonapp.pp line 373

public procedure TCustomDaemonApplication.CreateForm(

  InstanceClass: TComponentClass;

  var Reference

); virtual;

Arguments

InstanceClass | Class pointer of component instance to create
Reference | Variable to store the instance pointer in.

Description

CreateForm creates an instance of InstanceClass and fills Reference with the class instance pointer. It's main purpose is to give an IDE a means of assuring that forms or datamodules are created on application startup: the IDE will generate calls for all modules that are auto-created.

Errors

An exception may arise if the instance wants to stream itself from resources, but no resources are found.

See also

TCustomDaemonApplication.CreateDaemon

Create daemon instance


TCustomDaemonApplication.Destroy

Clean up the TCustomDaemonApplication instance

Declaration

Source position: daemonapp.pp line 365

public destructor TCustomDaemonApplication.Destroy; override;

Description

Destroy cleans up the event log instance and then calls the inherited destroy.

See also

TCustomDaemonApplication.EventLog

Event logger instance


TCustomDaemonApplication.EventLog

Event logger instance

Declaration

Source position: daemonapp.pp line 375

public property TCustomDaemonApplication.EventLog: TEventLog
  read GetEventLog;

Description

EventLog is the TEventLog instance which is used to log events to the system log with the Log method. It is created when the application instance is created, and destroyed when the application is destroyed.

See also

TEventLog | Event logging class
Log | Log a message to the system event log.


TCustomDaemonApplication.GuiHandle

Handle of GUI loop main application window handle

Declaration

Source position: daemonapp.pp line 377

public property TCustomDaemonApplication.GuiHandle: THandle
  read FGUIHandle
  write FGUIHandle;

Description

GuiHandle is the handle of a GUI window which can be used to run a message handling loop on. It is created when no GUIMainLoop procedure exists, and the application creates and runs a message loop by itself.

See also

GUIMainLoop

GUI main loop callback


TCustomDaemonApplication.GUIMainLoop

GUI main loop callback

Declaration

Source position: daemonapp.pp line 376

public property TCustomDaemonApplication.GUIMainLoop: TGuiLoopEvent
  read FGUIMainLoop
  write FGuiMainLoop;

Description

GUIMainLoop contains a reference to a method that can be called to process a main GUI loop. The procedure should return only when the main GUI has finished and the application should exit. It is called when the daemons are running.

See also

TCustomDaemonApplication.GuiHandle

Handle of GUI loop main application window handle


TCustomDaemonApplication.InstallDaemons

Install all daemons.

Declaration

Source position: daemonapp.pp line 369

public procedure TCustomDaemonApplication.InstallDaemons;

Description

InstallDaemons installs all known daemons, i.e. registers them with the service manager on Windows. This method is called if the application is run with the -i or --install or /install command-line option.

See also

TCustomDaemonApplication.UnInstallDaemons | Uninstall all daemons
TCustomDaemonApplication.RunDaemons | Run all daemons.
TCustomDaemonApplication.StopDaemons | Stop all daemons


TCustomDaemonApplication.OnRun

Event executed when the daemon is run.

Declaration

Source position: daemonapp.pp line 374

public property TCustomDaemonApplication.OnRun: TNotifyEvent
  read FOnRun
  write FOnRun;

Description

OnRun is triggered when the daemon application is run and no appropriate options (one of install, uninstall or run) was given.

See also

TCustomDaemonApplication.RunDaemons | Run all daemons.
TCustomDaemonApplication.InstallDaemons | Install all daemons.
TCustomDaemonApplication.UnInstallDaemons | Uninstall all daemons


TCustomDaemonApplication.RunDaemons

Run all daemons.

Declaration

Source position: daemonapp.pp line 370

public procedure TCustomDaemonApplication.RunDaemons;

Description

RunDaemons runs (starts) all known daemons. This method is called if the application is run with the -r or --run methods.

See also

TCustomDaemonApplication.UnInstallDaemons | Uninstall all daemons
TCustomDaemonApplication.InstallDaemons | Install all daemons.
TCustomDaemonApplication.StopDaemons | Stop all daemons


TCustomDaemonApplication.RunMode

Application mode

Declaration

Source position: daemonapp.pp line 378

public property TCustomDaemonApplication.RunMode: TDaemonRunMode
  read FRunMode;

Description

RunMode indicates in which mode the application is running currently. It is set automatically by examining the command-line, and when set, one of InstallDaemons, RunDaemons or UnInstallDaemons is called.

See also

InstallDaemons | Install all daemons.
RunDaemons | Run all daemons.
UnInstallDaemons | Uninstall all daemons


TCustomDaemonApplication.ShowException

Show an exception

Declaration

Source position: daemonapp.pp line 366

public procedure TCustomDaemonApplication.ShowException(

  E: Exception

); override;

Arguments

E

Exception to show.

Description

ShowException is overridden by TCustomDaemonApplication, it sends the exception message to the system log.


TCustomDaemonApplication.ShowHelp

Display a help message

Declaration

Source position: daemonapp.pp line 372

public procedure TCustomDaemonApplication.ShowHelp;

Description

ShowHelp displays a help message explaining the command-line options on standard output.


TCustomDaemonApplication.StopDaemons

Stop all daemons

Declaration

Source position: daemonapp.pp line 368

public procedure TCustomDaemonApplication.StopDaemons(

  Force: Boolean

);

Arguments

Force

If True, send the SHUTDOWN control code

Description

StopDaemons sends the STOP control code to all daemons, or the SHUTDOWN control code in case Force is True.

See also

TDaemonController.Controller | Controller
TCustomDaemonApplication.UnInstallDaemons | Uninstall all daemons
TCustomDaemonApplication.RunDaemons | Run all daemons.


TCustomDaemonApplication.UnInstallDaemons

Uninstall all daemons

Declaration

Source position: daemonapp.pp line 371

public procedure TCustomDaemonApplication.UnInstallDaemons;

Description

UnInstallDaemons uninstalls all known daemons, i.e. deregisters them with the service manager on Windows. This method is called if the application is run with the -u or --uninstall or /uninstall command-line option.

See also

TCustomDaemonApplication.RunDaemons | Run all daemons.
TCustomDaemonApplication.InstallDaemons | Install all daemons.
TCustomDaemonApplication.StopDaemons | Stop all daemons


TCustomDaemonApplicationClass

Class pointer for TCustomDaemonApplication

Declaration

Source position: daemonapp.pp line 380

type TCustomDaemonApplicationClass = class of TCustomDaemonApplication;

See also

TCustomDaemonApplication

Custom daemon application class


TCustomDaemonMapper

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Daemon mapper

Declaration

Source position: daemonapp.pp line 268

type TCustomDaemonMapper = class(TComponent)
public
constructor Create(); override; | Create a new instance of TCustomDaemonMapper
destructor Destroy; override; | Clean up and destroy a TCustomDaemonMapper instance.
published
property DaemonDefs: TDaemonDefs; [rw] | Collection of daemons
property OnCreate: TNotifyEvent; [rw] | Event called when the daemon mapper is created
property OnDestroy: TNotifyEvent; [rw] | Event called when the daemon mapper is freed.
property OnRun: TNotifyEvent; [rw] | Event called when the daemons are executed.
property OnInstall: TNotifyEvent; [rw] | Event called when the daemons are installed
property OnUnInstall: TNotifyEvent; [rw] | Event called when the daemons are uninstalled
end;

Inheritance

TCustomDaemonMapper

Daemon mapper
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

The TCustomDaemonMapper class is responsible for mapping a daemon definition to an actual TDaemon instance. It maintains a TDaemonDefs collection with daemon definitions, which can be used to map the definition of a daemon to a TDaemon descendent class.

An IDE such as Lazarus can design a TCustomDaemonMapper instance visually, to help establish the relationship between various TDaemonDef definitions and the actual TDaemon instances that will be used to run the daemons.

The TCustomDaemonMapper class has no support for streaming. The TDaemonMapper class has support for streaming (and hence visual designing).

See also

TDaemon | Daemon class for visual development
TDaemonDef | Daemon definition
TDaemonDefs | Collection of daemon definitions.
TDaemonMapper | Daemon mapper for designing in IDE


TCustomDaemonMapper
pl |  | DaemonDefs
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | DaemonDefs (TCustomDaemonMapper)
 |  | DesignInfo (TComponent)
 |  | Name (TComponent)
 | ro |


TCustomDaemonMapper
 | Create
 | Destroy
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TCustomDaemonMapper)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TCustomDaemonMapper)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TCustomDaemonMapper
pl | OnCreate
pl | OnDestroy
pl | OnRun
pl | OnInstall
pl | OnUnInstall
TComponent
TPersistent
TObject


pl | OnCreate (TCustomDaemonMapper)
pl | OnDestroy (TCustomDaemonMapper)
pl | OnInstall (TCustomDaemonMapper)
pl | OnRun (TCustomDaemonMapper)
pl |


TCustomDaemonMapper.Create

Create a new instance of TCustomDaemonMapper

Declaration

Source position: daemonapp.pp line 285

public constructor TCustomDaemonMapper.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Instance owner

Description

Create creates a new instance of a TCustomDaemonMapper. It creates the TDaemonDefs collection and then calls the inherited constructor. It should never be necessary to create a daemon mapper manually, the application will create a global TCustomDaemonMapper instance.

See also

TDaemonDefs | Collection of daemon definitions.
TCustomDaemonApplication | Custom daemon application class
TCustomDaemonMapper.Destroy | Clean up and destroy a TCustomDaemonMapper instance.


TCustomDaemonMapper.DaemonDefs

Collection of daemons

Declaration

Source position: daemonapp.pp line 288

published property TCustomDaemonMapper.DaemonDefs: TDaemonDefs
  read FDaemonDefs
  write SetDaemonDefs;

Description

DaemonDefs is the application's global collection of daemon definitions. This collection will be used to decide at runtime which TDaemon class must be created to run or install a daemon.

See also

TCustomDaemonApplication

Custom daemon application class


TCustomDaemonMapper.Destroy

Clean up and destroy a TCustomDaemonMapper instance.

Declaration

Source position: daemonapp.pp line 286

public destructor TCustomDaemonMapper.Destroy; override;

Description

Destroy frees the DaemonDefs collection and calls the inherited destructor.

See also

TDaemonDefs | Collection of daemon definitions.
TCustomDaemonMapper.Create | Create a new instance of TCustomDaemonMapper


TCustomDaemonMapper.OnCreate

Event called when the daemon mapper is created

Declaration

Source position: daemonapp.pp line 289

published property TCustomDaemonMapper.OnCreate: TNotifyEvent
  read FOnCreate
  write FOnCreate;

Description

OnCreate is an event that is called when the TCustomDaemonMapper instance is created. It can for instance be used to dynamically create daemon definitions at runtime.

See also

OnDestroy | Event called when the daemon mapper is freed.
OnUnInstall | Event called when the daemons are uninstalled
OnCreate | Event called when the daemon mapper is created
OnDestroy | Event called when the daemon mapper is freed.


TCustomDaemonMapper.OnDestroy

Event called when the daemon mapper is freed.

Declaration

Source position: daemonapp.pp line 290

published property TCustomDaemonMapper.OnDestroy: TNotifyEvent
  read FOnDestroy
  write FOnDestroy;

Description

OnDestroy is called when the global daemon mapper instance is destroyed. it can be used to release up any resources that were allocated when the instance was created, in the OnCreate event.

See also

OnCreate | Event called when the daemon mapper is created
OnInstall | Event called when the daemons are installed
OnUnInstall | Event called when the daemons are uninstalled
OnCreate | Event called when the daemon mapper is created


TCustomDaemonMapper.OnInstall

Event called when the daemons are installed

Declaration

Source position: daemonapp.pp line 292

published property TCustomDaemonMapper.OnInstall: TNotifyEvent
  read FOnInstall
  write FOnInstall;

Description

OnInstall is the event called when the daemon application is executed to install the daemons (with command-line parameter '-i' or '/install'). it is called exactly once.

See also

OnRun | Event called when the daemons are executed.
OnUnInstall | Event called when the daemons are uninstalled
OnCreate | Event called when the daemon mapper is created
OnDestroy | Event called when the daemon mapper is freed.


TCustomDaemonMapper.OnRun

Event called when the daemons are executed.

Declaration

Source position: daemonapp.pp line 291

published property TCustomDaemonMapper.OnRun: TNotifyEvent
  read FOnRun
  write FOnRun;

Description

OnRun is the event called when the daemon application is executed to run the daemons (with command-line parameter '-r'). it is called exactly once.

See also

OnInstall | Event called when the daemons are installed
OnUnInstall | Event called when the daemons are uninstalled
OnCreate | Event called when the daemon mapper is created
OnDestroy | Event called when the daemon mapper is freed.


TCustomDaemonMapper.OnUnInstall

Event called when the daemons are uninstalled

Declaration

Source position: daemonapp.pp line 293

published property TCustomDaemonMapper.OnUnInstall: TNotifyEvent
  read FOnUnInStall
  write FOnUninStall;

Description

OnUnInstall is the event called when the daemon application is executed to uninstall the daemons (with command-line parameter '-u' or '/uninstall'). it is called exactly once.

See also

OnRun | Event called when the daemons are executed.
OnInstall | Event called when the daemons are installed
OnCreate | Event called when the daemon mapper is created
OnDestroy | Event called when the daemon mapper is freed.


TCustomDaemonMapperClass

Class of TCustomDaemonMapper

Declaration

Source position: daemonapp.pp line 303

type TCustomDaemonMapperClass = class of TCustomDaemonMapper;

Description

TCustomDaemonMapperClass is the class of TCustomDaemonMapper. It is used in the RegisterDaemonMapper call.

See also

RegisterDaemonMapper

Register a daemon mapper class


TDaemon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Daemon class for visual development

Declaration

Source position: daemonapp.pp line 76

type TDaemon = class(TCustomDaemon)
public
property Definition;
property Status;
published
property OnStart: TDaemonOKEvent; [rw] | Daemon start event
property OnStop: TDaemonOKEvent; [rw] | Daemon stop event
property OnPause: TDaemonOKEvent; [rw] | Daemon pause event
property OnContinue: TDaemonOKEvent; [rw] | Daemon continue
property OnShutDown: TDaemonEvent; [rw] | Daemon shutdown
property OnExecute: TDaemonEvent; [rw] | Daemon execute event
property BeforeInstall: TDaemonEvent; [rw] | Called before the daemon will be installed
property AfterInstall: TDaemonEvent; [rw] | Called after the daemon was installed
property BeforeUnInstall: TDaemonEvent; [rw] | Called before the daemon is uninstalled
property AfterUnInstall: TDaemonEvent; [rw] | Called after the daemon is uninstalled
property OnControlCode: TCustomControlCodeEvent; [rw] | Called when a control code is received for the daemon
end;

Inheritance

TDaemon | Daemon class for visual development
|
TCustomDaemon | Base daemon application class
|
TDataModule
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TDaemon is a TCustomDaemon descendent which is meant for development in a visual environment: it contains event handlers for all major operations. Whenever a TCustomDaemon method is executed, it's execution is shunted to the event handler, which can be filled with code in the IDE.

All the events of the daemon are executed in the thread in which the daemon's controller is running (as given by DaemonThread), which is not the main program thread.

See also

TCustomDaemon | Base daemon application class
TDaemonController | Internal daemon controller class


TDaemon
 | ro | Definition
 | ro | Status
pl |  | BeforeInstall
pl |  | AfterInstall
pl |  | BeforeUnInstall
pl |  | AfterUnInstall
TCustomDaemon
 | ro | Definition
 | ro | DaemonThread
 | ro | Controller
 |  | Status
 | ro | Logger
TDataModule
 |  | DesignOffset
 |  | DesignSize
 |  | OldCreateOrder
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | AfterInstall (TDaemon)
pl |  | AfterUnInstall (TDaemon)
pl |  | BeforeInstall (TDaemon)
pl |  | BeforeUnInstall (TDaemon)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
 | ro | Controller (TCustomDaemon)
 | ro | DaemonThread (TCustomDaemon)
 | ro | Definition (TCustomDaemon)
 | ro | Definition (TDaemon)
 |  | DesignInfo (TComponent)
 |  | DesignOffset (TDataModule)
 |  | DesignSize (TDataModule)
 | ro | Logger (TCustomDaemon)
 |  | Name (TComponent)
 |  | OldCreateOrder (TDataModule)
 | ro | Owner (TComponent)
 |  | Status (TCustomDaemon)
 | ro |


TDaemon
TCustomDaemon
 | LogMessage
 | ReportStatus
TDataModule
 | ReadT
 | WriteT
 | ReadL
 | WriteL
 | ReadW
 | WriteW
 | ReadH
 | WriteH
 | DoCreate
 | DoDestroy
 | DefineProperties
 | GetChildren
 | HandleCreateException
 | ReadState
 | Create
 | CreateNew
 | Destroy
 | AfterConstruction
 | BeforeDestruction
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TDaemon
pl | OnStart
pl | OnStop
pl | OnPause
pl | OnContinue
pl | OnShutDown
pl | OnExecute
pl | OnControlCode
TCustomDaemon
TDataModule
 | OnCreate
 | OnDestroy
TComponent
TPersistent
TObject


pl | OnContinue (TDaemon)
pl | OnControlCode (TDaemon)
 | OnCreate (TDataModule)
 | OnDestroy (TDataModule)
pl | OnExecute (TDaemon)
pl | OnPause (TDaemon)
pl | OnShutDown (TDaemon)
pl | OnStart (TDaemon)
pl |


TDaemon.AfterInstall

Called after the daemon was installed

Declaration

Source position: daemonapp.pp line 110

published property TDaemon.AfterInstall: TDaemonEvent
  read FAfterInstall
  write FAfterInstall;

Description

AfterInstall is called after the daemon was succesfully installed.

See also

BeforeInstall | Called before the daemon will be installed
BeforeUnInstall | Called before the daemon is uninstalled
AfterUnInstall | Called after the daemon is uninstalled


TDaemon.AfterUnInstall

Called after the daemon is uninstalled

Declaration

Source position: daemonapp.pp line 112

published property TDaemon.AfterUnInstall: TDaemonEvent
  read FAfterUnInstall
  write FAfterUnInstall;

Description

AfterUnInstall is called after the daemon is succesfully uninstalled.

See also

BeforeInstall | Called before the daemon will be installed
AfterInstall | Called after the daemon was installed
BeforeUnInstall | Called before the daemon is uninstalled


TDaemon.BeforeInstall

Called before the daemon will be installed

Declaration

Source position: daemonapp.pp line 109

published property TDaemon.BeforeInstall: TDaemonEvent
  read FBeforeInstall
  write FBeforeInstall;

Description

BeforeInstall is called before the daemon is installed. It can be done to specify extra dependencies, or change the daemon description etc.

See also

AfterInstall | Called after the daemon was installed
BeforeUnInstall | Called before the daemon is uninstalled
AfterUnInstall | Called after the daemon is uninstalled


TDaemon.BeforeUnInstall

Called before the daemon is uninstalled

Declaration

Source position: daemonapp.pp line 111

published property TDaemon.BeforeUnInstall: TDaemonEvent
  read FBeforeUnInstall
  write FBeforeUnInstall;

Description

BeforeUnInstall is called before the daemon is uninstalled.

See also

BeforeInstall | Called before the daemon will be installed
AfterInstall | Called after the daemon was installed
AfterUnInstall | Called after the daemon is uninstalled


TDaemon.OnContinue

Daemon continue

Declaration

Source position: daemonapp.pp line 106

published property TDaemon.OnContinue: TDaemonOKEvent
  read FOnContinue
  write FOnContinue;

Description

OnPause is the event called when the daemon must be stopped. This event handler should return as quickly as possible. If it must perform lengthy operations, it is best to report the status to the operating system at regular intervals using the ReportStatus method.

If a thread was started in the OnExecute event and it was suspended in a OnPause event, this is the place where the thread's executed should be resumed.

See also

TDaemon.OnStart | Daemon start event
TDaemon.OnPause | Daemon pause event
ReportStatus | Report the current status to the operating system


TDaemon.OnControlCode

Called when a control code is received for the daemon

Declaration

Source position: daemonapp.pp line 113

published property TDaemon.OnControlCode: TCustomControlCodeEvent
  read FOnCustomControl
  write FOnCustomControl;

Description

OnControlCode is called when the daemon receives a control code. If the daemon has not handled the control code, it should set the Handled parameter to False. By default it is set to True.

See also

Architecture

Daemon application architecture


TDaemon.OnExecute

Daemon execute event

Declaration

Source position: daemonapp.pp line 108

published property TDaemon.OnExecute: TDaemonEvent
  read FOnExecute
  write FOnExecute;

Description

OnExecute is executed once after the daemon was started. If assigned, it should perform whatever operation the daemon is designed.

If the daemon's action is event based, then no OnExecute handler is needed, and the events will control the daemon's execution: the daemon thread will then go in a loop, passing control messages to the daemon.

If an OnExecute event handler is present, the checking for control messages must be done by the implementation of the OnExecute handler.

See also

TDaemon.OnStart | Daemon start event
TDaemon.OnStop | Daemon stop event


TDaemon.OnPause

Daemon pause event

Declaration

Source position: daemonapp.pp line 105

published property TDaemon.OnPause: TDaemonOKEvent
  read FOnPause
  write FOnPause;

Description

OnPause is the event called when the daemon must be stopped. This event handler should return as quickly as possible. If it must perform lengthy operations, it is best to report the status to the operating system at regular intervals using the ReportStatus method.

If a thread was started in the OnExecute event, this is the place where the thread's execution should be suspended.

See also

TDaemon.OnStop | Daemon stop event
TDaemon.OnContinue | Daemon continue
ReportStatus | Report the current status to the operating system


TDaemon.OnShutDown

Daemon shutdown

Declaration

Source position: daemonapp.pp line 107

published property TDaemon.OnShutDown: TDaemonEvent
  read FOnShutDown
  write FOnShutDown;

Description

OnShutDown is the event called when the daemon must be shut down. When the system is being shut down and the daemon does not respond to stop signals, then a shutdown message is sent to the daemon. This event can be used to respond to such a message. The daemon process will simply be stopped after this event.

If a thread was started in the OnExecute, this is the place where the thread's executed should be stopped or the thread freed from memory.

See also

TDaemon.OnStart | Daemon start event
TDaemon.OnPause | Daemon pause event
ReportStatus | Report the current status to the operating system


TDaemon.OnStart

Daemon start event

Declaration

Source position: daemonapp.pp line 103

published property TDaemon.OnStart: TDaemonOKEvent
  read FOnStart
  write FOnStart;

Description

OnStart is the event called when the daemon must be started. This event handler should return as quickly as possible. If it must perform lengthy operations, it is best to report the status to the operating system at regular intervals using the ReportStatus method.

If the start of the daemon should do some continuous action, then this action should be performed in a new thread: this thread should then be created and started in the OnExecute event handler, so the event handler can return at once.

See also

TDaemon.OnStop | Daemon stop event
TDaemon.OnExecute | Daemon execute event
TDaemon.OnContinue | Daemon continue
ReportStatus | Report the current status to the operating system


TDaemon.OnStop

Daemon stop event

Declaration

Source position: daemonapp.pp line 104

published property TDaemon.OnStop: TDaemonOKEvent
  read FOnStop
  write FOnStop;

Description

OnStart is the event called when the daemon must be stopped. This event handler should return as quickly as possible. If it must perform lengthy operations, it is best to report the status to the operating system at regular intervals using the ReportStatus method.

If a thread was started in the OnExecute event, this is the place where the thread should be stopped.

See also

TDaemon.OnStart | Daemon start event
TDaemon.OnPause | Daemon pause event
ReportStatus | Report the current status to the operating system


TDaemonApplication

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Default descendent of CustomDaemonApplication

Declaration

Source position: daemonapp.pp line 382

type TDaemonApplication = class(TCustomDaemonApplication) ;

Inheritance

TDaemonApplication | Default descendent of CustomDaemonApplication
|
TCustomDaemonApplication | Custom daemon application class
|
TCustomApplication | Ancestor class for TApplication classes.
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TDaemonApplication is the default TCustomDaemonApplication descendent that is used to run the daemon application. It is possible to register an alternative TCustomDaemonApplication class (using RegisterDaemonApplicationClass) to run the application in a different manner.

See also

TCustomDaemonApplication | Custom daemon application class
RegisterDaemonApplicationClass | Register alternative TCustomDaemonApplication class.


TDaemonApplication
TCustomDaemonApplication
 | ro | EventLog
 |  | GUIMainLoop
 |  | GuiHandle
 | ro | RunMode
TCustomApplication
 | ro | ExeName
 |  | HelpFile
 | ro | Terminated
 |  | Title
 | ro | ConsoleApplication
 | ro | Location
 | ro | Params
 | ro | ParamCount
 | ro | EnvironmentVariable
 |  | OptionChar
 |  | CaseSensitiveOptions
 |  | StopOnException
 |  | EventLogFilter
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TDaemonApplication
TCustomDaemonApplication
 | Destroy
 | ShowException
 | CreateDaemon
 | StopDaemons
 | InstallDaemons
 | RunDaemons
 | UnInstallDaemons
 | ShowHelp
 | CreateForm
TCustomApplication
 | Create
 | Destroy
 | HandleException
 | Initialize
 | Run
 | ShowException
 | Terminate
 | FindOptionIndex
 | GetOptionValue
 | HasOption
 | CheckOptions
 | GetEnvironmentList
 | Log
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TDaemonApplication
TCustomDaemonApplication
 | OnRun
TCustomApplication
 | OnException
TComponent
TPersistent
TObject


TDaemonController

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internal daemon controller class

Declaration

Source position: daemonapp.pp line 118

type TDaemonController = class(TComponent)
public
constructor Create(); override; | Create a new instance of the TDaemonController class
destructor Destroy; override; | Free a TDaemonController instance.
procedure StartService; virtual; | Start the service
procedure Main(); virtual; | Daemon main entry point
procedure Controller(); virtual; | Controller
function ReportStatus; virtual; | Report the status to the operating system.
property Daemon: TCustomDaemon; [r] | Daemon instance this controller controls.
property Params: TStrings; [r] | Parameters passed to the daemon
property LastStatus: TCurrentStatus; [r] | Last reported status
property CheckPoint: DWord; | Send checkpoint signal to the operating system
end;

Inheritance

TDaemonController

Internal daemon controller class
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TDaemonController is a class that is used by the TDaemonApplication class to control the daemon during runtime. The TDaemonApplication class instantiates an instance of TDaemonController for each daemon in the application and communicates with the daemon through the TDaemonController instance. It should rarely be necessary to access or use this class.

See also

TCustomDaemon | Base daemon application class
TDaemonApplication | Default descendent of CustomDaemonApplication


TDaemonController
 | ro | Daemon
 | ro | Params
 | ro | LastStatus
 | ro | CheckPoint
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


ro | CheckPoint (TDaemonController)
ro | ComObject (TComponent)
ro | ComponentCount (TComponent)
 | ComponentIndex (TComponent)
ro | Components (TComponent)
ro | ComponentState (TComponent)
ro | ComponentStyle (TComponent)
ro | Daemon (TDaemonController)
 | DesignInfo (TComponent)
ro | LastStatus (TDaemonController)
 | Name (TComponent)
ro | Owner (TComponent)
ro |


TDaemonController
 | Create
 | Destroy
 | StartService
 | Main
 | Controller
 | ReportStatus
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Controller (TDaemonController)

Create (TObject)

Create (TComponent)

Create (TDaemonController)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TDaemonController)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

Main (TDaemonController)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

ReportStatus (TDaemonController)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StartService (TDaemonController)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDaemonController

TComponent

TPersistent

TObject


TDaemonController.CheckPoint

Send checkpoint signal to the operating system

Declaration

Source position: daemonapp.pp line 135

public property TDaemonController.CheckPoint: DWord;

Description

CheckPoint can be used to send a checkpoint signal during lengthy operations, to signal that a lengthy operation is in progress. This should be used mainly on windows, to signal the service manager that the service is alive.

See also

ReportStatus

Report the status to the operating system.


TDaemonController.Controller

Controller

Declaration

Source position: daemonapp.pp line 130

public procedure TDaemonController.Controller(

  ControlCode: DWord;

  EventType: DWord;

  EventData: Pointer

); virtual;

Arguments

ControlCode | Control code sent by the system
EventType | Event type sent by the system
EventData | Additional event data sent by the system

Description

Controller is responsible for sending the control code to the daemon thread so it can be processed.

This routine is currently only used on windows, as there is no service manager on linux. Later on this may be changed to respond to signals on linux as well.

See also

TDaemon.OnControlCode

Called when a control code is received for the daemon


TDaemonController.Create

Create a new instance of the TDaemonController class

Declaration

Source position: daemonapp.pp line 126

public constructor TDaemonController.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the controller.

Description

Create creates a new instance of the TDaemonController class. It should never be necessary to create a new instance manually, because the controllers are created by the global TDaemonApplication instance, and AOwner will be set to the global TDaemonApplication instance.

See also

TDaemonApplication | Default descendent of CustomDaemonApplication
Destroy | Free a TDaemonController instance.


TDaemonController.Daemon

Daemon instance this controller controls.

Declaration

Source position: daemonapp.pp line 132

public property TDaemonController.Daemon: TCustomDaemon
  read FDaemon;

Description

Daemon is the daemon instance that is controller by this instance of the TDaemonController class.


TDaemonController.Destroy

Free a TDaemonController instance.

Declaration

Source position: daemonapp.pp line 127

public destructor TDaemonController.Destroy; override;

Description

Destroy deallocates some resources allocated when the instance was created.

See also

Create

Create a new instance of the TDaemonController class


TDaemonController.LastStatus

Last reported status

Declaration

Source position: daemonapp.pp line 134

public property TDaemonController.LastStatus: TCurrentStatus
  read FLastStatus;

Description

LastStatus is the last status reported to the operating system.

See also

ReportStatus

Report the status to the operating system.


TDaemonController.Main

Daemon main entry point

Declaration

Source position: daemonapp.pp line 129

public procedure TDaemonController.Main(

  Argc: DWord;

  Args: PPChar

); virtual;

Arguments

Argc | Command-line arguments passed by the OS. The first is normally the service name
Args | Arguments for the service.

Description

Main is the service's main entry point, called when the system wants to start the service. The global application will call this function whenever required, with the appropriate arguments.

The standard implementation starts the daemon thread, and waits for it to stop. All other daemon action - such as responding to control code events - is handled by the thread.

Errors

If the daemon thread cannot be created, an exception is raised.

See also

TDaemonThread

Thread to run daemons in


TDaemonController.Params

Parameters passed to the daemon

Declaration

Source position: daemonapp.pp line 133

public property TDaemonController.Params: TStrings
  read FParams;

Description

Params contains the parameters passed to the daemon application by the operating system, comparable to the application's command-line parameters. The property is set by the Main method.


TDaemonController.ReportStatus

Report the status to the operating system.

Declaration

Source position: daemonapp.pp line 131

public function TDaemonController.ReportStatus: Boolean; virtual;

Function result

True if the status was reported succesfully

Description

ReportStatus reports the status of the daemon to the operating system. On windows, this sends the current service status to the service manager. On other operating systems, this sends a message to the system log.

Errors

If an error occurs, an error message is sent to the system log.

See also

TDaemon.ReportStatus

TDaemonController.LastStatus

Last reported status


TDaemonController.StartService

Start the service

Declaration

Source position: daemonapp.pp line 128

public procedure TDaemonController.StartService; virtual;

Description

StartService starts the service controlled by this instance.

Errors

None.

See also

TDaemonController.Main

Daemon main entry point


TDaemonDef

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Daemon definition

Declaration

Source position: daemonapp.pp line 212

type TDaemonDef = class(TCollectionItem)
public
constructor Create(); override; | Create a new TDaemonDef instance
destructor Destroy; override; | Free a TDaemonDef from memory
property DaemonClass: TCustomDaemonClass; [r] | TDaemon class to use for this daemon
property Instance: TCustomDaemon; [rw] | Instance of the daemon class
published
property DaemonClassName: ; [rw] | Name of the TDaemon class to use for this daemon
property Name: ; [rw] | Name of the daemon (service)
property Description: ; [rw] | Description of the daemon
property DisplayName: ; [rw] | Displayed name of the daemon (service)
property RunArguments: ; [rw] | Additional command-line arguments when running daemon.
property Options: TDaemonOptions; [rw] | Service options
property Enabled: Boolean; [rw] | Is the daemon enabled or not
property WinBindings: TWinBindings; [rw] | Windows-specific bindings (windows only)
property OnCreateInstance: TNotifyEvent; [rw] | Event called when a daemon in instantiated
property LogStatusReport: Boolean; [rw] | Log the status report to the system log
end;

Inheritance

TDaemonDef

Daemon definition
|

TCollectionItem
|

TPersistent
|

TObject

Description

TDaemonDef contains the definition of a daemon in the application: The name of the daemon, which TCustomDaemon descendent should be started to run the daemon, a description, and various other options should be set in this class. The global TDaemonApplication instance maintains a collection of TDaemonDef instances and will use these definitions to install or start the various daemons.

See also

TDaemonApplication | Default descendent of CustomDaemonApplication
TDaemon | Daemon class for visual development


TDaemonDef
 | ro | DaemonClass
 |  | Instance
pl |  | DaemonClassName
pl |  | Name
pl |  | Description
pl |  | DisplayName
pl |  | RunArguments
pl |  | Options
pl |  | Enabled
pl |  | WinBindings
pl |  | LogStatusReport
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


 | ro | DaemonClass (TDaemonDef)
pl |  | DaemonClassName (TDaemonDef)
pl |  | Description (TDaemonDef)
 |  | DisplayName (TCollectionItem)
pl |  | DisplayName (TDaemonDef)
pl |  | Enabled (TDaemonDef)
 | ro | ID (TCollectionItem)
 |  | Index (TCollectionItem)
 |  | Instance (TDaemonDef)
pl |  | LogStatusReport (TDaemonDef)
pl |  | Name (TDaemonDef)
pl |  | Options (TDaemonDef)
pl |  | RunArguments (TDaemonDef)
 | ro | UpdateCount (TCollectionItem)
pl |  |


TDaemonDef
 | Create
 | Destroy
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

Changed (TCollectionItem)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TCollectionItem)

Create (TDaemonDef)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TCollectionItem)

Destroy (TDaemonDef)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetDisplayName (TCollectionItem)

GetHashCode (TObject)

GetIndex (TCollectionItem)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TCollectionItem)

GetOwner (TPersistent)

GetOwner (TCollectionItem)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SetCollection (TCollectionItem)

SetDisplayName (TCollectionItem)

SetIndex (TCollectionItem)


TDaemonDef

pl

OnCreateInstance

TCollectionItem

TPersistent

TObject


pl


TDaemonDef.Create

Create a new TDaemonDef instance

Declaration

Source position: daemonapp.pp line 232

public constructor TDaemonDef.Create(

  ACollection: TCollection

); override;

Arguments

ACollection

Collection the item belongs in.

Description

Create initializes a new TDaemonDef instance. It should not be necessary to instantiate a definition manually, it is handled by the collection.

See also

TDaemonDefs

Collection of daemon definitions.


TDaemonDef.DaemonClass

TDaemon class to use for this daemon

Declaration

Source position: daemonapp.pp line 234

public property TDaemonDef.DaemonClass: TCustomDaemonClass
  read FDaemonClass;

Description

DaemonClass is the TDaemon class that is used when this service is requested. It is looked up in the application's global daemon mapper by it's name in DaemonClassName.

See also

DaemonClassName | Name of the TDaemon class to use for this daemon
TDaemonMapper | Daemon mapper for designing in IDE


TDaemonDef.DaemonClassName

Name of the TDaemon class to use for this daemon

Declaration

Source position: daemonapp.pp line 237

published property TDaemonDef.DaemonClassName:
  read FDaemonClassName
  write FDaemonClassName;

Description

DaemonClassName is the name of the TDaemon class that will be used whenever the service is needed. The name is used to look up the class pointer registered in the daemon mapper, when TCustomDaemonApplication.CreateDaemonInstance creates an instance of the daemon.

See also

TDaemonDef.Instance | Instance of the daemon class
TDaemonDef.DaemonClass | TDaemon class to use for this daemon
RegisterDaemonClass | Register daemon


TDaemonDef.Description

Description of the daemon

Declaration

Source position: daemonapp.pp line 239

published property TDaemonDef.Description:
  read FDescription
  write FDescription;

Description

Description is the description shown in the Windows service manager when managing this service. It is supplied to the windows service manager when the daemon is installed.


TDaemonDef.Destroy

Free a TDaemonDef from memory

Declaration

Source position: daemonapp.pp line 233

public destructor TDaemonDef.Destroy; override;

Description

Destroy removes the TDaemonDef from memory.


TDaemonDef.DisplayName

Displayed name of the daemon (service)

Declaration

Source position: daemonapp.pp line 240

published property TDaemonDef.DisplayName:
  read FDisplayName
  write FDisplayName;

Description

DisplayName is the displayed name of the daemon as it is known to the operating system.

See also

TDaemonDef.Name

Name of the daemon (service)


TDaemonDef.Enabled

Is the daemon enabled or not

Declaration

Source position: daemonapp.pp line 243

published property TDaemonDef.Enabled: Boolean
  read FEnabled
  write FEnabled
  default true;

Description

Enabled specifies whether a daemon should be installed, run or uninstalled. Disabled daemons are not installed, run or uninstalled.


TDaemonDef.Instance

Instance of the daemon class

Declaration

Source position: daemonapp.pp line 235

public property TDaemonDef.Instance: TCustomDaemon
  read FInstance
  write FInstance;

Description

Instance points to the TDaemon instance that is used when the service is in operation at runtime.

See also

TDaemonDef.DaemonClass

TDaemon class to use for this daemon


TDaemonDef.LogStatusReport

Log the status report to the system log

Declaration

Source position: daemonapp.pp line 246

published property TDaemonDef.LogStatusReport: Boolean
  read FLogStatusReport
  write FLogStatusReport;

Description

LogStatusReport can be set to True to send the status reports also to the system log. This can be used to track the progress of the daemon.

See also

TDaemon.ReportStatus


TDaemonDef.Name

Name of the daemon (service)

Declaration

Source position: daemonapp.pp line 238

published property TDaemonDef.Name:
  read FName
  write SetName;

Description

Name is the internal name of the daemon as it is known to the operating system.

See also

TDaemonDef.DisplayName

Displayed name of the daemon (service)


TDaemonDef.OnCreateInstance

Event called when a daemon in instantiated

Declaration

Source position: daemonapp.pp line 245

published property TDaemonDef.OnCreateInstance: TNotifyEvent
  read FOnCreateInstance
  write FOnCreateInstance;

Description

OnCreateInstance is called whenever an instance of the daemon is created. This can be used for instance when a single TDaemon class is used to run several services, to correctly initialize the TDaemon.


TDaemonDef.Options

Service options

Declaration

Source position: daemonapp.pp line 242

published property TDaemonDef.Options: TDaemonOptions
  read FOptions
  write FOptions;

Description

Options tells the operating system which operations can be performed on the daemon while it is running.

This option is only used during the installation of the daemon.


TDaemonDef.RunArguments

Additional command-line arguments when running daemon.

Declaration

Source position: daemonapp.pp line 241

published property TDaemonDef.RunArguments:
  read FRunArgs
  write FRunArgs;

Description

RunArguments specifies any additional command-line arguments that should be specified when running the daemon: these arguments will be passed to the service manager when registering the service on windows.


TDaemonDef.WinBindings

Windows-specific bindings (windows only)

Declaration

Source position: daemonapp.pp line 244

published property TDaemonDef.WinBindings: TWinBindings
  read FWinBindings
  write SetWinBindings;

Description

WinBindings is used to group together the windows-specific properties of the daemon. This property is totally ignored on other platforms.

See also

TWinBindings

Windows Daemon bindings (windows only)


TDaemonDefs

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection of daemon definitions.

Declaration

Source position: daemonapp.pp line 251

type TDaemonDefs = class(TCollection)
public
constructor Create(); | Create a new instance of a TDaemonDefs collection.
function IndexOfDaemonDef(); | Return index of daemon definition
function FindDaemonDef(); | Find and return instance of daemon definition with given name.
function DaemonDefByName(); | Find and return instance of daemon definition with given name.
property Daemons: TDaemonDef; default; [rw] | Indexed access to TDaemonDef instances
end;

Inheritance

TDaemonDefs

Collection of daemon definitions.
|

TCollection
|

TPersistent
|

TObject

Description

TDaemonDefs is the class of the global list of daemon definitions. It contains an item for each daemon in the application.

Normally it is not necessary to create an instance of TDaemonDefs manually. The global TCustomDaemonMapper instance will create a collection and maintain it.

See also

TCustomDaemonMapper | Daemon mapper
TDaemonDef | Daemon definition


TDaemonDefs
 |  | Daemons
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
 | Daemons (TDaemonDefs)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | PropName (TCollection)
ro | UpdateCount (TCollection)


TDaemonDefs
 | Create
 | IndexOfDaemonDef
 | FindDaemonDef
 | DaemonDefByName
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

Create (TDaemonDefs)

DaemonDefByName (TDaemonDefs)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

FindDaemonDef (TDaemonDefs)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetPropName (TCollection)

IndexOfDaemonDef (TDaemonDefs)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TDaemonDefs

TCollection

TPersistent

TObject


TDaemonDefs.Create

Create a new instance of a TDaemonDefs collection.

Declaration

Source position: daemonapp.pp line 260

public constructor TDaemonDefs.Create(

  AOwner: TPersistent;

  AClass: TCollectionItemClass

);

Arguments

AOwner | Collection owner
AClass | Item class.

Description

Create creates a new instance of the TDaemonDefs collection. It keeps the AOwner parameter for future reference and calls the inherited constructor.

Normally it is not necessary to create an instance of TDaemonDefs manually. The global TCustomDaemonMapper instance will create a collection and maintain it.

See also

TDaemonDef

Daemon definition


TDaemonDefs.DaemonDefByName

Find and return instance of daemon definition with given name.

Declaration

Source position: daemonapp.pp line 263

public function TDaemonDefs.DaemonDefByName(

  const DaemonName:

):TDaemonDef;

Arguments

DaemonName

Daemon name to search for.

Function result

Matching TDaemonDef instance

Description

FindDaemonDef searches the list of daemon definitions and returns the TDaemonDef instance whose name matches DaemonName. If no definition is found, an EDaemon exception is raised.

The FindDaemonDef call does not raise an error, but returns Nil instead.

Errors

If no definition is found, an EDaemon exception is raised.

See also

TDaemonDefs.IndexOfDaemonDef | Return index of daemon definition
TDaemonDefs.FindDaemonDef | Find and return instance of daemon definition with given name.


TDaemonDefs.Daemons

Indexed access to TDaemonDef instances

Declaration

Source position: daemonapp.pp line 264

public property TDaemonDefs.Daemons: TDaemonDef
  read GetDaemonDef
  write SetDaemonDef;
  default;

Description

Daemons is the default property of TDaemonDefs, it gives access to the TDaemonDef instances in the collection.

See also

TDaemonDef

Daemon definition


TDaemonDefs.FindDaemonDef

Find and return instance of daemon definition with given name.

Declaration

Source position: daemonapp.pp line 262

public function TDaemonDefs.FindDaemonDef(

  const DaemonName:

):TDaemonDef;

Arguments

DaemonName

Daemon name to search for.

Function result

Matching TDaemonDef instance or Nil if none was found.

Description

FindDaemonDef searches the list of daemon definitions and returns the TDaemonDef instance whose name matches DaemonName. If no definition is found, Nil is returned.

See also

TDaemonDefs.IndexOfDaemonDef | Return index of daemon definition
TDaemonDefs.DaemonDefByName | Find and return instance of daemon definition with given name.


TDaemonDefs.IndexOfDaemonDef

Return index of daemon definition

Declaration

Source position: daemonapp.pp line 261

public function TDaemonDefs.IndexOfDaemonDef(

  const DaemonName:

):Integer;

Arguments

DaemonName

Daemon Name to search for.

Function result

Index of found definition, or -1

Description

IndexOfDaemonDef searches the collection for a TDaemonDef instance with a name equal to DaemonName, and returns it's index. It returns -1 if no definition was found with this name. The search is case insensitive.

See also

TDaemonDefs.FindDaemonDef | Find and return instance of daemon definition with given name.
TDaemonDefs.DaemonDefByName | Find and return instance of daemon definition with given name.


TDaemonMapper

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Daemon mapper for designing in IDE

Declaration

Source position: daemonapp.pp line 298

type TDaemonMapper = class(TCustomDaemonMapper)
constructor Create(); override; | Create a new TDaemonMapper instance and initializes it from streamed resources.
constructor CreateNew(); | Create a new TDaemonMapper instance without initialization
end;

Inheritance

TDaemonMapper | Daemon mapper for designing in IDE
|
TCustomDaemonMapper | Daemon mapper
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TDaemonMapper is a direct descendent of TCustomDaemonMapper, but introduces no new functionality. It's sole purpose is to make it possible for an IDE to stream the TDaemonMapper instance.

For this purpose, it overrides the Create constructor and tries to find a resource with the same name as the class name, and tries to stream the instance from this resource.

If the instance should not be streamed, the CreateNew constructor can be used instead.

See also

CreateNew | Create a new TDaemonMapper instance without initialization
Create | Create a new TDaemonMapper instance and initializes it from streamed resources.


TDaemonMapper
TCustomDaemonMapper
pl |  | DaemonDefs
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TDaemonMapper
 | Create
 | CreateNew
TCustomDaemonMapper
 | Create
 | Destroy
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TCustomDaemonMapper)

Create (TDaemonMapper)

CreateNew (TDaemonMapper)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TCustomDaemonMapper)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDaemonMapper
TCustomDaemonMapper
pl | OnCreate
pl | OnDestroy
pl | OnRun
pl | OnInstall
pl | OnUnInstall
TComponent
TPersistent
TObject


TDaemonMapper.Create

Create a new TDaemonMapper instance and initializes it from streamed resources.

Declaration

Source position: daemonapp.pp line 299

constructor TDaemonMapper.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Instance owner

Description

Create initializes a new instance of TDaemonMapper and attempts to read the component from resources compiled in the application.

If the instance should not be streamed, the CreateNew constructor can be used instead.

Errors

If no streaming system is found, or no resource exists for the class, an exception is raised.

See also

CreateNew

Create a new TDaemonMapper instance without initialization


TDaemonMapper.CreateNew

Create a new TDaemonMapper instance without initialization

Declaration

Source position: daemonapp.pp line 300

constructor TDaemonMapper.CreateNew(

  AOwner: TComponent;

  Dummy: Integer = 0

);

Arguments

AOwner | Owner of the instance
Dummy | Ignored.

Description

CreateNew itializes a new instance of TDaemonMapper. In difference with the Create constructor, it does not attempt to read the component from a stream.

See also

Create

Create a new TDaemonMapper instance and initializes it from streamed resources.


TDaemonThread

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Thread to run daemons in

Declaration

Source position: daemonapp.pp line 307

type TDaemonThread = class(TThread)
public
constructor Create(); | Create a new thread
procedure Execute; override; | Run the daemon
procedure CheckControlMessage(); | Check if a control message has arrived
function StopDaemon; virtual; | Stops the daemon
function PauseDaemon; virtual; | Pause the daemon
function ContinueDaemon; virtual; | Continue the daemon
function ShutDownDaemon; virtual; | Shut down daemon
function InterrogateDaemon; virtual; | Report the daemon status
property Daemon: TCustomDaemon; [r] | Daemon instance
end;

Inheritance

TDaemonThread

Thread to run daemons in
|

TThread
|

TObject

Description

TDaemonThread is the thread in which the daemons in the application are run. Each daemon is run in it's own thread.

It should not be necessary to create these threads manually, the TDaemonController class will take care of this.

See also

TDaemonController | Internal daemon controller class
TDaemon | Daemon class for visual development


TDaemonThread
 | ro | Daemon
TThread
 |  | ReturnValue
 | ro | Terminated
 |  | FreeOnTerminate
 | ro | Handle
 |  | Priority
 |  | Suspended
 | ro | ThreadID
 | ro | FatalException
TObject


ro | Daemon (TDaemonThread)
ro | FatalException (TThread)
 | FreeOnTerminate (TThread)
ro | Handle (TThread)
 | Priority (TThread)
 | ReturnValue (TThread)
 | Suspended (TThread)
ro | Terminated (TThread)
ro |


TDaemonThread
 | Create
 | Execute
 | CheckControlMessage
 | StopDaemon
 | PauseDaemon
 | ContinueDaemon
 | ShutDownDaemon
 | InterrogateDaemon
TThread
 | CallOnTerminate
 | GetPriority
 | SetPriority
 | SetSuspended
 | GetSuspended
 | DoTerminate
 | Execute
 | Synchronize
 | Create
 | Destroy
 | AfterConstruction
 | Start
 | Resume
 | Suspend
 | Terminate
 | WaitFor
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


CallOnTerminate (TThread)

CheckControlMessage (TDaemonThread)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

ContinueDaemon (TDaemonThread)

Create (TObject)

Create (TThread)

Create (TDaemonThread)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TThread)

Dispatch (TObject)

DispatchStr (TObject)

DoTerminate (TThread)

Equals (TObject)

Execute (TThread)

Execute (TDaemonThread)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPriority (TThread)

GetSuspended (TThread)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InterrogateDaemon (TDaemonThread)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

PauseDaemon (TDaemonThread)

Resume (TThread)

SafeCallException (TObject)

SetPriority (TThread)

SetSuspended (TThread)

ShutDownDaemon (TDaemonThread)

Start (TThread)

StopDaemon (TDaemonThread)

StringMessageTable (TObject)

Suspend (TThread)

Synchronize (TThread)

Terminate (TThread)

ToString (TObject)

UnitName (TObject)

WaitFor (TThread)


TDaemonThread

TThread

OnTerminate

TObject


OnTerminate (TThread)


TDaemonThread.CheckControlMessage

Check if a control message has arrived

Declaration

Source position: daemonapp.pp line 316

public procedure TDaemonThread.CheckControlMessage(

  WaitForMessage: Boolean

);

Arguments

WaitForMessage

If true, routine waits for message to arrive before returning.

Description

CheckControlMessage checks if a control message has arrived for the daemon and executes the appropriate daemon message. If the parameter WaitForMessage is True, then the routine waits for the message to arrive. If it is False and no message is present, it returns at once.


TDaemonThread.ContinueDaemon

Continue the daemon

Declaration

Source position: daemonapp.pp line 319

public function TDaemonThread.ContinueDaemon: Boolean; virtual;

Function result

True if the daemon was succesfully restarted

Description

ContinueDaemon attempts to stop the daemon using its TDaemon.Continue method. It returns True if the attempt was succesful.

See also

TDaemon.Continue
TDaemonThread.StopDaemon | Stops the daemon
TDaemonThread.PauseDaemon | Pause the daemon
TDaemonThread.ShutDownDaemon | Shut down daemon


TDaemonThread.Create

Create a new thread

Declaration

Source position: daemonapp.pp line 314

public constructor TDaemonThread.Create(

  ADaemon: TCustomDaemon

);

Arguments

ADaemon

Daemon instance which is running in this thread

Description

Create creates a new thread instance. It initializes the Daemon property with the passed ADaemon. The thread is created suspended.

See also

TDaemonThread.Daemon

Daemon instance


TDaemonThread.Daemon

Daemon instance

Declaration

Source position: daemonapp.pp line 322

public property TDaemonThread.Daemon: TCustomDaemon
  read FDaemon;

Description

Daemon is the daemon instance which is running in this thread.

See also

TDaemon

Daemon class for visual development


TDaemonThread.Execute

Run the daemon

Declaration

Source position: daemonapp.pp line 315

public procedure TDaemonThread.Execute; override;

Description

Execute starts executing the daemon and waits till the daemon stops. It also listens for control codes for the daemon.

See also

TDaemon.Execute


TDaemonThread.InterrogateDaemon

Report the daemon status

Declaration

Source position: daemonapp.pp line 321

public function TDaemonThread.InterrogateDaemon: Boolean; virtual;

Function result

Always True.

Description

InterrogateDaemon simply calls TDaemon.ReportStatus for the daemon that is running in this thread. It always returns True.

See also

TDaemon.ReportStatus


TDaemonThread.PauseDaemon

Pause the daemon

Declaration

Source position: daemonapp.pp line 318

public function TDaemonThread.PauseDaemon: Boolean; virtual;

Function result

True if the daemon was succesfully paused

Description

PauseDaemon attempts to stop the daemon using its TDaemon.Pause method, and suspends the thread. It returns True if the attempt was succesful.

See also

TDaemon.Pause
TDaemonThread.StopDaemon | Stops the daemon
TDaemonThread.ContinueDaemon | Continue the daemon
TDaemonThread.ShutDownDaemon | Shut down daemon


TDaemonThread.ShutDownDaemon

Shut down daemon

Declaration

Source position: daemonapp.pp line 320

public function TDaemonThread.ShutDownDaemon: Boolean; virtual;

Function result

The result of TDaemon.Shutdown

Description

ShutDownDaemon shuts down the daemon. This happens normally only when the system is shut down and the daemon didn't respond to the stop request. The return result is the result of the TDaemon.Shutdown function. The thread is terminated by this method.

See also

TDaemon.Shutdown
TDaemonThread.StopDaemon | Stops the daemon
TDaemonThread.PauseDaemon | Pause the daemon
TDaemonThread.ContinueDaemon | Continue the daemon


TDaemonThread.StopDaemon

Stops the daemon

Declaration

Source position: daemonapp.pp line 317

public function TDaemonThread.StopDaemon: Boolean; virtual;

Function result

True if the daemon was stopped succesfully.

Description

StopDaemon attempts to stop the daemon using its TDaemon.Stop method, and terminates the thread.

See also

TDaemon.Stop
TDaemonThread.PauseDaemon | Pause the daemon
TDaemonThread.ShutDownDaemon | Shut down daemon


TDependencies

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Dependencies collection for a daemon

Declaration

Source position: daemonapp.pp line 163

type TDependencies = class(TCollection)
public
constructor Create(); | Create a new instance of a TDependencies collection.
property Items: TDependency; default; [rw] | Default property override
end;

Inheritance

TDependencies

Dependencies collection for a daemon
|

TCollection
|

TPersistent
|

TObject

Description

TDependencies is just a descendent of TCollection which contains a series of dependencies on other services. It overrides the default property of TCollection to return TDependency instances.

See also

TDependency

Container to define depenencies on other services.


TDependencies
 |  | Items
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | Items (TDependencies)
 | PropName (TCollection)
ro | UpdateCount (TCollection)


TDependencies
 | Create
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

Create (TDependencies)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetPropName (TCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TDependencies

TCollection

TPersistent

TObject


TDependencies.Create

Create a new instance of a TDependencies collection.

Declaration

Source position: daemonapp.pp line 171

public constructor TDependencies.Create(

  AOwner: TPersistent

);

Arguments

AOwner

Owner of the collection - normally a TDaemonDef instance.

Description

Create Create a new instance of a TDependencies collection.


TDependencies.Items

Default property override

Declaration

Source position: daemonapp.pp line 172

public property TDependencies.Items: TDependency
  read GetItem
  write SetItem;
  default;

Description

Items overrides the default property of TCollection so the items are of type TDependency.

See also

TDependency

Container to define depenencies on other services.


TDependency

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Container to define depenencies on other services.

Declaration

Source position: daemonapp.pp line 148

type TDependency = class(TCollectionItem)
public
procedure Assign(); override; | Assign TDependency instance to another
published
property Name: ; [rw] | Name of the service
property IsGroup: Boolean; [rw] | Name refers to a service group
end;

Inheritance

TDependency

Container to define depenencies on other services.
|

TCollectionItem
|

TPersistent
|

TObject

Description

TDependency is a collection item used to specify dependencies on other daemons (services) in windows. It is used only on windows and when installing the daemon: changing the dependencies of a running daemon has no effect.

See also

TDependencies | Dependencies collection for a daemon
TDaemonDef | Daemon definition


TDependency
pl |  | Name
pl |  | IsGroup
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


 | ro | ID (TCollectionItem)
 |  | Index (TCollectionItem)
pl |  | IsGroup (TDependency)
pl |  | Name (TDependency)
 | ro | UpdateCount (TCollectionItem)


TDependency
 | Assign
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

Changed (TCollectionItem)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TCollectionItem)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TCollectionItem)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetDisplayName (TCollectionItem)

GetHashCode (TObject)

GetIndex (TCollectionItem)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TCollectionItem)

GetOwner (TPersistent)

GetOwner (TCollectionItem)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SetCollection (TCollectionItem)

SetDisplayName (TCollectionItem)

SetIndex (TCollectionItem)


TDependency

TCollectionItem

TPersistent

TObject


TDependency.IsGroup

Name refers to a service group

Declaration

Source position: daemonapp.pp line 158

published property TDependency.IsGroup: Boolean
  read FIsGroup
  write FIsGroup;

Description

IsGroup can be set to True to indicate that Name refers to the name of a service group.

See also

TDependency.Name

Name of the service


TDependency.Name

Name of the service

Declaration

Source position: daemonapp.pp line 157

published property TDependency.Name:
  read FName
  write FName;

Description

Name is the name of a service or service group that the current daemon depends on.

See also

TDependency.IsGroup

Name refers to a service group


TWinBindings

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Windows Daemon bindings (windows only)

Declaration

Source position: daemonapp.pp line 178

type TWinBindings = class(TPersistent)
public
constructor Create; | Create a new TWinBindings instance
destructor Destroy; override; | Remove a TWinBindings instance from memory
procedure Assign(); override; | Copies all properties
property ErrCode: DWord; [rw] | Service specific error code
property Win32ErrCode: DWord; [rw] | General windows error code
published
property Dependencies: TDependencies; [rw] | Service dependencies
property GroupName: ; [rw] | Service group name
property Password: ; [rw] | Password for service startup
property UserName: ; [rw] | Username to run service as
property StartType: TStartType; [rw] | Service startup type.
property WaitHint: Integer; [rw] | Timeout wait hint
property IDTag: DWord; [rw] | Location in the service group
property ServiceType: TServiceType; [rw] | Type of service
property ErrorSeverity: TErrorSeverity; [rw] | Error severity in case of startup failure
end;

Inheritance

TWinBindings

Windows Daemon bindings (windows only)
|

TPersistent
|

TObject

Description

TWinBindings contains windows-specific properties for the daemon definition (in TDaemonDef.WinBindings). If the daemon should not run on Windows, then the properties can be ignored.

See also

TDaemonDef | Daemon definition
TDaemonDef.WinBindings | Windows-specific bindings (windows only)


TWinBindings
 | ErrCode
 | Win32ErrCode
pl | Dependencies
pl | GroupName
pl | Password
pl | UserName
pl | StartType
pl | WaitHint
pl | IDTag
pl | ServiceType
pl | ErrorSeverity
TPersistent
TObject


pl | Dependencies (TWinBindings)
 | ErrCode (TWinBindings)
pl | ErrorSeverity (TWinBindings)
pl | GroupName (TWinBindings)
pl | IDTag (TWinBindings)
pl | Password (TWinBindings)
pl | ServiceType (TWinBindings)
pl | StartType (TWinBindings)
pl | UserName (TWinBindings)
pl |


TWinBindings
 | Create
 | Destroy
 | Assign
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TWinBindings)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TWinBindings)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetOwner (TPersistent)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TWinBindings

TPersistent

TObject


TWinBindings.Assign

Copies all properties

Declaration

Source position: daemonapp.pp line 195

public procedure TWinBindings.Assign(

  Source: TPersistent

); override;

Arguments

Source

TWinBindings instance to copy properties from

Description

Assign is overridden by TWinBindings so all properties are copied from Source to the TWinBindings instance.


TWinBindings.Create

Create a new TWinBindings instance

Declaration

Source position: daemonapp.pp line 193

public constructor TWinBindings.Create;

Description

Create initializes various properties such as the dependencies.

See also

TDaemonDef | Daemon definition
TDaemonDef.WinBindings | Windows-specific bindings (windows only)
TWinBindings.Dependencies | Service dependencies


TWinBindings.Dependencies

Service dependencies

Declaration

Source position: daemonapp.pp line 199

published property TWinBindings.Dependencies: TDependencies
  read FDependencies
  write SetDependencies;

Description

Dependencies contains the list of other services (or service groups) that this service depends on. Windows will first attempt to start these services prior to starting this service. If they cannot be started, then the service will not be started either.

This property is only used during installation of the service.


TWinBindings.Destroy

Remove a TWinBindings instance from memory

Declaration

Source position: daemonapp.pp line 194

public destructor TWinBindings.Destroy; override;

Description

Destroy cleans up the TWinBindings instance.

See also

TWinBindings.Dependencies | Service dependencies
TWinBindings.Create | Create a new TWinBindings instance


TWinBindings.ErrCode

Service specific error code

Declaration

Source position: daemonapp.pp line 196

public property TWinBindings.ErrCode: DWord
  read FErrCode
  write FErrCode;

Description

ErrCode contains a service specific error code that is reported with TDaemon.ReportStatus to the windows service manager. If it is zero, then the contents of Win32ErrCode are reported. If it is nonzero, then the windows-errorcode is set to ERROR_SERVICE_SPECIFIC_ERROR.

See also

TWinBindings.Win32ErrCode

General windows error code


TWinBindings.ErrorSeverity

Error severity in case of startup failure

Declaration

Source position: daemonapp.pp line 207

published property TWinBindings.ErrorSeverity: TErrorSeverity
  read FErrorSeverity
  write FErrorSeverity;

Description

ErrorSeverity can be used at installation time to tell the windows service manager how to behave when the service fails to start during system startup.

This property is only used during installation of the service.


TWinBindings.GroupName

Service group name

Declaration

Source position: daemonapp.pp line 200

published property TWinBindings.GroupName:
  read FLoadGroup
  write FLoadGroup;

Description

GroupName specifies the name of a service group that the service belongs to. If it is empty, then the service does not belong to any group.

This property is only used during installation of the service.

See also

TDependency.IsGroup

Name refers to a service group


TWinBindings.IDTag

Location in the service group

Declaration

Source position: daemonapp.pp line 205

published property TWinBindings.IDTag: DWord
  read FTagID
  write FTagID;

Description

IDTag contains the location of the service in the service group after installation of the service. It should not be set, it is reported by the service manager.

This property is only used during installation of the service.


TWinBindings.Password

Password for service startup

Declaration

Source position: daemonapp.pp line 201

published property TWinBindings.Password:
  read FPassWord
  write FPassword;

Description

Password contains the service password: if the service is started with credentials other than one of the system users, then the password for the user must be entered here.

This property is only used during installation of the service.

See also

UserName

Username to run service as


TWinBindings.ServiceType

Type of service

Declaration

Source position: daemonapp.pp line 206

published property TWinBindings.ServiceType: TServiceType
  read FServiceType
  write FServiceType;

Description

ServiceType specifies what kind of service is being installed.

This property is only used during installation of the service.


TWinBindings.StartType

Service startup type.

Declaration

Source position: daemonapp.pp line 203

published property TWinBindings.StartType: TStartType
  read FStartType
  write FStartType;

Description

StartType specifies when the service should be started during system startup.

This property is only used during installation of the service.


TWinBindings.UserName

Username to run service as

Declaration

Source position: daemonapp.pp line 202

published property TWinBindings.UserName:
  read FUserName
  write FUserName;

Description

Username specifies the name of a user whose credentials should be used to run the service. If it is left empty, the service is run as the system user. The password can be set in the Password property.

This property is only used during installation of the service.

See also

Password

Password for service startup


TWinBindings.WaitHint

Timeout wait hint

Declaration

Source position: daemonapp.pp line 204

published property TWinBindings.WaitHint: Integer
  read FWaitHint
  write FWaitHint;

Description

WaitHint specifies the estimated time for a start/stop/pause or continue operation (in milliseconds). Reportstatus should be called prior to this time to report the next status.

See also

TDaemon.ReportStatus


TWinBindings.Win32ErrCode

General windows error code

Declaration

Source position: daemonapp.pp line 197

public property TWinBindings.Win32ErrCode: DWord
  read FWin32ErrorCode
  write FWin32ErrorCode;

Description

Win32ErrCode is a general windows service error code that can be reported with TDaemon.ReportStatus to the windows service manager. It is sent if ErrCode is zero.

See also

ErrCode

Service specific error code


EDatabaseError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for all database-related errors

Declaration

Source position: db.pas line 81

type EDatabaseError = class(Exception) ;

Inheritance

EDatabaseError

Base class for all database-related errors
|

Exception
|

TObject

Description

EDatabaseError is the base class from which database-related exception classes should derive. It is raised by the DatabaseError call.

See also

DatabaseError | Raise an EDatabaseError exception.
DatabaseErrorFmt | Raise an EDatabaseError exception with a formatted message


EDatabaseError
Exception
 | HelpContext
 | Message
TObject


EDatabaseError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EDatabaseError

Exception

TObject


EUpdateError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Error raised when updating data during a post operation.

Declaration

Source position: db.pas line 82

type EUpdateError = class(EDatabaseError)
public
constructor Create(); | Create a new EUpdateError instance
destructor Destroy; override; | Free the EupdateError instance
property Context: ; [r] | Context in which exception occurred.
property ErrorCode: Integer; [r] | Numerical error code.
property OriginalException: Exception; [r]
property PreviousError: Integer; [r] | Previous error number
end;

Inheritance

EUpdateError | Error raised when updating data during a post operation.
|
EDatabaseError | Base class for all database-related errors
|
Exception
|
TObject

Description

EupdateError is an exception used by the TProvider database support. It should never be raised directly.

See also

EDatabaseError

Base class for all database-related errors


EUpdateError
 | ro | Context
 | ro | ErrorCode
 | ro | OriginalException
 | ro | PreviousError
EDatabaseError
Exception
 |  | HelpContext
 |  | Message
TObject


ro | Context (EUpdateError)
ro | ErrorCode (EUpdateError)
 | HelpContext (Exception)
 | Message (Exception)
ro | OriginalException (EUpdateError)
ro |


EUpdateError
 | Create
 | Destroy
EDatabaseError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (Exception)

Create (EUpdateError)

CreateFmt (Exception)

CreateFmtHelp (Exception)

CreateHelp (Exception)

CreateRes (Exception)

CreateResFmt (Exception)

CreateResFmtHelp (Exception)

CreateResHelp (Exception)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (EUpdateError)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


EUpdateError

EDatabaseError

Exception

TObject


EUpdateError.Context

Context in which exception occurred.

Declaration

Source position: db.pas line 92

public property EUpdateError.Context:
  read FContext;

Description

A description of the context in which the original exception was raised.

See also

EUpdateError.OriginalException
EUpdateError.ErrorCode | Numerical error code.
EUpdateError.PreviousError | Previous error number


EUpdateError.Create

Create a new EUpdateError instance

Declaration

Source position: db.pas line 89

public constructor EUpdateError.Create(

  NativeError: ;

  Context: ;

  ErrCode: Integer;

  PrevError: Integer;

  E: Exception

);

Arguments

NativeError | Native error description.
Context | Context in which error occurred, if applicable
ErrCode | Numerical error code, if applicable
PrevError | Previous error number
E | Actual exception object.

Description

Create instantiates a new EUpdateError object and populates the various properties with the NativeError, Context, ErrCode and PrevError parameters. The E parameter is the actual exception that occurred while the update operation was attempted. The exception object E will be freed if the EUpdateError instance is freed.

See also

EDatabaseError

Base class for all database-related errors


EUpdateError.Destroy

Free the EupdateError instance

Declaration

Source position: db.pas line 91

public destructor EUpdateError.Destroy; override;

Description

Destroy frees the original exception object (if there was one) and then calls the inherited destructor.

Errors

If the original exception object was already freed, an error will occur.

See also

EUpdateError.OriginalException


EUpdateError.ErrorCode

Numerical error code.

Declaration

Source position: db.pas line 93

public property EUpdateError.ErrorCode: Integer
  read FErrorcode;

Description

ErrorCode is a numerical error code, provided by the native data access layer, to describe the error. It may or not be filled.

See also

EUpdateError.OriginalException
EUpdateError.Context | Context in which exception occurred.
EUpdateError.PreviousError | Previous error number


EUpdateError.OriginalException

Declaration

Source position: db.pas line 94

public property EUpdateError.OriginalException: Exception
  read FOriginalException;


EUpdateError.PreviousError

Previous error number

Declaration

Source position: db.pas line 95

public property EUpdateError.PreviousError: Integer
  read FPreviousError;

Description

PreviousError is used to order the errors which occurred during an update operation.

See also

EUpdateError.ErrorCode | Numerical error code.
EUpdateError.Context | Context in which exception occurred.
EUpdateError.OriginalException


IProviderSupport

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Declaration

Source position: db.pas line 1310

type IProviderSupport = interface

  procedure PSEndTransaction();

  procedure PSExecute;

  function PSExecuteStatement();

  procedure PSGetAttributes();

  function PSGetCommandText;

  function PSGetCommandType;

  function PSGetDefaultOrder;

  function PSGetIndexDefs();

  function PSGetKeyFields;

  function PSGetParams;

  function PSGetQuoteChar;

  function PSGetTableName;

  function PSGetUpdateException();

  function PSInTransaction;

  function PSIsSQLBased;

  function PSIsSQLSupported;

  procedure PSReset;

  procedure PSSetCommandText();

  procedure PSSetParams();

  procedure PSStartTransaction;

  function PSUpdateRecord();

end;

Inheritance

IProviderSupport
Documentation generated on: Aug 02 2012


IProviderSupport


IProviderSupport
 | PSEndTransaction
 | PSExecute
 | PSExecuteStatement
 | PSGetAttributes
 | PSGetCommandText
 | PSGetCommandType
 | PSGetDefaultOrder
 | PSGetIndexDefs
 | PSGetKeyFields
 | PSGetParams
 | PSGetQuoteChar
 | PSGetTableName
 | PSGetUpdateException
 | PSInTransaction
 | PSIsSQLBased
 | PSIsSQLSupported
 | PSReset
 | PSSetCommandText
 | PSSetParams
 | PSStartTransaction
 | PSUpdateRecord


PSEndTransaction (IProviderSupport)

PSExecute (IProviderSupport)

PSExecuteStatement (IProviderSupport)

PSGetAttributes (IProviderSupport)

PSGetCommandText (IProviderSupport)

PSGetCommandType (IProviderSupport)

PSGetDefaultOrder (IProviderSupport)

PSGetIndexDefs (IProviderSupport)

PSGetKeyFields (IProviderSupport)

PSGetParams (IProviderSupport)

PSGetQuoteChar (IProviderSupport)

PSGetTableName (IProviderSupport)

PSGetUpdateException (IProviderSupport)

PSInTransaction (IProviderSupport)

PSIsSQLBased (IProviderSupport)

PSIsSQLSupported (IProviderSupport)

PSReset (IProviderSupport)

PSSetCommandText (IProviderSupport)

PSSetParams (IProviderSupport)

PSStartTransaction (IProviderSupport)

PSUpdateRecord (IProviderSupport)


IProviderSupport.PSEndTransaction

Declaration

Source position: db.pas line 1311

procedure IProviderSupport.PSEndTransaction(

  ACommit: Boolean

);


IProviderSupport.PSExecute

Declaration

Source position: db.pas line 1312

procedure IProviderSupport.PSExecute;


IProviderSupport.PSExecuteStatement

Declaration

Source position: db.pas line 1313

function IProviderSupport.PSExecuteStatement(

  const ASQL: ;

  AParams: TParams;

  ResultSet: Pointer = Nil

):Integer;


IProviderSupport.PSGetAttributes

Declaration

Source position: db.pas line 1315

procedure IProviderSupport.PSGetAttributes(

  List: TList

);


IProviderSupport.PSGetCommandText

Declaration

Source position: db.pas line 1316

function IProviderSupport.PSGetCommandText: ;


IProviderSupport.PSGetCommandType

Declaration

Source position: db.pas line 1317

function IProviderSupport.PSGetCommandType: TPSCommandType;


IProviderSupport.PSGetDefaultOrder

Declaration

Source position: db.pas line 1318

function IProviderSupport.PSGetDefaultOrder: TIndexDef;


IProviderSupport.PSGetIndexDefs

Declaration

Source position: db.pas line 1319

function IProviderSupport.PSGetIndexDefs(

  IndexTypes: TIndexOptions = [ixPrimary..ixNonMaintained]

):TIndexDefs;


IProviderSupport.PSGetKeyFields

Declaration

Source position: db.pas line 1321

function IProviderSupport.PSGetKeyFields: ;


IProviderSupport.PSGetParams

Declaration

Source position: db.pas line 1322

function IProviderSupport.PSGetParams: TParams;


IProviderSupport.PSGetQuoteChar

Declaration

Source position: db.pas line 1323

function IProviderSupport.PSGetQuoteChar: ;


IProviderSupport.PSGetTableName

Declaration

Source position: db.pas line 1324

function IProviderSupport.PSGetTableName: ;


IProviderSupport.PSGetUpdateException

Declaration

Source position: db.pas line 1325

function IProviderSupport.PSGetUpdateException(

  E: Exception;

  Prev: EUpdateError

):EUpdateError;


IProviderSupport.PSInTransaction

Declaration

Source position: db.pas line 1326

function IProviderSupport.PSInTransaction: Boolean;


IProviderSupport.PSIsSQLBased

Declaration

Source position: db.pas line 1327

function IProviderSupport.PSIsSQLBased: Boolean;


IProviderSupport.PSIsSQLSupported

Declaration

Source position: db.pas line 1328

function IProviderSupport.PSIsSQLSupported: Boolean;


IProviderSupport.PSReset

Declaration

Source position: db.pas line 1329

procedure IProviderSupport.PSReset;


IProviderSupport.PSSetCommandText

Declaration

Source position: db.pas line 1330

procedure IProviderSupport.PSSetCommandText(

  const CommandText:

);


IProviderSupport.PSSetParams

Declaration

Source position: db.pas line 1331

procedure IProviderSupport.PSSetParams(

  AParams: TParams

);


IProviderSupport.PSStartTransaction

Declaration

Source position: db.pas line 1332

procedure IProviderSupport.PSStartTransaction;


IProviderSupport.PSUpdateRecord

Declaration

Source position: db.pas line 1333

function IProviderSupport.PSUpdateRecord(

  UpdateKind: TUpdateKind;

  Delta: TDataSet

):Boolean;


TAutoIncField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field for auto-incremental, 32-bit signed integer data

Declaration

Source position: db.pas line 617

type TAutoIncField = class(TLongintField)

public

  constructor Create(); override;

Create a new instance of the TAutoIncField class.

end;

Inheritance

TAutoIncField | Field for auto-incremental, 32-bit signed integer data
|
TLongintField | Field class for 32-bit signed integer data
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TAutoIncField is the class created when a dataset must manage 32-bit signed integer data, of datatype ftAutoInc: This field gets it's data automatically by the database engine. It exposes no new properties, but simply overrides some methods to manage 32-bit signed integer data.

It should never be necessary to create an instance of TAutoIncField manually, a field of this class will be instantiated automatically for each auto-incremental field when a dataset is opened.

See also

TField

Provide access to the contents of a single field in a record


TAutoIncField
TLongintField
 |  | Value
pl |  | MaxValue
pl |  | MinValue
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
pl | ro | Alignment (TNumericField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TNumericField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
pl |  | EditFormat (TNumericField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
pl |  | MaxValue (TLongintField)
pl |  | MinValue (TLongintField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TLongintField)
 |  | VCLComObject (TComponent)
pl |  |


TAutoIncField
 | Create
TLongintField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TLongintField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TLongintField)

Create (TAutoIncField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TAutoIncField
TLongintField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


pl | OnChange (TField)
pl | OnGetText (TField)
pl | OnSetText (TField)
pl |


TAutoIncField.Create

Create a new instance of the TAutoIncField class.

Declaration

Source position: db.pas line 621

public constructor TAutoIncField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the newly created fields.

Description

Create initializes a new instance of the TAutoIncField class. It simply calls the inherited constructor and then sets up some of the TField class' fields.

See also

TField

Provide access to the contents of a single field in a record


TBCDField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for Binary Coded Decimal (BCD) values

Declaration

Source position: db.pas line 772

type TBCDField = class(TNumericField)
public
constructor Create(); override; | Create a new instance of a TBCDField class.
function CheckRange(); | Check whether a values falls within the allowed range
property Value: Currency; [rw] | Value of the field contents as a Currency type
published
property Precision: LongInt; [rw] | Precision of the BCD field
property Currency: Boolean; [rw] | Does the field represent a currency amount
property MaxValue: Currency; [rw] | Maximum value for the field
property MinValue: Currency; [rw] | Minimum value for the field
property Size; | Number of decimals after the decimal separator
end;

Inheritance

TBCDField | Field class for Binary Coded Decimal (BCD) values
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TBCDField is the class used when a dataset must manage data of Binary Coded Decimal type. (TField.DataType equals ftBCD). It initializes some of the properties of the TField class, and overrides some of its methods to be able to work with BCD fields.

TBCDField assumes that the field's contents can be stored in a currency type, i.e. the maximum number of decimals after the decimal separator that can be stored in a TBCDField is 4. Fields that need to store a larger amount of decimals should be represented by a TFMTBCDField instance.

It should never be necessary to create an instance of TBCDField manually, a field of this class will be instantiated automatically for each BCD field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TFMTBCDField


TBCDField
 |  | Value
pl |  | Precision
pl |  | Currency
pl |  | MaxValue
pl |  | MinValue
pl | ro | Size
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
pl | ro | Alignment (TNumericField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
pl |  | Currency (TBCDField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TNumericField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
pl |  | EditFormat (TNumericField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
pl |  | MaxValue (TBCDField)
pl |  | MinValue (TBCDField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | Precision (TBCDField)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TBCDField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TBCDField)
 |  | VCLComObject (TComponent)
pl |  |


TBCDField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TBCDField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TBCDField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TBCDField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TBCDField.CheckRange

Check whether a values falls within the allowed range

Declaration

Source position: db.pas line 796

public function TBCDField.CheckRange(

  AValue: Currency

):Boolean;

Arguments

AValue

Value to check

Function result

True if AValue falls in the allowed range of values

Description

CheckRange returns True if AValue lies within the range defined by the MinValue and MaxValue properties. If the value lies outside of the allowed range, then False is returned.

See also

MaxValue | Maximum value for the field
MinValue | Minimum value for the field


TBCDField.Create

Create a new instance of a TBCDField class.

Declaration

Source position: db.pas line 795

public constructor TBCDField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the new field instance

Description

Create initializes a new instance of the TBCDField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with BCD data values.

See also

TField

Provide access to the contents of a single field in a record


TBCDField.Currency

Does the field represent a currency amount

Declaration

Source position: db.pas line 800

published property TBCDField.Currency: Boolean
  read FCurrency
  write FCurrency;

Description

Currency can be set to True to indicate that the field contains data representing an amount of currency. This affects the way the TField.DisplayText and TField.Text properties format the value of the field: if the Currency property is True, then these properties will format the value as a currency value (generally appending the currency sign) and if the Currency property is False, then they will format it as a normal floating-point value.

See also

TField.DisplayText | Formatted field value
TField.Text | Text representation of the field


TBCDField.MaxValue

Maximum value for the field

Declaration

Source position: db.pas line 801

published property TBCDField.MaxValue: Currency
  read FMaxValue
  write FMaxValue;

Description

MaxValue can be set to a value different from zero, it is then the maximum value for the field if set to any value different from zero. When setting the field's value, the value may not be larger than MaxValue. Any attempt to write a larger value as the field's content will result in an exception. By default MaxValue equals 0, i.e. any floating-point value is allowed.

If MaxValue is set, MinValue should also be set, because it will also be checked.

See also

TBCDField.MinValue | Minimum value for the field
TBCDField.CheckRange | Check whether a values falls within the allowed range


TBCDField.MinValue

Minimum value for the field

Declaration

Source position: db.pas line 802

published property TBCDField.MinValue: Currency
  read FMinValue
  write FMinValue;

Description

MinValue can be set to a value different from zero, then it is the minimum value for the field. When setting the field's value, the value may not be less than MinValue. Any attempt to write a smaller value as the field's content will result in an exception. By default MinValue equals 0, i.e. any floating-point value is allowed.

If MinValue is set, TBCDField.MaxValue should also be set, because it will also be checked.

See also

TBCDField.MaxValue | Maximum value for the field
TBCDField.CheckRange | Check whether a values falls within the allowed range


TBCDField.Precision

Precision of the BCD field

Declaration

Source position: db.pas line 799

published property TBCDField.Precision: LongInt
  read FPrecision
  write FPrecision;

Description

Precision is the total number of decimals in the BCD value. It is not the same as TBCDField.Size, which is the number of decimals after the decimal point. The Precision property should be set by the descendent classes when they initialize the field, and should be considered read-only. Changing the value will influence the values returned by the various AsXXX properties.

See also

TBCDField.Size | Number of decimals after the decimal separator
TBCDField.Value | Value of the field contents as a Currency type


TBCDField.Size

Number of decimals after the decimal separator

Declaration

Source position: db.pas line 803

published property TBCDField.Size
  default 4;

Description

Size is the number of decimals after the decimal separator. It is not the total number of decimals, which is stored in the TBCDField.Precision field.

See also

TBCDField.Precision

Precision of the BCD field


TBCDField.Value

Value of the field contents as a Currency type

Declaration

Source position: db.pas line 797

public property TBCDField.Value: Currency
  read GetAscurrency
  write SetAscurrency;

Description

Value is overridden from the TField.Value property to a currency type field. It returns the same value as the TField.AsCurrency field.

See also

TField.Value | Value of the field as a variant value
TField.AsCurrency | Access the field's contents as a Currency value.


TBinaryField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for working with binary field data

Declaration

Source position: db.pas line 735

type TBinaryField = class(TField)
public
constructor Create(); override; | Create a new instance of a TBinaryField class.
published
property Size; | Size of the binary data
end;

Inheritance

TBinaryField | Field class for working with binary field data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TBinaryField is an abstract class, designed to handle binary data of variable size. It overrides some of the properties and methods of the TField class to be able to work with binary field data, such as retrieving the contents as a string or as a variant.

One must never create an instance of TBinaryField manually, it is an abstract class. Instead, a descendent class such as TBytesField or TVarBytesField should be created.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TBytesField | Field class for fixed size byte array values
TVarBytesField | Field class for variable size byte array values


TBinaryField
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TBinaryField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | VCLComObject (TComponent)
pl |  |


TBinaryField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBinaryField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TBinaryField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TBinaryField.Create

Create a new instance of a TBinaryField class.

Declaration

Source position: db.pas line 747

public constructor TBinaryField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new field instance.

Description

Create initializes a new instance of the TBinaryField class. It simply calls the inherited destructor.

See also

TField

Provide access to the contents of a single field in a record


TBinaryField.Size

Size of the binary data

Declaration

Source position: db.pas line 749

published property TBinaryField.Size
  default 16;

Description

Size is simply redeclared published with a default value of 16.

See also

TField.Size

Logical size of the field


TBlobField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for BLOB field data

Declaration

Source position: db.pas line 852

type TBlobField = class(TField)
public
constructor Create(); override; | Create a new instance of a TBlobField class.
procedure Clear; override; | Clear the BLOB field's contents
class function IsBlob; override; | Is the field a blob field
procedure LoadFromFile(); | Load the contents of the field frop a file
procedure LoadFromStream(); | Load the field's contents from stream
procedure SaveToFile(); | Save field contents to a file
procedure SaveToStream(); | Save the field's contents to stream
procedure SetFieldType(); override; | Set field type
property BlobSize: LongInt; [r] | Size of the current blob
property Modified: Boolean; [rw] | Has the field's contents been modified.
property Value: ; [rw] | Return the field's contents as a string
property Transliterate: Boolean; [rw] | Should the contents of the field be transliterated
published
property BlobType: TBlobType; [rw] | Type of blob
property Size; | Size of the blob field
end;

Inheritance

TBlobField | Base class for BLOB field data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TBLobField is the class used when a dataset must manage BLOB data. (TField.DataType equals ftBLOB). It initializes some of the properties of the TField class, and overrides some of its methods to be able to work with BLOB fields. It also serves as parent class for some specialized blob-like field types such as TMemoField, TWideMemoField or TGraphicField

It should never be necessary to create an instance of TBlobField manually, a field of this class will be instantiated automatically for each BLOB field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TMemoField | Base class for MEMO (text BLOB) field data
TWideMemoField | Field class for wide MEMO (widestring text BLOB) field data
TGraphicField | Field class for graphical BLOB field data


TBlobField
 | ro | BlobSize
 |  | Modified
 |  | Value
 |  | Transliterate
pl |  | BlobType
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 | ro | BlobSize (TBlobField)
pl |  | BlobType (TBlobField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Modified (TBlobField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TBlobField)
 |  | Tag (TComponent)
 |  | Text (TField)
 |  | Transliterate (TBlobField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TBlobField)
 |  | VCLComObject (TComponent)
pl |  |


TBlobField
 | Create
 | Clear
 | IsBlob
 | LoadFromFile
 | LoadFromStream
 | SaveToFile
 | SaveToStream
 | SetFieldType
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Clear (TBlobField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBlobField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsBlob (TBlobField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

LoadFromFile (TBlobField)

LoadFromStream (TBlobField)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SaveToFile (TBlobField)

SaveToStream (TBlobField)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetFieldType (TBlobField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TBlobField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TBlobField.BlobSize

Size of the current blob

Declaration

Source position: db.pas line 879

public property TBlobField.BlobSize: LongInt
  read GetBlobSize;

Description

BlobSize is the size (in bytes) of the current contents of the field. It will vary as the dataset's current record moves from record to record.

See also

TField.Size | Logical size of the field
TField.DataSize | Size of the field's data


TBlobField.BlobType

Type of blob

Declaration

Source position: db.pas line 884

published property TBlobField.BlobType: TBlobType
  read FBlobType
  write FBlobType;

Description

BlobType is an alias for TField.DataType, but with a restricted set of values. Setting BlobType is equivalent to setting the TField.DataType property.

See also

TField.DataType

The data type of the field.


TBlobField.Clear

Clear the BLOB field's contents

Declaration

Source position: db.pas line 872

public procedure TBlobField.Clear; override;

Description

Clear overrides the TField implementation of TField.Clear. It creates and immediatly releases an empty blob stream in write mode, effectively clearing the contents of the BLOB field.

See also

TField.Clear | Clear the field contents.
TField.IsNull | Is the field empty


TBlobField.Create

Create a new instance of a TBlobField class.

Declaration

Source position: db.pas line 871

public constructor TBlobField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the new field instance

Description

Create initializes a new instance of the TBlobField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with BLOB data.

See also

TField

Provide access to the contents of a single field in a record


TBlobField.IsBlob

Is the field a blob field

Declaration

Source position: db.pas line 873

public class function TBlobField.IsBlob: Boolean; override;

Function result

Always True

Description

IsBlob is overridden by TBlobField to return True

See also

TField.IsBlob

Is the field a BLOB field (untyped data of indeterminate size).


TBlobField.LoadFromFile

Load the contents of the field frop a file

Declaration

Source position: db.pas line 874

public procedure TBlobField.LoadFromFile(

  const FileName:

);

Arguments

FileName

Name of file to read data from

Description

LoadFromFile creates a file stream with FileName as the name of the file to open, en then calls LoadFromStream to read the contents of the blob field from the file. The file is opened in read-only mode.

Errors

If the file does not exist or is nor available for reading, an exception will be raised.

See also

LoadFromStream | Load the field's contents from stream
SaveToFile | Save field contents to a file


TBlobField.LoadFromStream

Load the field's contents from stream

Declaration

Source position: db.pas line 875

public procedure TBlobField.LoadFromStream(

  Stream: TStream

);

Arguments

Stream

Stream instance to load data from

Description

LoadFromStream can be used to load the contents of the field from a TStream descendent. The entire data of the stream will be copied, and the stream will be positioned on the first byte of data, so it must be seekable.

Errors

If the stream is not seekable, an exception will be raised.

See also

SaveToStream | Save the field's contents to stream
LoadFromFile | Load the contents of the field frop a file


TBlobField.Modified

Has the field's contents been modified.

Declaration

Source position: db.pas line 880

public property TBlobField.Modified: Boolean
  read FModified
  write FModified;

Description

Modified indicates whether the field's contents have been modified for the current record.

See also

TBlobField.LoadFromStream

Load the field's contents from stream


TBlobField.SaveToFile

Save field contents to a file

Declaration

Source position: db.pas line 876

public procedure TBlobField.SaveToFile(

  const FileName:

);

Arguments

FileName

Name of file to write data to

Description

SaveToFile creates a file stream with FileName as the name of the file to open, en then calls SaveToStream to write the contents of the blob field to the file. The file is opened in write mode and is created if it does not yet exist.

Errors

If the file cannot be created or is not available for writing, an exception will be raised.

See also

LoadFromFile | Load the contents of the field frop a file
SaveToStream | Save the field's contents to stream


TBlobField.SaveToStream

Save the field's contents to stream

Declaration

Source position: db.pas line 877

public procedure TBlobField.SaveToStream(

  Stream: TStream

);

Arguments

Stream

Stream to save data to

Description

SaveToStream can be used to save the contents of the field to a TStream descendent. The entire data of the field will be copied. The stream must of course support writing.

Errors

If the stream is not writable, an exception will be raised.

See also

SaveToFile | Save field contents to a file
LoadFromStream | Load the field's contents from stream


TBlobField.SetFieldType

Set field type

Declaration

Source position: db.pas line 878

public procedure TBlobField.SetFieldType(

  AValue: TFieldType

); override;

Arguments

AValue

Value for the DataType property

Description

SetFieldType is overridden by TBlobField to check whether a valid Blob field type is set. If so, it calls the inherited method.

See also

TField.DataType

The data type of the field.


TBlobField.Size

Size of the blob field

Declaration

Source position: db.pas line 885

published property TBlobField.Size
  default 0;

Description

Size is the size of the blob in the internal memory buffer. It defaults to 0, as the BLOB data is not stored in the internal memory buffer. To get the size of the data in the current record, use the BlobSize property instead.

See also

BlobSize

Size of the current blob


TBlobField.Transliterate

Should the contents of the field be transliterated

Declaration

Source position: db.pas line 882

public property TBlobField.Transliterate: Boolean
  read FTransliterate
  write FTransliterate;

Description

Transliterate indicates whether the contents of the field should be transliterated (i.e. changed from OEM to non OEM codepage and vice versa) when reading or writing the value. The actual transliteration must be done in the TDataset.Translate method of the dataset to which the field belongs. By default this property is False, but it can be set to True for BLOB data which contains text in another codepage.

See also

TStringField.Transliterate | Should the field value be transliterated when reading or writing
TDataset.Translate | Transliterate a buffer


TBlobField.Value

Return the field's contents as a string

Declaration

Source position: db.pas line 881

public property TBlobField.Value:
  read GetAsString
  write SetAsString;

Description

Value is redefined by TBlobField as a string value: getting or setting this value will convert the BLOB data to a string, it will return the same value as the TField.AsString property.

See also

TField.Value | Value of the field as a variant value
TField.AsString | Access the field's contents as an AnsiString value.


TBooleanField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Boolean field class type

Declaration

Source position: db.pas line 668

type TBooleanField = class(TField)
public
constructor Create(); override; | Create a new instance of the TBooleanField class.
property Value: Boolean; [rw] | Value of the field as a boolean value
published
property DisplayValues: ; [rw] | Textual representation of the true and false values
end;

Inheritance

TBooleanField | Boolean field class type
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TBooleanField is the field class used by TDataset whenever it needs to manage boolean data (TField.DataType equals ftBoolean). It overrides some properties and methods of TField to be able to work with boolean data.

It should never be necessary to create an instance of TBooleanField manually, a field of this class will be instantiated automatically for each boolean field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record


TBooleanField
 |  | Value
pl |  | DisplayValues
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayValues (TBooleanField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TBooleanField)
 |  | VCLComObject (TComponent)
pl |  |


TBooleanField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBooleanField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TBooleanField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TBooleanField.Create

Create a new instance of the TBooleanField class.

Declaration

Source position: db.pas line 686

public constructor TBooleanField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field instance

Description

Create initializes a new instance of the TBooleanField class. It calls the inherited constructor and then sets some TField properties to configure it for working with boolean values.

See also

TField

Provide access to the contents of a single field in a record


TBooleanField.DisplayValues

Textual representation of the true and false values

Declaration

Source position: db.pas line 689

published property TBooleanField.DisplayValues:
  read FDisplayValues
  write SetDisplayValues;

Description

DisplayValues contains 2 strings, separated by a semicolon (;) which are used to display the True and False values of the fields. The first string is used for True values, the second value is used for False values. If only one value is given, it will serve as the representation of the True value, the False value will be represented as an empty string.

A value of Yes;No will result in True values being displayed as 'Yes', and False values as 'No'. When writing the value of the field as a string, the string will be compared (case insensitively) with the value for True, and if it matches, the field's value will be set to True. After this it will be compared to the value for False, and if it matches, the field's value will be set to False. If the text matches neither of the two values, an exception will be raised.

See also

TField.AsString | Access the field's contents as an AnsiString value.
TField.Text | Text representation of the field


TBooleanField.Value

Value of the field as a boolean value

Declaration

Source position: db.pas line 687

public property TBooleanField.Value: Boolean
  read GetAsBoolean
  write SetAsBoolean;

Description

Value is redefined from TField.Value by TBooleanField as a boolean value. It returns the same value as the TField.AsBoolean property.

See also

TField.AsBoolean | Access the field's contents as a Boolean value.
TField.Value | Value of the field as a variant value


TBytesField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for fixed size byte array values

Declaration

Source position: db.pas line 754

type TBytesField = class(TBinaryField)

public

  constructor Create(); override;

Create a new instance of a TBytesField class.

end;

Inheritance

TBytesField | Field class for fixed size byte array values
|
TBinaryField | Field class for working with binary field data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TBytesField is the class used when a dataset must manage data of fixed-size binary type. (TField.DataType equals ftBytes). It initializes some of the properties of the TField class to be able to work with fixed-size byte fields.

It should never be necessary to create an instance of TBytesField manually, a field of this class will be instantiated automatically for each binary data field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TVarBytesField | Field class for variable size byte array values


TBytesField
TBinaryField
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TBytesField
 | Create
TBinaryField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBinaryField)

Create (TBytesField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TBytesField
TBinaryField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TBytesField.Create

Create a new instance of a TBytesField class.

Declaration

Source position: db.pas line 758

public constructor TBytesField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the niew field instance

Description

Create initializes a new instance of the TBytesField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with binary data values.

See also

TField

Provide access to the contents of a single field in a record


TCheckConstraint

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Record-level constraint definition

Declaration

Source position: db.pas line 1022

type TCheckConstraint = class(TCollectionItem)
public
procedure Assign(); override; | Assign one constraint to another
published
property CustomConstraint: ; [rw] | User-defined constraint
property ErrorMessage: ; [rw] | Message to display when the constraint is violated
property FromDictionary: Boolean; [rw] | True if the constraint is imported from a datadictionary
property ImportedConstraint: ; [rw] | Constraint imported from the database engine
end;

Inheritance

TCheckConstraint

Record-level constraint definition
|

TCollectionItem
|

TPersistent
|

TObject

Description

TCheckConstraint can be used to store the definition of a record-level constraint. It does not enforce the constraint, it only stores the constraint's definition. The constraint can come from several sources: an imported constraints from the database, usually stored in the TCheckConstraint.ImportedConstraint property , or a constraint enforced by the user on a particular dataset instance stored in TCheckConstraint.CustomConstraint

See also

TCheckConstraints | Set of record-level constraints
TCheckConstraint.ImportedConstraint | Constraint imported from the database engine
TCheckConstraint.CustomConstraint | User-defined constraint


TCheckConstraint
pl |  | CustomConstraint
pl |  | ErrorMessage
pl |  | FromDictionary
pl |  | ImportedConstraint
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


pl |  | CustomConstraint (TCheckConstraint)
 |  | DisplayName (TCollectionItem)
pl |  | ErrorMessage (TCheckConstraint)
pl |  | FromDictionary (TCheckConstraint)
 | ro | ID (TCollectionItem)
pl |  | ImportedConstraint (TCheckConstraint)
 |  | Index (TCollectionItem)
 | ro | UpdateCount (TCollectionItem)


TCheckConstraint
 | Assign
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TCheckConstraint

TCollectionItem

TPersistent

TObject


TCheckConstraint.Assign

Assign one constraint to another

Declaration

Source position: db.pas line 1029

public procedure TCheckConstraint.Assign(

  Source: TPersistent

); override;

Arguments

Source

Instance to copy properties from.

Description

Assign is overridden by TCheckConstraint to copy all published properties if Source is also a TCheckConstraint instance.

Errors

If Source is not an instance of TCheckConstraint, an exception may be thrown.

See also

TCheckConstraint.ImportedConstraint | Constraint imported from the database engine
TCheckConstraint.CustomConstraint | User-defined constraint


TCheckConstraint.CustomConstraint

User-defined constraint

Declaration

Source position: db.pas line 1032

published property TCheckConstraint.CustomConstraint:
  read FCustomConstraint
  write FCustomConstraint;

Description

CustomConstraint is an SQL expression with an additional user-defined constraint. The expression should be enforced by a TDataset descendent when data is posted to the dataset. If the constraint is violated, then the dataset should raise an exception, with message as specified in TCheckConstraint.ErrorMessage

See also

TCheckConstraint.ErrorMessage

Message to display when the constraint is violated


TCheckConstraint.ErrorMessage

Message to display when the constraint is violated

Declaration

Source position: db.pas line 1033

published property TCheckConstraint.ErrorMessage:
  read FErrorMessage
  write FErrorMessage;

Description

ErrorMessage is used as the message when the dataset instance raises an exception if the constraint is violated.

See also

TCheckConstraint.CustomConstraint

User-defined constraint


TCheckConstraint.FromDictionary

True if the constraint is imported from a datadictionary

Declaration

Source position: db.pas line 1034

published property TCheckConstraint.FromDictionary: Boolean
  read FFromDictionary
  write FFromDictionary;

Description

FromDictionary indicates whether a constraint is imported from a data dictionary. This can be set by TDataset descendents to indicate the source of the constraint, but is otherwise ignored.

See also

TCheckConstraint.ImportedConstraint

Constraint imported from the database engine


TCheckConstraint.ImportedConstraint

Constraint imported from the database engine

Declaration

Source position: db.pas line 1035

published property TCheckConstraint.ImportedConstraint:
  read FImportedConstraint
  write FImportedConstraint;

Description

ImportedConstraint is a constraint imported from the database engine: it will not be enforced locally by the TDataset descendent.

See also

TCheckConstraint.CustomConstraint

User-defined constraint


TCheckConstraints

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Set of record-level constraints

Declaration

Source position: db.pas line 1040

type TCheckConstraints = class(TCollection)
public
constructor Create(); | Create a new instance of the TCheckConstraints class.
function Add; | Add new TCheckConstraint item to the collection
property Items: TCheckConstraint; default; [rw] | Indexed access to the items in the collection
end;

Inheritance

TCheckConstraints

Set of record-level constraints
|

TCollection
|

TPersistent
|

TObject

Description

TCheckConstraints is a TCollection descendent which keeps a collection of TCheckConstraint items. It overrides the Add method to return a TCheckConstraint instance.

See also

TCheckConstraint

Record-level constraint definition


TCheckConstraints
 |  | Items
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | Items (TCheckConstraints)
 | PropName (TCollection)
ro | UpdateCount (TCollection)


TCheckConstraints
 | Create
 | Add
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

Add (TCheckConstraints)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

Create (TCheckConstraints)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetPropName (TCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TCheckConstraints

TCollection

TPersistent

TObject


TCheckConstraints.Add

Add new TCheckConstraint item to the collection

Declaration

Source position: db.pas line 1048

public function TCheckConstraints.Add: TCheckConstraint;

Function result

The newly added TCheckConstraint instance

Description

Add is overridden by TCheckConstraint to add a new TCheckConstraint instance to the collection. it returns the newly added instance.

See also

TCheckConstraint

Record-level constraint definition

#rtl.classes.TCollection.Add


TCheckConstraints.Create

Create a new instance of the TCheckConstraints class.

Declaration

Source position: db.pas line 1047

public constructor TCheckConstraints.Create(

  AOwner: TPersistent

);

Arguments

AOwner

Owner for the collection

Description

Create initializes a new instance of the TCheckConstraints class. The AOwner argument is usually the TDataset instance for which the data is managed. It is kept for future reference. After storing the owner, the inherited constructor is called with the TCheckConstraint class pointer.

See also

TCheckConstraint | Record-level constraint definition
TDataset | Base class for records-based data-access


TCheckConstraints.Items

Indexed access to the items in the collection

Declaration

Source position: db.pas line 1049

public property TCheckConstraints.Items: TCheckConstraint
  read GetItem
  write SetItem;
  default;

Description

Items is overridden by TCheckConstraints to provide type-safe access to the items in the collection. The index is zero-based, so it runs from 0 to Count-1.

See also

#rtl.classes.TCollection.Items


TCurrencyField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class for currency fields

Declaration

Source position: db.pas line 659

type TCurrencyField = class(TFloatField)
public
constructor Create(); override; | Create a new instance of a TCurrencyField.
published
property Currency; | Is the field a currency field
end;

Inheritance

TCurrencyField | Class for currency fields
|
TFloatField | Class for floating point values
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TCurrencyField is the field class used by TDataset when it needs to manage currency-valued data.(TField.Datatype equals ftCurrency). It simply sets some Tfield properties to be able to work with currency data.

It should never be necessary to create an instance of TCurrencyField manually, a field of this class will be instantiated automatically for each currency field when a dataset is opened.

See also

TField | Provide access to the contents of a single field in a record
TDataset | Base class for records-based data-access


TCurrencyField
pl | ro | Currency
TFloatField
 |  | Value
pl |  | Currency
pl |  | MaxValue
pl |  | MinValue
pl |  | Precision
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
pl | ro | Alignment (TNumericField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
pl |  | Currency (TFloatField)
pl | ro | Currency (TCurrencyField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TNumericField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
pl |  | EditFormat (TNumericField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
pl |  | MaxValue (TFloatField)
pl |  | MinValue (TFloatField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | Precision (TFloatField)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TFloatField)
 |  | VCLComObject (TComponent)
pl |  |


TCurrencyField
 | Create
TFloatField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TFloatField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TFloatField)

Create (TCurrencyField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TCurrencyField
TFloatField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TCurrencyField.Create

Create a new instance of a TCurrencyField.

Declaration

Source position: db.pas line 661

public constructor TCurrencyField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the new field instance

Description

Create initializes a new instance of TCurrencyField. It calls the inherited constructor and then sets some properties (TCurrencyField.Currency) to be able to work with currency data.

See also

TField | Provide access to the contents of a single field in a record
TCurrencyField.Currency | Is the field a currency field


TCurrencyField.Currency

Is the field a currency field

Declaration

Source position: db.pas line 663

published property TCurrencyField.Currency
  default true;

Description

Currency is inherited from TFloatField.Currency but is initialized to True by the TCurrencyField constructor. It can be set to False if the contents of the field is of type currency, but does not represent an amount of currency.

See also

TFloatField.Currency

Is the field a currency field.


TCustomConnection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Abstract class for connections to a server

Declaration

Source position: db.pas line 1855

type TCustomConnection = class(TComponent)
public
procedure Close; | Close the connection
destructor Destroy; override; | Remove the TCustomconnection instance from memory
procedure Open; | Makes the connection to the server
property DataSetCount: LongInt; [r] | Number of datasets connected to this connection
property DataSets: TDataSet; [r] | Datasets linked to this connection
published
property Connected: Boolean; [rw] | Is the connection established or not
property LoginPrompt: Boolean; [rw] | Should the OnLogin be triggered
property AfterConnect: TNotifyEvent; [rw] | Event triggered after a connection is made.
property AfterDisconnect: TNotifyEvent; [rw] | Event triggered after a connection is closed
property BeforeConnect: TNotifyEvent; [rw] | Event triggered before a connection is made.
property BeforeDisconnect: TNotifyEvent; [rw] | Event triggered before a connection is closed
property OnLogin: TLoginEvent; [rw] | Event triggered when a login prompt is shown.
end;

Inheritance

TCustomConnection

Abstract class for connections to a server
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TCustomConnection must be used for all database classes that need a connection to a server. The class introduces some methods and classes to activate the connection (Open) and to deactivate the connection (TCustomConnection.Close), plus a property to inspect the state (Connected) of the connected.

See also

TCustomConnection.Open | Makes the connection to the server
TCustomConnection.Close | Close the connection
TCustomConnection.Connected | Is the connection established or not


TCustomConnection
 | ro | DataSetCount
 | ro | DataSets
pl |  | Connected
pl |  | LoginPrompt
pl |  | AfterConnect
pl |  | AfterDisconnect
pl |  | BeforeConnect
pl |  | BeforeDisconnect
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | AfterConnect (TCustomConnection)
pl |  | AfterDisconnect (TCustomConnection)
pl |  | BeforeConnect (TCustomConnection)
pl |  | BeforeDisconnect (TCustomConnection)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | Connected (TCustomConnection)
 | ro | DataSetCount (TCustomConnection)
 | ro | DataSets (TCustomConnection)
 |  | DesignInfo (TComponent)
pl |  | LoginPrompt (TCustomConnection)
 |  | Name (TComponent)
 | ro |


TCustomConnection
 | Close
 | Destroy
 | Open
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Close (TCustomConnection)

Create (TObject)

Create (TComponent)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TCustomConnection)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

Open (TCustomConnection)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TCustomConnection

pl

OnLogin

TComponent

TPersistent

TObject


TCustomConnection.AfterConnect

Event triggered after a connection is made.

Declaration

Source position: db.pas line 1888

published property TCustomConnection.AfterConnect: TNotifyEvent
  read FAfterConnect
  write SetAfterConnect;

Description

AfterConnect is called after a connection is succesfully established in TCustomConnection.Open. It can be used to open datasets, or indicate a connection status change.

See also

TCustomConnection.Open | Makes the connection to the server
TCustomConnection.BeforeConnect | Event triggered before a connection is made.
TCustomConnection.OnLogin | Event triggered when a login prompt is shown.


TCustomConnection.AfterDisconnect

Event triggered after a connection is closed

Declaration

Source position: db.pas line 1889

published property TCustomConnection.AfterDisconnect: TNotifyEvent
  read FAfterDisconnect
  write SetAfterDisconnect;

Description

AfterDisConnect is called after a connection is succesfully closed in TCustomConnection.Close. It can be used for instance to indicate a connection status change.

See also

TCustomConnection.Close | Close the connection
TCustomConnection.BeforeDisconnect | Event triggered before a connection is closed


TCustomConnection.BeforeConnect

Event triggered before a connection is made.

Declaration

Source position: db.pas line 1890

published property TCustomConnection.BeforeConnect: TNotifyEvent
  read FBeforeConnect
  write SetBeforeConnect;

Description

BeforeConnect is called before a connection is attempted in TCustomConnection.Open. It can be used to set connection parameters, or to abort the establishing of the connection: if an exception is raised during this event, the connection attempt is aborted.

See also

TCustomConnection.Open | Makes the connection to the server
TCustomConnection.AfterConnect | Event triggered after a connection is made.
TCustomConnection.OnLogin | Event triggered when a login prompt is shown.


TCustomConnection.BeforeDisconnect

Event triggered before a connection is closed

Declaration

Source position: db.pas line 1891

published property TCustomConnection.BeforeDisconnect: TNotifyEvent
  read FBeforeDisconnect
  write SetBeforeDisconnect;

Description

BeforeDisConnect is called before a connection is closed in TCustomConnection.Close. It can be used for instance to check for unsaved changes, to save thise changes, or to abort the disconnect operation: if an exception is raised during the event handler, the disconnect operation is aborted entirely.

See also

TCustomConnection.Close | Close the connection
TCustomConnection.AfterDisconnect | Event triggered after a connection is closed


TCustomConnection.Close

Close the connection

Declaration

Source position: db.pas line 1879

public procedure TCustomConnection.Close;

Description

Close closes the connection with the server if it was connected. Calling this method first triggers the BeforeDisconnect event. If an exception is raised during the execution of that event handler, the disconnect process is aborted. After calling this event, the connection is actually closed. After the connection was closed, the AfterDisconnect event is triggered.

Calling the Close method is equivalent to setting the Connected property to False.

Errors

If the connection cannot be broken for some reason, an EDatabaseError exception will be raised.

See also

TCustomConnection.BeforeDisconnect | Event triggered before a connection is closed
TCustomConnection.AfterDisconnect | Event triggered after a connection is closed
TCustomConnection.Open | Makes the connection to the server
TCustomConnection.Connected | Is the connection established or not


TCustomConnection.Connected

Is the connection established or not

Declaration

Source position: db.pas line 1885

published property TCustomConnection.Connected: Boolean
  read GetConnected
  write SetConnected;

Description

Connected is True if the connection to the server is established, False if it is disconnected. The property can be set to True to establish a connection (equivalent to calling TCustomConnection.Open, or to False to break it (equivalent to calling TCustomConnection.Close.

See also

TCustomConnection.Open | Makes the connection to the server
TCustomConnection.Close | Close the connection


TCustomConnection.DataSetCount

Number of datasets connected to this connection

Declaration

Source position: db.pas line 1882

public property TCustomConnection.DataSetCount: LongInt
  read GetDataSetCount;

Description

DatasetCount is the number of datasets connected to this connection component. The actual datasets are available through the Datasets array property. As implemented in TCustomConnection, this property is always zero. Descendent classes implement the actual count.

See also

TDataset | Base class for records-based data-access
TCustomConnection.Datasets | Datasets linked to this connection


TCustomConnection.DataSets

Datasets linked to this connection

Declaration

Source position: db.pas line 1883

public property TCustomConnection.DataSets: TDataSet
  read GetDataSet;

Description

Datasets allows indexed access to the datasets connected to this connection. Index is a zero-based indexed, it's maximum value is DatasetCount-1.

See also

DatasetCount

Number of datasets connected to this connection


TCustomConnection.Destroy

Remove the TCustomconnection instance from memory

Declaration

Source position: db.pas line 1880

public destructor TCustomConnection.Destroy; override;

Description

Destroy closes the connection, and then calls the inherited destructor.

Errors

If an exception is raised during the disconnect process, an exception will be raise, and the instance is not removed from memory.

See also

TCustomConnection.Close

Close the connection


TCustomConnection.LoginPrompt

Should the OnLogin be triggered

Declaration

Source position: db.pas line 1886

published property TCustomConnection.LoginPrompt: Boolean
  read FLoginPrompt
  write FLoginPrompt;

Description

LoginPrompt can be set to True if the OnLogin handler should be called when the Open method is called. If it is not True, then the event handler is not called.

See also

TCustomConnection.OnLogin

Event triggered when a login prompt is shown.


TCustomConnection.OnLogin

Event triggered when a login prompt is shown.

Declaration

Source position: db.pas line 1892

published property TCustomConnection.OnLogin: TLoginEvent
  read FOnLogin
  write FOnLogin;

Description

OnLogin is triggered when the connection needs a login prompt during the call: it is triggered when the LoginPrompt property is True, after the TCustomConnection.BeforeConnect event, but before the connection is actually established.

See also

TCustomConnection.BeforeConnect | Event triggered before a connection is made.
TCustomConnection.LoginPrompt | Should the OnLogin be triggered
TCustomConnection.Open | Makes the connection to the server


TCustomConnection.Open

Makes the connection to the server

Declaration

Source position: db.pas line 1881

public procedure TCustomConnection.Open;

Description

Open establishes the connection with the server if it was not yet connected. Calling this method first triggers the BeforeConnect event. If an exception is raised during the execution of that event handler, the connect process is aborted. If LoginPrompt is True, the OnLogin event handler is called. Only after this event, the connection is actually established. After the connection was established, the AfterConnect event is triggered.

Calling the Open method is equivalent to setting the Connected property to True.

Errors

If an exception is raised during the BeforeConnect or OnLogin handlers, the connection is not actually established.

See also

TCustomConnection.BeforeConnect | Event triggered before a connection is made.
TCustomConnection.LoginPrompt | Should the OnLogin be triggered
TCustomConnection.OnLogin | Event triggered when a login prompt is shown.
TCustomConnection.AfterConnect | Event triggered after a connection is made.
TCustomConnection.Connected | Is the connection established or not


TDatabase

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for connecting a FreePascal application to an external Database engine

Declaration

Source position: db.pas line 1900

type TDatabase = class(TCustomConnection)
public
constructor Create(); override; | Initialize a new TDatabase class instance.
destructor Destroy; override; | Remove a TDatabase instance from memory.
procedure CloseDataSets; | Close all connected datasets
procedure CloseTransactions; | End all transactions
procedure StartTransaction; virtual; abstract; | Start a new transaction.
procedure EndTransaction; virtual; abstract; | End an active transaction.
property TransactionCount: LongInt; [r] | Number of transaction components connected to this database.
property Transactions: TDBTransaction; [r] | Indexed access to all transaction components connected to this database.
property Directory: ; [rw] | Directory for the database
property IsSQLBased: Boolean; [r] | Is the database SQL based.
published
property Connected: Boolean; [rw] | Is the datbase connected
property DatabaseName: ; [rw] | Database name or path
property KeepConnection: Boolean; [rw] | Should the connection be kept active
property Params: TStrings; [rw] | Connection parameters
end;

Inheritance

TDatabase | Base class for connecting a FreePascal application to an external Database engine
|
TCustomConnection | Abstract class for connections to a server
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TDatabase is a component whose purpose is to provide a connection to an external database engine, not to provide the database itself. This class provides generic methods for attachment to databases and querying their contents; the details of the actual connection are handled by database-specific components (such as SQLDb for SQL-based databases, or DBA for DBASE/FoxPro style databases).

Like TDataset, TDatabase is an abstract class. It provides methods to keep track of datasets connected to the database, and to close these datasets when the connection to the database is closed. To this end, it introduces a Connected boolean property, which indicates whether a connection to the database is established or not. The actual logic to establish a connection to a database must be implemented by descendent classes.

See also

TDataset | Base class for records-based data-access
TDatabase | Base class for connecting a FreePascal application to an external Database engine


TDatabase
 | ro | TransactionCount
 | ro | Transactions
 |  | Directory
 | ro | IsSQLBased
pl |  | Connected
pl |  | DatabaseName
pl |  | KeepConnection
pl |  | Params
TCustomConnection
 | ro | DataSetCount
 | ro | DataSets
pl |  | Connected
pl |  | LoginPrompt
pl |  | AfterConnect
pl |  | AfterDisconnect
pl |  | BeforeConnect
pl |  | BeforeDisconnect
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | AfterConnect (TCustomConnection)
pl |  | AfterDisconnect (TCustomConnection)
pl |  | BeforeConnect (TCustomConnection)
pl |  | BeforeDisconnect (TCustomConnection)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | Connected (TCustomConnection)
pl |  | Connected (TDatabase)
pl |  | DatabaseName (TDatabase)
 | ro | DataSetCount (TCustomConnection)
 | ro | DataSets (TCustomConnection)
 |  | DesignInfo (TComponent)
 |  | Directory (TDatabase)
 | ro | IsSQLBased (TDatabase)
pl |  | KeepConnection (TDatabase)
pl |  | LoginPrompt (TCustomConnection)
 |  | Name (TComponent)
 | ro | Owner (TComponent)
pl |  | Params (TDatabase)
 |  | Tag (TComponent)
 | ro | TransactionCount (TDatabase)
 | ro |


TDatabase
 | Create
 | Destroy
 | CloseDataSets
 | CloseTransactions
 | StartTransaction
 | EndTransaction
TCustomConnection
 | Close
 | Destroy
 | Open
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Close (TCustomConnection)

CloseDataSets (TDatabase)

CloseTransactions (TDatabase)

Create (TObject)

Create (TComponent)

Create (TDatabase)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TCustomConnection)

Destroy (TDatabase)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

EndTransaction (TDatabase)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

Open (TCustomConnection)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StartTransaction (TDatabase)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDatabase

TCustomConnection

pl

OnLogin

TComponent

TPersistent

TObject


TDatabase.CloseDataSets

Close all connected datasets

Declaration

Source position: db.pas line 1933

public procedure TDatabase.CloseDataSets;

Description

CloseDatasets closes all connected datasets. It is called automatically when the connection is closed.

See also

TCustomConnection.Close | Close the connection
TDatabase.CloseTransactions | End all transactions


TDatabase.CloseTransactions

End all transactions

Declaration

Source position: db.pas line 1934

public procedure TDatabase.CloseTransactions;

Description

CloseTransaction calls TDBTransaction.EndTransaction on all connected transactions. It is called automatically when the connection is closed, after all datasets are closed.

See also

TCustomConnection.Close | Close the connection
TDatabase.CloseDatasets | Close all connected datasets


TDatabase.Create

Initialize a new TDatabase class instance.

Declaration

Source position: db.pas line 1931

public constructor TDatabase.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new TDatabase instance.

Description

Create initializes a new instance of the TDatabase class. It allocates some resources and then calls the inherited constructor.

See also

TDBDataset | Dataset connected to a database.
TDBTransaction | Encapsulate a transaction
TDatabase.Destroy | Remove a TDatabase instance from memory.


TDatabase.DatabaseName

Database name or path

Declaration

Source position: db.pas line 1944

published property TDatabase.DatabaseName:
  read FDatabaseName
  write FDatabaseName;

Description

DatabaseName specifies the path of the database. For directory-based databases this will be the same as the Directory property. For other databases this will be the name of a known pre-configured connection, or the location of the database file.

See also

TDatabase.Directory | Directory for the database
TDatabase.Params | Connection parameters


TDatabase.Destroy

Remove a TDatabase instance from memory.

Declaration

Source position: db.pas line 1932

public destructor TDatabase.Destroy; override;

Description

Destroy starts by disconnecting the database (thus closing all datasets and ending all transactions), then notifies all connected datasets and transactions that it is about to be released. After this, it releases all resources used by the TDatabase instance

See also

TDatabase.CloseDatasets

Close all connected datasets


TDatabase.Directory

Directory for the database

Declaration

Source position: db.pas line 1940

public property TDatabase.Directory:
  read FDirectory
  write FDirectory;

Description

Directory is provided for Delphi compatibility: it indicates (for Paradox and dBase based databases) the directory where the database files are located. It is not used in the Free Pascal implementation of TDatabase.

See also

TDatabase.Params | Connection parameters
TDatabase.IsSQLBased | Is the database SQL based.


TDatabase.EndTransaction

End an active transaction.

Declaration

Source position: db.pas line 1937

public procedure TDatabase.EndTransaction; virtual; abstract;

Description

EndTransaction must be implemented by descendent classes to end an active transaction. This method is provided for Delphi compatibility: new applications shoud use a TDBTransaction component instead and invoke the TDBTransaction.EndTransaction method.

See also

TDBTransaction

Encapsulate a transaction

TDBTransaction.EndTransaction


TDatabase.IsSQLBased

Is the database SQL based.

Declaration

Source position: db.pas line 1941

public property TDatabase.IsSQLBased: Boolean
  read FSQLBased;

Description

IsSQLbased is a read-only property which indicates whether a property is SQL-Based, i.e. whether the database engine accepts SQL commands.

See also

TDatabase.Params | Connection parameters
TDatabase.Directory | Directory for the database


TDatabase.KeepConnection

Should the connection be kept active

Declaration

Source position: db.pas line 1945

published property TDatabase.KeepConnection: Boolean
  read FKeepConnection
  write FKeepConnection;

Description

KeepConnection is provided for Delphi compatibility, and is not used in the Free Pascal implementation of TDatabase.

See also

TDatabase.Params

Connection parameters


TDatabase.Params

Connection parameters

Declaration

Source position: db.pas line 1946

published property TDatabase.Params: TStrings
  read FParams
  write SetParams;

Description

Params is a catch-all storage mechanism for database connection parameters. It is a list of strings in the form of Name=Value pairs. Which name/value pairs are supported depends on the TDatabase descendent, but the user_name and password parameters are commonly used to store the login credentials for the database.

See also

TDatabase.Directory | Directory for the database
TDatabase.DatabaseName | Database name or path


TDatabase.StartTransaction

Start a new transaction.

Declaration

Source position: db.pas line 1936

public procedure TDatabase.StartTransaction; virtual; abstract;

Description

StartTransaction must be implemented by descendent classes to start a new transaction. This method is provided for Delphi compatibility: new applications shoud use a TDBTransaction component instead and invoke the TDBTransaction.StartTransaction method.

See also

TDBTransaction

Encapsulate a transaction

TDBTransaction.StartTransaction


TDatabase.TransactionCount

Number of transaction components connected to this database.

Declaration

Source position: db.pas line 1938

public property TDatabase.TransactionCount: LongInt
  read GetTransactionCount;

Description

TransactionCount is the number of transaction components which are connected to this database instance. It is the upper bound for the TDatabase.Transactions array property.

See also

TDatabase.Transactions

Indexed access to all transaction components connected to this database.


TDatabase.Transactions

Indexed access to all transaction components connected to this database.

Declaration

Source position: db.pas line 1939

public property TDatabase.Transactions: TDBTransaction
  read GetTransaction;

Description

Transactions provides indexed access to the transaction components connected to this database. The Index is zero based: it runs from 0 to TransactionCount-1.

See also

TDatabase.TransactionCount

Number of transaction components connected to this database.


TDatabaseClass

Class pointer for TDatabase.

Declaration

Source position: db.pas line 1898

type TDatabaseClass = class of TDataBase;

Description

TDatabaseClass is the class pointer for the TDatabase class.

See also

TDatabase

Base class for connecting a FreePascal application to an external Database engine


TDataLink

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Data event handling agent for controls

Declaration

Source position: db.pas line 1664

type TDataLink = class(TPersistent)
public
constructor Create; | Initialize a new instance of TDataLink
destructor Destroy; override; | Remove an instance of TDatalink from memory
function Edit; | Set the dataset in edit mode, if possible
procedure UpdateRecord; | Called when the data in the dataset must be updated
function ExecuteAction(); virtual; | Execute action
function UpdateAction(); virtual; | Update handler for actions
property Active: Boolean; [r] | Is the link active
property ActiveRecord: Integer; [rw] | Currently active record
property BOF: Boolean; [r] | Is the dataset at the first record
property BufferCount: Integer; [rw] | Set to the number of record buffers this datalink needs.
property DataSet: TDataSet; [r] | Dataset this datalink is connected to
property DataSource: TDatasource; [rw] | Datasource this datalink is connected to
property DataSourceFixed: Boolean; [rw] | Can the datasource be changed
property Editing: Boolean; [r] | Is the dataset in edit mode
property Eof: Boolean; [r] |
property ReadOnly: Boolean; [rw] | Is the link readonly
property RecordCount: Integer; [r] | Number of records in the buffer of the dataset
end;

Inheritance

TDataLink

Data event handling agent for controls
|

TPersistent
|

TObject

Description

TDataLink is used by GUI controls or datasets in a master-detail relationship to handle data events coming from a TDatasource instance. It is a class that exists for component programmers, application coders should never need to use TDataLink or one of it's descendents.

DB-Aware Component coders must use a TDatalink instance to handle all communication with a TDataset instance, rather than communicating directly with the dataset. TDataLink contains methods which are called by the various events triggered by the dataset. Inversely, it has some methods to trigger actions in the dataset.

TDatalink is an abstract class; it is never used directly. Instead, a descendent class is used which overrides the various methods that are called in response to the events triggered by the dataset. Examples are .

See also

TDataset | Base class for records-based data-access
TDatasource | Component representing the link between a local (GUI) component and a dataset
TDetailDatalink | Represents the link between a detail data source and a master datasource.
TMasterDataLink | Datalink for Master-Detail relationships between datasets.


TDataLink
 | ro | Active
 |  | ActiveRecord
 | ro | BOF
 |  | BufferCount
 | ro | DataSet
 |  | DataSource
 |  | DataSourceFixed
 | ro | Editing
 | ro | Eof
 |  | ReadOnly
 | ro | RecordCount
TPersistent
TObject


ro | Active (TDataLink)
 | ActiveRecord (TDataLink)
ro | BOF (TDataLink)
 | BufferCount (TDataLink)
ro | DataSet (TDataLink)
 | DataSource (TDataLink)
 | DataSourceFixed (TDataLink)
ro | Editing (TDataLink)
ro | Eof (TDataLink)
 | ReadOnly (TDataLink)
ro |


TDataLink
 | Create
 | Destroy
 | Edit
 | UpdateRecord
 | ExecuteAction
 | UpdateAction
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TDataLink)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TDataLink)

Dispatch (TObject)

DispatchStr (TObject)

Edit (TDataLink)

Equals (TObject)

ExecuteAction (TDataLink)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetOwner (TPersistent)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TDataLink)

UpdateRecord (TDataLink)


TDataLink

TPersistent

TObject


TDataLink.Active

Is the link active

Declaration

Source position: db.pas line 1710

public property TDataLink.Active: Boolean
  read FActive;

Description

Active determines whether the events of the dataset are passed on to the control connected to the actionlink. If it is set to False, then no events are passed between control and dataset. It is set to TDataset.Active whenever the DataSource property is set.

See also

TDatalink.Datasource | Datasource this datalink is connected to
TDatalink.ReadOnly | Is the link readonly
TDataset.Active | Is the dataset open or closed.


TDataLink.ActiveRecord

Currently active record

Declaration

Source position: db.pas line 1711

public property TDataLink.ActiveRecord: Integer
  read GetActiveRecord
  write SetActiveRecord;

Description

ActiveRecord returns the index of the active record in the dataset's record buffer for this datalink.

See also

TDatalink.BOF | Is the dataset at the first record
TDatalink.EOF |


TDataLink.BOF

Is the dataset at the first record

Declaration

Source position: db.pas line 1712

public property TDataLink.BOF: Boolean
  read GetBOF;

Description

BOF returns TDataset.BOF if the dataset is available, True otherwise.

See also

TDatalink.EOF |
TDataset.BOF | Is the cursor at the beginning of the data (on the first record)


TDataLink.BufferCount

Set to the number of record buffers this datalink needs.

Declaration

Source position: db.pas line 1713

public property TDataLink.BufferCount: Integer
  read GetBufferCount
  write SetBufferCount;

Description

BufferCount can be set to the number of buffers that the dataset should manage on behalf of the control connected to this datalink. By default, this is 1. Controls that must display more than 1 buffer (such as grids) can set this to a higher value.

See also

TDataset.ActiveBuffer | Currently active memory buffer
TDatalink.ActiveRecord | Currently active record


TDataLink.Create

Initialize a new instance of TDataLink

Declaration

Source position: db.pas line 1704

public constructor TDataLink.Create;

Description

Create calls the inherited constructor and then initializes some fields. In particular, it sets the buffercount to 1.

See also

TDatalink.Destroy

Remove an instance of TDatalink from memory


TDataLink.DataSet

Dataset this datalink is connected to

Declaration

Source position: db.pas line 1714

public property TDataLink.DataSet: TDataSet
  read GetDataSet;

Description

Dataset equals Datasource.Dataset if the datasource is set, or Nil otherwise.

See also

TDatalink.DataSource | Datasource this datalink is connected to
TDataset | Base class for records-based data-access


TDataLink.DataSource

Datasource this datalink is connected to

Declaration

Source position: db.pas line 1715

public property TDataLink.DataSource: TDatasource
  read FDataSource
  write SetDataSource;

Description

Datasource should be set to a TDatasource instance to get access to the dataset it is connected to. A datalink never points directly to a TDataset instance, always to a datasource. When the datasource is enabled or disabled, all TDatalink instances connected to it are enabld or disabled at once.

See also

TDataset | Base class for records-based data-access
TDatasource | Component representing the link between a local (GUI) component and a dataset


TDataLink.DataSourceFixed

Can the datasource be changed

Declaration

Source position: db.pas line 1716

public property TDataLink.DataSourceFixed: Boolean
  read FDataSourceFixed
  write FDataSourceFixed;

Description

DatasourceFixed can be set to True to prevent changing of the DataSource property. When lengthy operations are in progress, this can be done to prevent user code (e.g. event handlers) from changing the datasource property which might interfere with the operation in progress.

See also

TDataLink.DataSource

Datasource this datalink is connected to


TDataLink.Destroy

Remove an instance of TDatalink from memory

Declaration

Source position: db.pas line 1705

public destructor TDataLink.Destroy; override;

Description

Destroy cleans up the TDatalink instance (in particular, it removes itself from the datasource it is coupled to), and then calls the inherited destructor.

See also

TDatalink.Destroy

Remove an instance of TDatalink from memory


TDataLink.Edit

Set the dataset in edit mode, if possible

Declaration

Source position: db.pas line 1706

public function TDataLink.Edit: Boolean;

Function result

True if the dataset is ready for editing.

Description

Edit attempts to put the dataset in edit mode. It returns True if this operation succeeded, False if not. To this end, it calls the Edit method of the DataSource to which the datalink instance is coupled. If the TDatasource.AutoEdit property is False then this operation will not succeed, inless the dataset is already in edit mode. GUI controls should always respect the result of this function, and not allow the user to edit data if this function returned false.

See also

TDatasource | Component representing the link between a local (GUI) component and a dataset
TDatalink.Datasource | Datasource this datalink is connected to
TDatasource.Edit | Put the dataset in edit mode, if needed
TDatasource.AutoEdit | Should the dataset be put in edit mode automatically


TDataLink.Editing

Is the dataset in edit mode

Declaration

Source position: db.pas line 1717

public property TDataLink.Editing: Boolean
  read FEditing;

Description

Editing determines whether the dataset is in one of the edit states (dsEdit,dsInsert). It can be set into this mode by calling the TDatalink.Edit method. Never attempt to set the dataset in editing mode directly. The Edit method will perform the needed checks prior to setting the dataset in edit mode and will return True if the dataset was succesfully set in the editing state.

See also

TDatalink.Edit | Set the dataset in edit mode, if possible
TDataset.Edit | Set the dataset in editing mode.


TDataLink.Eof

Declaration

Source position: db.pas line 1718

public property TDataLink.Eof: Boolean
  read GetEOF;

Description

EOF returns TDataset.EOF if the dataset is available, True otherwise.

See also

TDatalink.BOF | Is the dataset at the first record
TDataset.EOF | Indicates whether the last record has been reached.


TDataLink.ExecuteAction

Execute action

Declaration

Source position: db.pas line 1708

public function TDataLink.ExecuteAction(

  Action: TBasicAction

):Boolean; virtual;

Arguments

Action

Action to execute

Function result

Action was executed succesfully

Description

ExecuteAction implements action support. It should never be necessary to call ExecuteAction from program code, as it is called automatically whenever a target control needs to handle an action. This method must be overridden in case any additional action must be taken when the action must be executed. The implementation in TDatalink checks if the action handles the datasource, and then calls Action.ExecuteTarget, passing it the datasource. If so, it returns True.

See also

TDatalink.UpdateAction

Update handler for actions


TDataLink.ReadOnly

Is the link readonly

Declaration

Source position: db.pas line 1719

public property TDataLink.ReadOnly: Boolean
  read FReadOnly
  write SetReadOnly;

Description

ReadOnly can be set to True to indicate that the link is read-only, i.e. the connected control will not modify the dataset. Methods as TDatalink.Edit will check this property and fail if the link is read-only. This setting has no effect on the communication of dataset events to the datalink: the TDatalink.Active property can be used to disable delivey of events to the datalink.

See also

TDatalink.Active | Is the link active
TDatalink.edit | Set the dataset in edit mode, if possible


TDataLink.RecordCount

Number of records in the buffer of the dataset

Declaration

Source position: db.pas line 1720

public property TDataLink.RecordCount: Integer
  read GetRecordCount;

Description

RecordCount returns the number of records in the dataset's buffer. It is limited by the TDatalink.BufferCount property: RecordCount i s always less than Buffercount.

See also

TDatalink.BufferCount

Set to the number of record buffers this datalink needs.


TDataLink.UpdateAction

Update handler for actions

Declaration

Source position: db.pas line 1709

public function TDataLink.UpdateAction(

  Action: TBasicAction

):Boolean; virtual;

Arguments

Action

Action to check

Function result

True if the action handles the datalink's datasource.

Description

UpdateAction implements action update support. It should never be necessary to call UpdateAction from program code, as it is called automatically whenever a target control needs to update an action. This method must be overridden in case any specific action must be taken when the action must be updated. The implementation in TDatalink checks if the action handles the datasource, and then calls Action.UpdateTarget, passing it the datasource. If so, it returns True.

See also

TDataLink.ExecuteAction

Execute action


TDataLink.UpdateRecord

Called when the data in the dataset must be updated

Declaration

Source position: db.pas line 1707

public procedure TDataLink.UpdateRecord;

Description

Updaterecord is called when the dataset expects the GUI controls to post any pending changes to the dataset. This method guards against recursive behaviour: while an UpdateRecord is in progress, the TDatalink.RecordChange notification (which could result from writing data to the dataset) will be blocked.

See also

TDatalink.RecordChange


TDataSet

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for records-based data-access

Declaration

Source position: db.pas line 1337

type TDataSet = class(TComponent)
public
constructor Create(); override; | Create a new TDataset instance
destructor Destroy; override; | Free a TDataset instance
function ActiveBuffer; | Currently active memory buffer
public
function GetFieldData(); | Get the data for a field
procedure SetFieldData(); | Store the data for a field
public
procedure Append; | Append a new record to the data
procedure AppendRecord(); | Append a new record to the dataset and fill with data
function BookmarkValid(); virtual; | Test whether ABookMark is a valid bookmark.
procedure Cancel; virtual; | Cancel the current editing operation
procedure CheckBrowseMode; | Check whether the dataset is in browse mode.
procedure ClearFields; | Clear the values of all fields
procedure Close; | Close the dataset
function ControlsDisabled; | Check whether the controls are disabled
function CompareBookmarks(); virtual; | Compare two bookmarks
function CreateBlobStream(); virtual; | Create blob stream
procedure CursorPosChanged; | Indicate a change in cursor position
procedure DataConvert(); virtual; | Convert data from/to native format
procedure Delete; | Delete the current record.
procedure DisableControls; | Disable event propagation of controls
procedure Edit; | Set the dataset in editing mode.
procedure EnableControls; | Enable event propagation of controls
function FieldByName(); | Search a field by name
function FindField(); | Find a field by name
function FindFirst; | Find the first active record (deprecated)
function FindLast; | Find the last active record (deprecated)
function FindNext; | Find the next active record (deprecated)
function FindPrior; | Find the previous active record (deprecated)
procedure First; | Position the dataset on the first record.
procedure FreeBookmark(); virtual; | Free a bookmark obtained with GetBookmark (deprecated)
function GetBookmark; virtual; | Get a bookmark pointer (deprecated)
function GetCurrentRecord(); virtual; | Copy the data for the current record in a memory buffer
procedure GetFieldList(); | Return field instances in a list
procedure GetFieldNames(); | Return a list of all available field names
procedure GotoBookmark(); | Jump to bookmark
procedure Insert; | Insert a new record at the current position.
procedure InsertRecord(); | Insert a new record with given values.
function IsEmpty; | Check if the dataset contains no data
function IsLinkedTo(); | Check whether a datasource is linked to the dataset
function IsSequenced; virtual; | Is the data sequenced
procedure Last; | Navigate forward to the last record
function Locate(); virtual; | Locate a record based on some key values
function Lookup(); virtual; | Search for a record and return matching values.
function MoveBy(); | Move the cursor position
procedure Next; | Go to the next record in the dataset.
procedure Open; | Activate the dataset: Fetch data into memory.
procedure Post; virtual; | Post pending edits to the database.
procedure Prior; | Go to the previous record
procedure Refresh; | Refresh the records in the dataset
procedure Resync(); virtual; | Resynchronize the data buffer
procedure SetFields(); | Set a number of field values at once
function Translate(); virtual; | Transliterate a buffer
procedure UpdateCursorPos; | Update cursor position
procedure UpdateRecord; | Indicate that the record contents have changed
function UpdateStatus; virtual; | Get the update status for the current record
property BlockReadSize: Integer; [rw]
property BOF: Boolean; [r] | Is the cursor at the beginning of the data (on the first record)
property Bookmark: TBookmarkStr; [rw] | Get or set the current cursor position
property CanModify: Boolean; [r] | Can the data in the dataset be modified
property DataSource: TDatasource; [r] | Datasource this dataset is connected to.
property DefaultFields: Boolean; [r] | Is the dataset using persisten fields or not.
property EOF: Boolean; [r] | Indicates whether the last record has been reached.
property FieldCount: LongInt; [r] | Number of fields
property FieldDefs: TFieldDefs; [rw] | Definitions of available fields in the underlying database
property Found: Boolean; [r] | Check success of one of the Find methods
property Modified: Boolean; [r] | Was the current record modified ?
property IsUniDirectional: Boolean; [r] | Is the dataset unidirectional (i.e. forward scrolling only)
property RecordCount: LongInt; [r] | Number of records in the dataset
property RecNo: LongInt; [rw] | Current record number
property RecordSize: Word; [r] | Size of the record in memory
property State: TDataSetState; [r] | Current operational state of the dataset
property Fields: Tfields; [r] | Indexed access to the fields of the dataset.
property FieldValues: Variant; default; [rw] | Acces to field values based on the field names.
property Filter: ; [rw] | Filter to apply to the data in memory.
property Filtered: Boolean; [rw] | Is the filter active or not.
property FilterOptions: TFilterOptions; [rw] | Options to apply when filtering
property Active: Boolean; [rw] | Is the dataset open or closed.
property AutoCalcFields: Boolean; [rw] | How often should the value of calculated fields be calculated
property BeforeOpen: TDataSetNotifyEvent; [rw] | Event triggered before the dataset is opened.
property AfterOpen: TDataSetNotifyEvent; [rw] | Event triggered after the dataset is opened.
property BeforeClose: TDataSetNotifyEvent; [rw] | Event triggered before the dataset is closed.
property AfterClose: TDataSetNotifyEvent; [rw] | Event triggered after the dataset is closed
property BeforeInsert: TDataSetNotifyEvent; [rw] | Event triggered before the dataset is put in insert mode.
property AfterInsert: TDataSetNotifyEvent; [rw] | Event triggered after the dataset is put in insert mode.
property BeforeEdit: TDataSetNotifyEvent; [rw] | Event triggered before the dataset is put in edit mode.
property AfterEdit: TDataSetNotifyEvent; [rw] | Event triggered after the dataset is put in edit mode.
property BeforePost: TDataSetNotifyEvent; [rw] | Event called before changes are posted to the underlying database
property AfterPost: TDataSetNotifyEvent; [rw] | Event called after changes have been posted to the underlying database
property BeforeCancel: TDataSetNotifyEvent; [rw] | Event triggered before a Cancel operation.
property AfterCancel: TDataSetNotifyEvent; [rw] | Event triggered after a Cancel operation.
property BeforeDelete: TDataSetNotifyEvent; [rw] | Event triggered before a Delete operation.
property AfterDelete: TDataSetNotifyEvent; [rw] |
property BeforeScroll: TDataSetNotifyEvent; [rw] | Event triggered before the cursor changes position.
property AfterScroll: TDataSetNotifyEvent; [rw] | Event triggered after the cursor has changed position.
property BeforeRefresh: TDataSetNotifyEvent; [rw] | Event triggered before the data is refreshed.
property AfterRefresh: TDataSetNotifyEvent; [rw] | Event triggered after the data has been refreshed.
property OnCalcFields: TDataSetNotifyEvent; [rw] | Event triggered when values for calculated fields must be computed.
property OnDeleteError: TDataSetErrorEvent; [rw] | Event triggered when a delete operation fails.
property OnEditError: TDataSetErrorEvent; [rw] | Event triggered when an edit operation fails.
property OnFilterRecord: TFilterRecordEvent; [rw] | Event triggered to filter records.
property OnNewRecord: TDataSetNotifyEvent; [rw] | Event triggered when a new record is created.
property OnPostError: TDataSetErrorEvent; [rw] | Event triggered when a post operation fails.
end;

Inheritance

TDataSet

Base class for records-based data-access
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TDataset is the main class of the db unit. This abstract class provides all basic funtionality to access data stored in tabular format: The data consists of records, and the data in each record is organised in several fields.

TDataset has a buffer to cache a few records in memory, this buffer is used by TDatasource to create the ability to use data-aware components.

TDataset is an abstract class, which provides the basic functionality to access, navigate through the data and - in case read-write access is available, edit existing or add new records.

TDataset is an abstract class: it does not have the knowledge to store or load the records from whatever medium the records are stored on. Descendants add the functionality to load and save the data. Therefor TDataset is never used directly, one always instantiates a descendent class.

Initially, no data is available: the dataset is inactive. The Open method must be used to fetch data into memory. After this command, the data is available in memory for browsing or editing purposes: The dataset is active (indicated by the TDataset.Active property). Likewise, the Close method can be used to remove the data from memory. Any changes not yet saved to the underlying medium will be lost.

Data is expected to be in tabular format, where each row represents a record. The dataset has an idea of a cursor: this is the current position of the data cursor in the set of rows. Only the data of the current record is available for display or editing purposes. Through the Next, Prev, First and Last methods, it is possible to navigate through the records. The EOF property will be True if the last row has been reached. Likewise, the BOF property will return True if the first record in the dataset has been rechaed when navigating backwards. If both proprties are empty, then there is no data available. For dataset descendents that support counting the number of records, the RecordCount will be zero.

The Append and Insert methods can be used to insert new records to the set of records. The TDataset.Delete statement is used to delete the current record, and the Edit command must be used to set the dataset in editing mode: the contents of the current record can then be changed. Any changes made to the current record (be it a new or existing record) must be saved by the Post method, or can be undone using the Cancel method.

The data in the various fields properties is available through the Fields array property, giving indexed access to all the fields in a record. The contents of a field is always readable. If the dataset is in one of the editing modes, then the fields can also be written to.

See also

TField

Provide access to the contents of a single field in a record


TDataSet
 |  | BlockReadSize
 | ro | BOF
 |  | Bookmark
 | ro | CanModify
 | ro | DataSource
 | ro | DefaultFields
 | ro | EOF
 | ro | FieldCount
 |  | FieldDefs
 | ro | Found
 | ro | Modified
 | ro | IsUniDirectional
 | ro | RecordCount
 |  | RecNo
 | ro | RecordSize
 | ro | State
 | ro | Fields
 |  | FieldValues
 |  | Filter
 |  | Filtered
 |  | FilterOptions
 |  | Active
 |  | AutoCalcFields
 |  | BeforeOpen
 |  | AfterOpen
 |  | BeforeClose
 |  | AfterClose
 |  | BeforeInsert
 |  | AfterInsert
 |  | BeforeEdit
 |  | AfterEdit
 |  | BeforePost
 |  | AfterPost
 |  | BeforeCancel
 |  | AfterCancel
 |  | BeforeDelete
 |  | AfterDelete
 |  | BeforeScroll
 |  | AfterScroll
 |  | BeforeRefresh
 |  | AfterRefresh
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


 | Active (TDataSet)
 | AfterCancel (TDataSet)
 | AfterClose (TDataSet)
 | AfterDelete (TDataSet)
 | AfterEdit (TDataSet)
 | AfterInsert (TDataSet)
 | AfterOpen (TDataSet)
 | AfterPost (TDataSet)
 | AfterRefresh (TDataSet)
 | AfterScroll (TDataSet)
 | AutoCalcFields (TDataSet)
 | BeforeCancel (TDataSet)
 | BeforeClose (TDataSet)
 | BeforeDelete (TDataSet)
 | BeforeEdit (TDataSet)
 | BeforeInsert (TDataSet)
 | BeforeOpen (TDataSet)
 | BeforePost (TDataSet)
 | BeforeRefresh (TDataSet)
 | BeforeScroll (TDataSet)
 | BlockReadSize (TDataSet)
ro | BOF (TDataSet)
 | Bookmark (TDataSet)
ro | CanModify (TDataSet)
ro | ComObject (TComponent)
ro | ComponentCount (TComponent)
 | ComponentIndex (TComponent)
ro | Components (TComponent)
ro | ComponentState (TComponent)
ro | ComponentStyle (TComponent)
ro | DataSource (TDataSet)
ro | DefaultFields (TDataSet)
 | DesignInfo (TComponent)
ro | EOF (TDataSet)
ro | FieldCount (TDataSet)
 | FieldDefs (TDataSet)
ro | Fields (TDataSet)
 | FieldValues (TDataSet)
 | Filter (TDataSet)
 | Filtered (TDataSet)
 | FilterOptions (TDataSet)
ro | Found (TDataSet)
ro | IsUniDirectional (TDataSet)
ro | Modified (TDataSet)
 | Name (TComponent)
ro | Owner (TComponent)
 | RecNo (TDataSet)
ro | RecordCount (TDataSet)
ro | RecordSize (TDataSet)
ro |


TDataSet
 | Create
 | Destroy
 | ActiveBuffer
 | GetFieldData
 | SetFieldData
 | Append
 | AppendRecord
 | BookmarkValid
 | Cancel
 | CheckBrowseMode
 | ClearFields
 | Close
 | ControlsDisabled
 | CompareBookmarks
 | CreateBlobStream
 | CursorPosChanged
 | DataConvert
 | Delete
 | DisableControls
 | Edit
 | EnableControls
 | FieldByName
 | FindField
 | FindFirst
 | FindLast
 | FindNext
 | FindPrior
 | First
 | FreeBookmark
 | GetBookmark
 | GetCurrentRecord
 | GetFieldList
 | GetFieldNames
 | GotoBookmark
 | Insert
 | InsertRecord
 | IsEmpty
 | IsLinkedTo
 | IsSequenced
 | Last
 | Locate
 | Lookup
 | MoveBy
 | Next
 | Open
 | Post
 | Prior
 | Refresh
 | Resync
 | SetFields
 | Translate
 | UpdateCursorPos
 | UpdateRecord
 | UpdateStatus
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


ActiveBuffer (TDataSet)

AfterConstruction (TObject)

Append (TDataSet)

AppendRecord (TDataSet)

Assign (TPersistent)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

BookmarkValid (TDataSet)

Cancel (TDataSet)

ChangeName (TComponent)

CheckBrowseMode (TDataSet)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

ClearFields (TDataSet)

Close (TDataSet)

CompareBookmarks (TDataSet)

ControlsDisabled (TDataSet)

Create (TObject)

Create (TComponent)

Create (TDataSet)

CreateBlobStream (TDataSet)

CursorPosChanged (TDataSet)

DataConvert (TDataSet)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Delete (TDataSet)

Destroy (TObject)

Destroy (TComponent)

Destroy (TDataSet)

DestroyComponents (TComponent)

Destroying (TComponent)

DisableControls (TDataSet)

Dispatch (TObject)

DispatchStr (TObject)

Edit (TDataSet)

EnableControls (TDataSet)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FieldByName (TDataSet)

FindComponent (TComponent)

FindField (TDataSet)

FindFirst (TDataSet)

FindLast (TDataSet)

FindNext (TDataSet)

FindPrior (TDataSet)

First (TDataSet)

Free (TObject)

FreeBookmark (TDataSet)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetBookmark (TDataSet)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetCurrentRecord (TDataSet)

GetEnumerator (TComponent)

GetFieldData (TDataSet)

GetFieldList (TDataSet)

GetFieldNames (TDataSet)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

GotoBookmark (TDataSet)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

Insert (TDataSet)

InsertComponent (TComponent)

InsertRecord (TDataSet)

InstanceSize (TObject)

Invoke (TComponent)

IsEmpty (TDataSet)

IsImplementorOf (TComponent)

IsLinkedTo (TDataSet)

IsSequenced (TDataSet)

Last (TDataSet)

Loaded (TComponent)

Loading (TComponent)

Locate (TDataSet)

Lookup (TDataSet)

MethodAddress (TObject)

MethodName (TObject)

MoveBy (TDataSet)

newinstance (TObject)

Next (TDataSet)

Notification (TComponent)

Open (TDataSet)

PaletteCreated (TComponent)

Post (TDataSet)

Prior (TDataSet)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Refresh (TDataSet)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

Resync (TDataSet)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldData (TDataSet)

SetFields (TDataSet)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

Translate (TDataSet)

UnitName (TObject)

UpdateAction (TComponent)

UpdateCursorPos (TDataSet)

Updated (TComponent)

UpdateRecord (TDataSet)

UpdateRegistry (TComponent)

UpdateStatus (TDataSet)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDataSet
 | OnCalcFields
 | OnDeleteError
 | OnEditError
 | OnFilterRecord
 | OnNewRecord
 | OnPostError
TComponent
TPersistent
TObject


OnCalcFields (TDataSet)

OnDeleteError (TDataSet)

OnEditError (TDataSet)

OnFilterRecord (TDataSet)

OnNewRecord (TDataSet)

OnPostError (TDataSet)


TDataSet.Active

Is the dataset open or closed.

Declaration

Source position: db.pas line 1636

public property TDataSet.Active: Boolean
  read GetActive
  write SetActive
  default false;

Description

Active is True if the dataset is open, and False if it is closed (TDataset.State is then dsInactive). Setting the Active property to True is equivalent to calling TDataset.Open, setting it to False is equivalent to calling TDataset.Close

See also

TDataset.State | Current operational state of the dataset
TDataset.Open | Activate the dataset: Fetch data into memory.
TDataset.Close | Close the dataset


TDataSet.ActiveBuffer

Currently active memory buffer

Declaration

Source position: db.pas line 1560

public function TDataSet.ActiveBuffer: TRecordBuffer;

Function result

Pointer to buffer used to display current contents

Description

ActiveBuffer points to the currently active memory buffer. It should not be used in application code.


TDataSet.AfterCancel

Event triggered after a Cancel operation.

Declaration

Source position: db.pas line 1649

public property TDataSet.AfterCancel: TDataSetNotifyEvent
  read FAfterCancel
  write FAfterCancel;

Description

AfterCancel is triggered when the TDataset.Cancel operation was succesfully completed, and the dataset is again in dsBrowse state.

See also

TDataset.BeforeCancel | Event triggered before a Cancel operation.
TDataset.Cancel | Cancel the current editing operation
TDataset.State | Current operational state of the dataset


TDataSet.AfterClose

Event triggered after the dataset is closed

Declaration

Source position: db.pas line 1641

public property TDataSet.AfterClose: TDataSetNotifyEvent
  read FAfterClose
  write FAfterClose;

Description

AfterOpen is triggered after the dataset is opened. The dataset has discarded its data and has cleaned up it's internal memory structures. It is in dsInactive state when this event is triggered.

See also

TDataset.BeforeClose | Event triggered before the dataset is closed.
TDataset.State | Current operational state of the dataset


TDataSet.AfterDelete

Declaration

Source position: db.pas line 1651

public property TDataSet.AfterDelete: TDataSetNotifyEvent
  read FAfterDelete
  write FAfterDelete;

Description

AfterDelete is triggered after the succesfull completion of the TDataset.Delete operation, when the dataset is again in dsBrowse state. The event is followed by a TDataset.AfterScroll event.

See also

TDataset.BeforeDelete | Event triggered before a Delete operation.
TDataset.Delete | Delete the current record.
TDataset.AfterScroll | Event triggered after the cursor has changed position.
TDataset.State | Current operational state of the dataset


TDataSet.AfterEdit

Event triggered after the dataset is put in edit mode.

Declaration

Source position: db.pas line 1645

public property TDataSet.AfterEdit: TDataSetNotifyEvent
  read FAfterEdit
  write FAfterEdit;

Description

AfterEdit is triggered after the dataset has finished putting the dataset in dsEdit state and it has initialized the edit buffer for the record. Raising an exception in the AfterEdit event does not undo the edit operation.

See also

TDataset.BeforeEdit | Event triggered before the dataset is put in edit mode.
TDataset.Edit | Set the dataset in editing mode.
TDataset.State | Current operational state of the dataset


TDataSet.AfterInsert

Event triggered after the dataset is put in insert mode.

Declaration

Source position: db.pas line 1643

public property TDataSet.AfterInsert: TDataSetNotifyEvent
  read FAfterInsert
  write FAfterInsert;

Description

AfterInsert is triggered after the dataset has finished putting the dataset in dsInsert state and it has initialized the new record buffer. This event can be used e.g. to set initial field values. After the Afterinsert event, the TDataset.AfterScroll event is still triggered. Raising an exception in the AfterInsert event, will prevent the AfterScroll event from being triggered, but does not undo the insert or append operation.

See also

TDataset.BeforeInsert | Event triggered before the dataset is put in insert mode.
TDataset.AfterScroll | Event triggered after the cursor has changed position.
TDataset.Append | Append a new record to the data
TDataset.Insert | Insert a new record at the current position.


TDataSet.AfterOpen

Event triggered after the dataset is opened.

Declaration

Source position: db.pas line 1639

public property TDataSet.AfterOpen: TDataSetNotifyEvent
  read FAfterOpen
  write FAfterOpen;

Description

AfterOpen is triggered after the dataset is opened. The dataset has fetched its data and is in dsBrowse state when this event is triggered. If the dataset is not empty, then a TDataset.AfterScroll event will be triggered immediatly after the AfterOpen event. If an exception is raised during the event handler, the dataset remains open, but the AfterScroll event will not be triggered.

See also

TDataset.AfterOpen | Event triggered after the dataset is opened.
TDataset.State | Current operational state of the dataset
TDataset.AfterScroll | Event triggered after the cursor has changed position.


TDataSet.AfterPost

Event called after changes have been posted to the underlying database

Declaration

Source position: db.pas line 1647

public property TDataSet.AfterPost: TDataSetNotifyEvent
  read FAfterPost
  write FAfterPost;

Description

AfterPost is triggered when the TDataset.Post operation was succesfully completed, and the dataset is again in dsBrowse state. If an error occured during the post operation, then the AfterPost event is not called, but the TDataset.OnPostError event is triggered instead.

See also

TDataset.BeforePost | Event called before changes are posted to the underlying database
TDataset.Post | Post pending edits to the database.
TDataset.State | Current operational state of the dataset
TDataset.OnPostError | Event triggered when a post operation fails.


TDataSet.AfterRefresh

Event triggered after the data has been refreshed.

Declaration

Source position: db.pas line 1655

public property TDataSet.AfterRefresh: TDataSetNotifyEvent
  read FAfterRefresh
  write FAfterRefresh;

Description

AfterRefresh is triggered at the end of the TDataset.Refresh method, after the dataset has refreshed its data and is again in dsBrowse state. This event can be used to react on changes in data in the current record

See also

TDataset.Refresh | Refresh the records in the dataset
TDataset.State | Current operational state of the dataset
TDataset.BeforeRefresh | Event triggered before the data is refreshed.


TDataSet.AfterScroll

Event triggered after the cursor has changed position.

Declaration

Source position: db.pas line 1653

public property TDataSet.AfterScroll: TDataSetNotifyEvent
  read FAfterScroll
  write FAfterScroll;

Description

AfterScroll is triggered after the cursor has changed position. This can happen with one of the navigation methods: TDataset.Next, TDataset.Prior, TDataset.First, TDataset.Last, but also with two of the editing operations:TDataset.Insert and TDataset.Delete and after the dataset was opened. It is suitable for displaying status information or showing a value that needs to be calculated for each record.

See also

TDataset.AfterScroll | Event triggered after the cursor has changed position.
TDataset.Next | Go to the next record in the dataset.
TDataset.Prior | Go to the previous record
TDataset.First | Position the dataset on the first record.
TDataset.Last | Navigate forward to the last record
TDataset.Insert | Insert a new record at the current position.
TDataset.Delete | Delete the current record.
TDataset.Open | Activate the dataset: Fetch data into memory.


TDataSet.Append

Append a new record to the data

Declaration

Source position: db.pas line 1565

public procedure TDataSet.Append;

Description

Append appends a new record at the end of the dataset. It is functionally equal to the TDataset.Insert call, but the cursor is positioned at the end of the dataset prior to performing the insert operation. The same events occur as when the Insert call is made.

See also

TDataset.Insert | Insert a new record at the current position.
TDataset.Edit | Set the dataset in editing mode.


TDataSet.AppendRecord

Append a new record to the dataset and fill with data

Declaration

Source position: db.pas line 1566

public procedure TDataSet.AppendRecord(

  const Values: array of Const

);

Arguments

Values

Values for all fields, in correct order

Description

AppendRecord first calls Append to add a new record to the dataset. It then copies the values in Values to the various fields (using TDataset.SetFields) and attempts to post the record using TDataset.Post. If all went well, the result is that the values in Values have been added as a new record to the dataset.

Errors

Various errors may occur (not supplying a value for all required fields, invalid values) and may cause an exception. This may leave the dataset in editing mode.

See also

TDataset.Append | Append a new record to the data
TDataset.SetFields | Set a number of field values at once
TDataset.Post | Post pending edits to the database.


TDataSet.AutoCalcFields

How often should the value of calculated fields be calculated

Declaration

Source position: db.pas line 1637

public property TDataSet.AutoCalcFields: Boolean
  read FAutoCalcFields
  write FAutoCalcFields
  default true;

Description

AutoCalcFields is by default true, meaning that the values of calculated fields will be computed in the following cases:

  • When the dataset is opened
  • When the dataset is put in edit mode
  • When a data field changed

When AutoCalcFields is False, then the calculated fields are called whenever

  • The dataset is opened
  • The dataset is put in edit mode

Both proper calculated fields and lookup fields are computed. Calculated fields are computed through the TDataset.OnCalcFields event.

See also

TField.FieldKind | The kind of field.
TDataset.OnCalcFields | Event triggered when values for calculated fields must be computed.


TDataSet.BeforeCancel

Event triggered before a Cancel operation.

Declaration

Source position: db.pas line 1648

public property TDataSet.BeforeCancel: TDataSetNotifyEvent
  read FBeforeCancel
  write FBeforeCancel;

Description

BeforeCancel is triggered at the start of the TDataset.Cancel operation, when the state is still one of the editing states (dsEdit,dsInsert). The event handler can be used to abort the cancel operation: if an exception is raised during the event handler, then the cancel operation stops. If the dataset was not in one of the editing states when the Cancel method was called, then the event is not triggered.

See also

TDataset.AfterCancel | Event triggered after a Cancel operation.
TDataset.Cancel | Cancel the current editing operation
TDataset.State | Current operational state of the dataset


TDataSet.BeforeClose

Event triggered before the dataset is closed.

Declaration

Source position: db.pas line 1640

public property TDataSet.BeforeClose: TDataSetNotifyEvent
  read FBeforeClose
  write FBeforeClose;

Description

BeforeClose is triggered before the dataset is closed. No actions have been performed yet when this event is called, and the dataset is still in dsBrowse state or one of the editing states. It can be used to prevent closing of the dataset, for instance if there are pending changes not yet committed to the database. If an exception is raised during the event handler, the dataset remains opened.

See also

TDataset.AfterClose | Event triggered after the dataset is closed
TDataset.State | Current operational state of the dataset


TDataSet.BeforeDelete

Event triggered before a Delete operation.

Declaration

Source position: db.pas line 1650

public property TDataSet.BeforeDelete: TDataSetNotifyEvent
  read FBeforeDelete
  write FBeforeDelete;

Description

BeforeDelete is triggered at the start of the TDataset.Delete operation, when the dataset is still in dsBrowse state. The event handler can be used to abort the delete operation: if an exception is raised during the event handler, then the delete operation stops. The event is followed by a TDataset.BeforeScroll event. If the dataset was in insert mode when the Delete method was called, then the event will not be called, as TDataset.Cancel is called instead.

See also

TDataset.AfterDelete |
TDataset.Delete | Delete the current record.
TDataset.BeforeScroll | Event triggered before the cursor changes position.
TDataset.Cancel | Cancel the current editing operation
TDataset.State | Current operational state of the dataset


TDataSet.BeforeEdit

Event triggered before the dataset is put in edit mode.

Declaration

Source position: db.pas line 1644

public property TDataSet.BeforeEdit: TDataSetNotifyEvent
  read FBeforeEdit
  write FBeforeEdit;

Description

BeforeEdit is the triggered at the start of the TDataset.Edit method. The dataset is still in dsBrowse state when this event is triggered. If an exception is raised in the BeforeEdit event handler, then the dataset will remain in dsBrowse state, and the edit operation is cancelled.

See also

TDataset.AfterEdit | Event triggered after the dataset is put in edit mode.
TDataset.Edit | Set the dataset in editing mode.
TDataset.State | Current operational state of the dataset


TDataSet.BeforeInsert

Event triggered before the dataset is put in insert mode.

Declaration

Source position: db.pas line 1642

public property TDataSet.BeforeInsert: TDataSetNotifyEvent
  read FBeforeInsert
  write FBeforeInsert;

Description

BeforeInsert is triggered at the start of the TDataset.Append or TDataset.Insert methods. The dataset is still in dsBrowse state when this event is triggered. If an exception is raised in the BeforeInsert event handler, then the dataset will remain in dsBrowse state, and the append or insert operation is cancelled.

See also

TDataset.AfterInsert | Event triggered after the dataset is put in insert mode.
TDataset.Append | Append a new record to the data
TDataset.Insert | Insert a new record at the current position.


TDataSet.BeforeOpen

Event triggered before the dataset is opened.

Declaration

Source position: db.pas line 1638

public property TDataSet.BeforeOpen: TDataSetNotifyEvent
  read FBeforeOpen
  write FBeforeOpen;

Description

BeforeOpen is triggered before the dataset is opened. No actions have been performed yet when this event is called, and the dataset is still in dsInactive state. It can be used to set parameters and options that influence the opening process. If an exception is raised during the event handler, the dataset remains closed.

See also

TDataset.AfterOpen | Event triggered after the dataset is opened.
TDataset.State | Current operational state of the dataset


TDataSet.BeforePost

Event called before changes are posted to the underlying database

Declaration

Source position: db.pas line 1646

public property TDataSet.BeforePost: TDataSetNotifyEvent
  read FBeforePost
  write FBeforePost;

Description

BeforePost is triggered at the start of the TDataset.Post method, when the datset is still in one of the edit states (dsEdit,dsInsert). If the dataset was not in an edit state when Post is called, the BeforePost event is not triggered. This event can be used to supply values for required fields that have no value yet (the Post operation performs the check on required fields only after this event), or it can be used to abort the post operation: if an exception is raised during the BeforePost operation, the posting operation is cancelled, and the dataset remains in the editing state it was in before the post operation.

See also

TDataset.post | Post pending edits to the database.
TDataset.AfterPost | Event called after changes have been posted to the underlying database
TDataset.State | Current operational state of the dataset


TDataSet.BeforeRefresh

Event triggered before the data is refreshed.

Declaration

Source position: db.pas line 1654

public property TDataSet.BeforeRefresh: TDataSetNotifyEvent
  read FBeforeRefresh
  write FBeforeRefresh;

Description

BeforeRefresh is triggered at the start of the TDataset.Refresh method, after the dataset has been put in browse mode. If the dataset cannot be put in browse mode, the BeforeRefresh method wil not be triggered. If an exception is raised during the BeforeRefresh method, then the refresh method is cancelled and the dataset remains in the dsBrowse state.

See also

TDataset.Refresh | Refresh the records in the dataset
TDataset.AfterRefresh | Event triggered after the data has been refreshed.
TDataset.State | Current operational state of the dataset


TDataSet.BeforeScroll

Event triggered before the cursor changes position.

Declaration

Source position: db.pas line 1652

public property TDataSet.BeforeScroll: TDataSetNotifyEvent
  read FBeforeScroll
  write FBeforeScroll;

Description

BeforeScroll is triggered before the cursor changes position. This can happen with one of the navigation methods: TDataset.Next, TDataset.Prior, TDataset.First, TDataset.Last, but also with two of the editing operations:TDataset.Insert and TDataset.Delete. Raising an exception in this event handler aborts the operation in progress.

See also

TDataset.AfterScroll | Event triggered after the cursor has changed position.
TDataset.Next | Go to the next record in the dataset.
TDataset.Prior | Go to the previous record
TDataset.First | Position the dataset on the first record.
TDataset.Last | Navigate forward to the last record
TDataset.Insert | Insert a new record at the current position.
TDataset.Delete | Delete the current record.


TDataSet.BlockReadSize

Declaration

Source position: db.pas line 1614

public property TDataSet.BlockReadSize: Integer
  read FBlockReadSize
  write SetBlockReadSize;


TDataSet.BOF

Is the cursor at the beginning of the data (on the first record)

Declaration

Source position: db.pas line 1615

public property TDataSet.BOF: Boolean
  read FBOF;

Description

BOF returns True if the first record is the first record in the dataset, False otherwise. It will always be True if the dataset is just opened, or after a call to TDataset.First. As soon as TDataset.Next is called, BOF will no longer be true.

See also

TDataset.EOF | Indicates whether the last record has been reached.
TDataset.Next | Go to the next record in the dataset.
TDataset.First | Position the dataset on the first record.


TDataSet.Bookmark

Get or set the current cursor position

Declaration

Source position: db.pas line 1616

public property TDataSet.Bookmark: TBookmarkStr
  read GetBookmarkStr
  write SetBookmarkStr;

Description

Bookmark can be read to obtain a bookmark to the current position in the dataset. The obtained value can be used to return to current position at a later stage. Writing the Bookmark property with a value previously obtained like this, will reposition the dataset on the same position as it was when the property was read.

This is often used when scanning all records, like this:

Var
  B : TBookmarkStr;

begin
  With MyDataset do
    begin
    B:=Bookmark;
    DisableControls;
    try
      First;
      While Not EOF do
        begin
        DoSomething;
        Next;
        end;
    finally
      EnableControls;
      Bookmark:=B;
    end;
    end;

At the end of this code, the dataset will be positioned on the same record as when the code was started. The TDataset.DisableControls and TDataset.EnableControls calls prevent the controls from receiving update notifications as the dataset scrolls through the records, tus recuding flicker on the screen.

Note that bookmarks become invalid as soon as the dataset closes. A call to refresh may also destroy the bookmarks.

See also

TDataset.DisableControls | Disable event propagation of controls
TDataset.EnableControls | Enable event propagation of controls


TDataSet.BookmarkValid

Test whether ABookMark is a valid bookmark.

Declaration

Source position: db.pas line 1567

public function TDataSet.BookmarkValid(

  ABookmark: TBookmark

):Boolean; virtual;

Arguments

ABookmark

Bookmark pointer to test

Function result

True if ABookmark is a valid bookmark.

Description

BookmarkValid returns True if ABookMark is a valid bookmark for the dataset. Various operations can render a bookmark invalid: changing the sort order, closing and re-opening the dataset. BookmarkValid always returns False in TDataset. Descendent classes must override this method to do an actual test.

Errors

If the bookmark is a completely arbitrary pointer, an exception may be raised.

See also

TDataset.GetBookmark | Get a bookmark pointer (deprecated)
TDataset.SetBookmark
TDataset.FreeBookmark | Free a bookmark obtained with GetBookmark (deprecated)
TDataset.BookmarkAvailable


TDataSet.Cancel

Cancel the current editing operation

Declaration

Source position: db.pas line 1568

public procedure TDataSet.Cancel; virtual;

Description

Cancel cancels the current editing operation and sets the dataset again in browse mode. This operation triggers the TDataset.OnBeforeCancel and TDataset.OnAfterCancel events. If the dataset wa sin insert mode, then the TDataset.OnBeforeScroll and TDataset.OnAfterScroll events are triggered after and respectively before the OnBeforeCancel and OnAfterCancel events.

If the dataset was not in one of the editing modes when Cancel is called, then nothing will happen.

See also

TDataset.State | Current operational state of the dataset
TDataset.Append | Append a new record to the data
TDataset.Insert | Insert a new record at the current position.
TDataset.Edit | Set the dataset in editing mode.


TDataSet.CanModify

Can the data in the dataset be modified

Declaration

Source position: db.pas line 1617

public property TDataSet.CanModify: Boolean
  read GetCanModify;

Description

CanModifiy indicates whether the dataset allows editing. Unidirectional datasets do not allow editing. Descendent datasets can impose additioanl conditions under which the data can not be modified (read-only datasets, for instance). If the CanModify property is False, then the edit, append or insert methods will fail.

See also

TDataset.Insert | Insert a new record at the current position.
TDataset.Append | Append a new record to the data
TDataset.Delete | Delete the current record.
Tdataset.Edit | Set the dataset in editing mode.


TDataSet.CheckBrowseMode

Check whether the dataset is in browse mode.

Declaration

Source position: db.pas line 1569

public procedure TDataSet.CheckBrowseMode;

Description

CheckBrowseMode checks whether the dataset is in browse mode (State=dsBrowse). If it is not, an EDatabaseError exception is raised.

See also

TDataset.State

Current operational state of the dataset


TDataSet.ClearFields

Clear the values of all fields

Declaration

Source position: db.pas line 1570

public procedure TDataSet.ClearFields;

Description

ClearFields clears the values of all fields.

Errors

If the dataset is not in editing mode (State in dsEditmodes), then an EDatabaseError exception will be raised.

See also

TDataset.State | Current operational state of the dataset
TField.Clear | Clear the field contents.


TDataSet.Close

Close the dataset

Declaration

Source position: db.pas line 1571

public procedure TDataSet.Close;

Description

Close closes the dataset if it is open (Active=True). This action triggers the TDataset.OnBeforeClose and TDataset.OnAfterClose events. If the dataset is not active, nothing happens.

Errors

If an exception occurs during the closing of the dataset, the OnAfterClose event will not be triggered.

See also

TDataset.Active | Is the dataset open or closed.
TDataset.Open | Activate the dataset: Fetch data into memory.


TDataSet.CompareBookmarks

Compare two bookmarks

Declaration

Source position: db.pas line 1573

public function TDataSet.CompareBookmarks(

  Bookmark1: TBookmark;

  Bookmark2: TBookmark

):LongInt; virtual;

Arguments

Bookmark1 | First bookmark
Bookmark2 | Second bookmark.

Function result

result of the compare operation

Description

CompareBookmarks can be used to compare the relative positions of 2 bookmarks. It returns a negative value if Bookmark1 is located before Bookmark2, zero if they refer to the same record, and a positive value if the second bookmark appears before the first bookmark. This function mustbe overridden by descendent classes of TDataset. The implementation in TDataset always returns zero.

Errors

No checks are performed on the validity of the bookmarks.

See also

TDataset.BookmarkValid | Test whether ABookMark is a valid bookmark.
TDataset.GetBookmark | Get a bookmark pointer (deprecated)
TDataset.SetBookmark


TDataSet.ControlsDisabled

Check whether the controls are disabled

Declaration

Source position: db.pas line 1572

public function TDataSet.ControlsDisabled: Boolean;

Function result

True if no events are sent to the controls

Description

ControlsDisabled returns True if the controls are disabled, i.e. no events are propagated to the controls connected to this dataset. The TDataset.DisableControls call can be used to disable sending of data events to the controls. The sending can be re-enabled with TDataset.EnableControls. This mechanism has a counting mechanism: in order to enable sending of events to the controls, EnableControls must be called as much as DisableControls was called. The ControlsDisabled function will return true as long as the internal counter is not zero.

See also

TDataset.DisableControls | Disable event propagation of controls
TDataset.EnableControls | Enable event propagation of controls


TDataSet.Create

Create a new TDataset instance

Declaration

Source position: db.pas line 1558

public constructor TDataSet.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the new dataset instance.

Description

Create initializes a new TDataset instance. It calls the inherited constructor, and then initializes the internal structures needed to manage the dataset (fielddefs, fieldlist, constraints etc.).

See also

TDataset.Destroy

Free a TDataset instance


TDataSet.CreateBlobStream

Create blob stream

Declaration

Source position: db.pas line 1574

public function TDataSet.CreateBlobStream(

  Field: TField;

  Mode: TBlobStreamMode

):TStream; virtual;

Arguments

Field | BLOB Field for which data should be fetched/written
Mode | Mode: read or write

Function result

Stream with (for) blob data

Description

CreateBlobStream is not intended for use by applictaion programmers. It creates a stream object which can be used to read or write data from a blob field. Instead, application programmers should use the TBlobField.LoadFromStream and TBlobField.SaveToStream methods when reading and writing data from/to BLOB fields. Which operation must be performed on the stream is indicated in the Mode parameter, and the Field parameter contains the field whose data should be read. The caller is responsible for freeing the stream created by this function.

See also

TBlobField.LoadFromStream | Load the field's contents from stream
TBlobField.SaveToStream | Save the field's contents to stream


TDataSet.CursorPosChanged

Indicate a change in cursor position

Declaration

Source position: db.pas line 1575

public procedure TDataSet.CursorPosChanged;

Description

CursorPosChanged is not intended for internal use only, and serves to indicate that the current cursor position has changed. (it clears the internal cursor position).


TDataSet.DataConvert

Convert data from/to native format

Declaration

Source position: db.pas line 1576

public procedure TDataSet.DataConvert(

  aField: TField;

  aSource: Pointer;

  aDest: Pointer;

  aToNative: Boolean

); virtual;

Arguments

aField | Field for which data should be converted.
aSource | Pointer to memory area with source data
aDest | Pointer to memory area for target data
aToNative | True if the conversion should happen to native format.

Description

DataConvert converts the data from field AField in buffer ASource to native format and puts the result in ADest. If the aToNative parameter equals False, then the data is converted from native format to non-native format. Currently, only date/time/datetime and BCD fields are converted from/to native data. This means the routine handles conversion between TDateTime (the native format) and TDateTimeRec, and between TBCD and currency (the native format) for BCD fields.

DataConvert is used internally by TDataset and descendent classes. There should be no need to use this routine in application code.

Errors

No checking on the validity of the buffer pointers is performed. If an invalid pointer is passed, an exception may be raised.

See also

TDataset.GetFieldData | Get the data for a field
TDataset.SetFieldData | Store the data for a field


TDataSet.DataSource

Datasource this dataset is connected to.

Declaration

Source position: db.pas line 1618

public property TDataSet.DataSource: TDatasource
  read GetDataSource;

Description

Datasource is the datasource this dataset is connected to, and from which it can get values for parameters. In TDataset, the Datasource property is not used, and is always Nil. It is up to descendent classes that actually support a datasource to implement getter and setter routines for the Datasource property.

See also

TDatasource

Component representing the link between a local (GUI) component and a dataset


TDataSet.DefaultFields

Is the dataset using persisten fields or not.

Declaration

Source position: db.pas line 1619

public property TDataSet.DefaultFields: Boolean
  read FDefaultFields;

Description

DefaultFields is True if the fields were generated dynamically when the dataset was opened. If it is False then the field instances are persistent, i;e. they were created at desin time with the fields editor. If DefaultFields is True, then for each item in the TDataset.FieldDefs property, a field instance is created. These fields instances are freed again when the dataset is closed.

If DefaultFields is False, then there may be less field instances than there are items in the FieldDefs property. This can be the case for instance when opening a DBF file at runtime which has more fields than the file used at design time.

See also

TDataset.FieldDefs | Definitions of available fields in the underlying database
TDataset.Fields | Indexed access to the fields of the dataset.
TField | Provide access to the contents of a single field in a record


TDataSet.Delete

Delete the current record.

Declaration

Source position: db.pas line 1577

public procedure TDataSet.Delete;

Description

Delete will delete the current record. This action will trigger the TDataset.BeforeDelete, TDataset.BeforeScroll, TDataset.AfterDelete and TDataset.AfterScroll events. If the dataset was in edit mode, the edits will be canceled before the delete operation starts.

Errors

If the dataset is empty or read-only, then an EDatabaseError exception will be raised.

See also

TDataset.Cancel | Cancel the current editing operation
TDataset.BeforeDelete | Event triggered before a Delete operation.
TDataset.BeforeScroll | Event triggered before the cursor changes position.
TDataset.AfterDelete |
TDataset.AfterScroll | Event triggered after the cursor has changed position.


TDataSet.Destroy

Free a TDataset instance

Declaration

Source position: db.pas line 1559

public destructor TDataSet.Destroy; override;

Description

Destroy removes a TDataset instance from memory. It closes the dataset if it was open, clears all internal sructures and then calls he inherited destructor.

Errors

An exception may occur during the close operation, in that case, the dataset will not be removed from memory.

See also

TDataset.Close | Close the dataset
TDataset.Create | Create a new TDataset instance


TDataSet.DisableControls

Disable event propagation of controls

Declaration

Source position: db.pas line 1578

public procedure TDataSet.DisableControls;

Description

DisableControls tells the dataset to stop sending data-related events to the controls. This can be used before starting operations that will cause the current record to change a lot, or before any other lengthy operation that may cause a lot of events to be sent to the controls that show data from the dataset: each event will cause the control to update itself, which is a time-consuming operation that may also cause a lot of flicker on the screen.

The sending of events to the controls can be re-enabled with Tdataset.EnableControls. Note that for each call to DisableControls, a matching call to EnableControls must be made: an internal count is kept and only when the count reaches zero, the controls are again notified of changes to the dataset. It is therefore essential that the call to EnableControls is put in a Finally block:

MyDataset.DisableControls;
Try
  // Do some intensive stuff
Finally
  MyDataset.EnableControls
end;

Errors

Failure to call enablecontrols will prevent the controls from receiving updates. The state can be checked with TDataset.ControlsDisabled.

See also

TDataset.EnableControls | Enable event propagation of controls
TDataset.ControlsDisabled | Check whether the controls are disabled


TDataSet.Edit

Set the dataset in editing mode.

Declaration

Source position: db.pas line 1579

public procedure TDataSet.Edit;

Description

Edit will set the dataset in edit mode: the contents of the current record can then be changed. This action will call the TDataset.BeforeEdit and TDataset.AfterEdit events. If the dataset was already in insert or edit mode, nothing will happen (the events will also not be triggered). If the dataset is empty, this action will execute TDataset.Append instead.

Errors

If the dataset is read-only or not opened, then an EDatabaseError exception will be raised.

See also

TDataset.State | Current operational state of the dataset
TDataset.EOF | Indicates whether the last record has been reached.
TDataset.BOF | Is the cursor at the beginning of the data (on the first record)
TDataset.Append | Append a new record to the data
TDataset.BeforeEdit | Event triggered before the dataset is put in edit mode.
TDataset.AfterEdit | Event triggered after the dataset is put in edit mode.


TDataSet.EnableControls

Enable event propagation of controls

Declaration

Source position: db.pas line 1580

public procedure TDataSet.EnableControls;

Description

EnableControls tells the dataset to resume sending data-related events to the controls. This must be used after a call to TDataset.DisableControls to re-enable updating of controls.

Note that for each call to DisableControls, a matching call to EnableControls must be made: an internal count is kept and only when the count reaches zero, the controls are again notified of changes to the dataset. It is therefore essential that the call to EnableControls is put in a Finally block:

MyDataset.DisableControls;
Try
  // Do some intensive stuff
Finally
  MyDataset.EnableControls
end;

Errors

Failure to call enablecontrols will prevent the controls from receiving updates. The state can be checked with TDataset.ControlsDisabled.

See also

TDataset.DisableControls | Disable event propagation of controls
TDataset.ControlsDisabled | Check whether the controls are disabled


TDataSet.EOF

Indicates whether the last record has been reached.

Declaration

Source position: db.pas line 1620

public property TDataSet.EOF: Boolean
  read FEOF;

Description

EOF is True if the cursor is on the last record in the dataset, and no more records are available. It is also True for an empty dataset. The EOF property will be set to True in the following cases:

  1. The TDataset.Last method is called.
  2. The record is on the last record, and the TDataset.Next method is called.
  3. The dataset is empty when opened

In all other cases, EOF is False. Note that when the cursor is on the last-but-one record, and Next is called, EOF will not yet be True. It is only when the cursor is on the last record and Next is called, that EOF will become True. This means that the following loop will stop after the last record was visited:

With MyDataset do
  While not EOF do
    begin
    DoSomething;
    Next;
    end;

See also

TDataset.BOF | Is the cursor at the beginning of the data (on the first record)
TDataset.Next | Go to the next record in the dataset.
TDataset.Last | Navigate forward to the last record
TDataset.IsEmpty | Check if the dataset contains no data


TDataSet.FieldByName

Search a field by name

Declaration

Source position: db.pas line 1581

public function TDataSet.FieldByName(

  const FieldName:

):TField;

Arguments

FieldName

Fieldname to look for.

Function result

Field instance matching FieldName

Description

FieldByName is a shortcut for Fields.FieldByName: it searches for the field with fieldname equalling FieldName. The case is performed case-insensitive. The matching field instance is returned.

Errors

If the field is not found, an EDatabaseError exception will be raised.

See also

TFields.FieldByname | Find a field based on its name
TDataset.FindField | Find a field by name


TDataSet.FieldCount

Number of fields

Declaration

Source position: db.pas line 1621

public property TDataSet.FieldCount: LongInt
  read GetFieldCount;

Description

FieldCount is the same as Fields.Count, i.e. the number of fields. For a dataset with persistent fields (when DefaultFields is False) then this number will be always the same every time the dataset is opened. For a dataset with dynamically created fields, the number of fields may be different each time the dataset is opened.

See also

TFields

Collection of #fcl.db.TField instances


TDataSet.FieldDefs

Definitions of available fields in the underlying database

Declaration

Source position: db.pas line 1622

public property TDataSet.FieldDefs: TFieldDefs
  read FFieldDefs
  write SetFieldDefs;

Description

FieldDefs is filled by the TDataset descendent when the dataset is opened. It represents the fields as they are returned by the particular database when the data is initially fetched from the engine. If the dataset uses dynamically created fields (when DefaultFields is True), then for each item in this list, a field i nstance will be created with default properties available in the field definition. If the dataset uses persistent fields, then the fields in the field list will be checked against the items in the FieldDefs property. If no matching item is found for a persistent field, then an exception will be raised. Items that exist in the fielddefs property but for which there is no matching field instance, are ignored.

See also

TDataset.Open | Activate the dataset: Fetch data into memory.
TDataset.DefaultFields | Is the dataset using persisten fields or not.
TDataset.Fields | Indexed access to the fields of the dataset.


TDataSet.Fields

Indexed access to the fields of the dataset.

Declaration

Source position: db.pas line 1631

public property TDataSet.Fields: Tfields
  read FFieldList;

Description

Fields provides access to the fields of the dataset. It is of type TFields and therefore gives indexed access to the fields, but also allows other operations such as searching for fields based on their names or getting a list of fieldnames.

See also

TFieldDefs | Collection of TFieldDef instances.
TField | Provide access to the contents of a single field in a record


TDataSet.FieldValues

Acces to field values based on the field names.

Declaration

Source position: db.pas line 1632

public property TDataSet.FieldValues: Variant
  read GetFieldValues
  write SetFieldValues;
  default;

Description

FieldValues provides array-like access to the values of the fields, based on the names of the fields. The value is read or written as a variant type. It is equivalent to the following:

FieldByName(FieldName).AsVariant

It can be read as well as written.

See also

TFields.FieldByName

Find a field based on its name


TDataSet.Filter

Filter to apply to the data in memory.

Declaration

Source position: db.pas line 1633

public property TDataSet.Filter:
  read FFilterText
  write SetFilterText;

Description

Filter is not implemented by TDataset. It is up to descendent classes to implement actual filtering: the filtering happens on in-memory data, and is not applied on the database level. (in particular: setting the filter property will in no way influence the WHERE clause of an SQL-based dataset).

In general, the filter property accepts a SQL-like syntax usually encountered in the WHERE clause of an SQL SELECT statement.

The filter is only applied if the Filtered property is set to True. If the Filtered property is False, the Filter property is ignored.

See also

TDataset.Filtered | Is the filter active or not.
TDataset.FilterOptions | Options to apply when filtering


TDataSet.Filtered

Is the filter active or not.

Declaration

Source position: db.pas line 1634

public property TDataSet.Filtered: Boolean
  read FFiltered
  write SetFiltered
  default false;

Description

Filtered determines whether the filter condition in TDataset.Filter is applied or not. The filter is only applied if the Filtered property is set to True. If the Filtered property is False, the Filter property is ignored.

See also

TDataset.Filter | Filter to apply to the data in memory.
TDataset.FilterOptions | Options to apply when filtering


TDataSet.FilterOptions

Options to apply when filtering

Declaration

Source position: db.pas line 1635

public property TDataSet.FilterOptions: TFilterOptions
  read FFilterOptions
  write SetFilterOptions;

Description

FilterOptions determines what options should be taken into account when applying the filter in TDataset.Filter, such as case-sensitivity or whether to treat an asterisk as a wildcard: By default, an asterisk (*) at the end of a literal string in the filter expression is treated as a wildcard. When FilterOptions does not include foNoPartialCompare, strings that have an asterisk at the end, indicate a partial string match. In that case, the asterisk matches any number of characters. If foNoPartialCompare is included in the options, the asterisk is regarded as a regular character.

See also

TDataset.Filter | Filter to apply to the data in memory.
TDataset.FilterOptions | Options to apply when filtering


TDataSet.FindField

Find a field by name

Declaration

Source position: db.pas line 1582

public function TDataSet.FindField(

  const FieldName:

):TField;

Arguments

FieldName

Fieldname to look for.

Function result

Field instance matching FieldName

Description

FindField is a shortcut for Fields.FindField: it searches for the field with fieldname equalling FieldName. The case is performed case-insensitive. The matching field instance is returned, and if no match is found, Nil is returned.

See also

TDataset.FieldByname | Search a field by name
TFields.FindField | Find a field based on its name


TDataSet.FindFirst

Find the first active record (deprecated)

Declaration

Source position: db.pas line 1583

public function TDataSet.FindFirst: Boolean;

Function result

True if the cursor position was changed.

Description

FindFirst positions the cursor on the first record (taking into account filtering), and returns True if the cursor position was changed. This method must be implemented by descendents of TDataset: The implementation in TDataset always returns False, indicating that the position was not changed.

This method is deprecated, use TDataset.First instead.

See also

TDataset.First | Position the dataset on the first record.
TDataset.FindLast | Find the last active record (deprecated)
TDataset.FindNext | Find the next active record (deprecated)
TDataset.FindPrior | Find the previous active record (deprecated)


TDataSet.FindLast

Find the last active record (deprecated)

Declaration

Source position: db.pas line 1584

public function TDataSet.FindLast: Boolean;

Function result

True if the cursor position was changed.

Description

FindLast positions the cursor on the last record (taking into account filtering), and returns True if the cursor position was changed. This method must be implemented by descendents of TDataset: The implementation in TDataset always returns False, indicating that the position was not changed.

This method is deprecated, use TDataset.Last instead.

See also

TDataset.Last | Navigate forward to the last record
TDataset.FindFirst | Find the first active record (deprecated)
TDataset.FindNext | Find the next active record (deprecated)
TDataset.FindPrior | Find the previous active record (deprecated)


TDataSet.FindNext

Find the next active record (deprecated)

Declaration

Source position: db.pas line 1585

public function TDataSet.FindNext: Boolean;

Function result

True if the cursor position was changed.

Description

FindLast positions the cursor on the next record (taking into account filtering), and returns True if the cursor position was changed. This method must be implemented by descendents of TDataset: The implementation in TDataset always returns False, indicating that the position was not changed.

This method is deprecated, use TDataset.Next instead.

See also

TDataset.Next | Go to the next record in the dataset.
TDataset.FindFirst | Find the first active record (deprecated)
TDataset.FindLast | Find the last active record (deprecated)
TDataset.FindPrior | Find the previous active record (deprecated)


TDataSet.FindPrior

Find the previous active record (deprecated)

Declaration

Source position: db.pas line 1586

public function TDataSet.FindPrior: Boolean;

Function result

True if the cursor position was changed.

Description

FindPrior positions the cursor on the previous record (taking into account filtering), and returns True if the cursor position was changed. This method must be implemented by descendents of TDataset: The implementation in TDataset always returns False, indicating that the position was not changed.

This method is deprecated, use TDataset.Prior instead.

See also

TDataset.Prior | Go to the previous record
TDataset.FindFirst | Find the first active record (deprecated)
TDataset.FindLast | Find the last active record (deprecated)
TDataset.FindPrior | Find the previous active record (deprecated)


TDataSet.First

Position the dataset on the first record.

Declaration

Source position: db.pas line 1587

public procedure TDataSet.First;

Description

First positions the dataset on the first record. This action will trigger the TDataset.BeforeScroll and TDataset.AfterScroll events. After the action is completed, the TDataset.BOF property will be True.

Errors

If the dataset is unidirectional or is closed, an EDatabaseError exception will be raised.

See also

TDataset.Prior | Go to the previous record
TDataset.Last | Navigate forward to the last record
TDataset.Next | Go to the next record in the dataset.
TDataset.BOF | Is the cursor at the beginning of the data (on the first record)
TDataset.BeforeScroll | Event triggered before the cursor changes position.
TDataset.AfterScroll | Event triggered after the cursor has changed position.


TDataSet.Found

Check success of one of the Find methods

Declaration

Source position: db.pas line 1624

public property TDataSet.Found: Boolean
  read FFound;

Description

Found is True if the last of one of the TDataset.FindFirst,TDataset.FindLast,TDataset.FindNext or TDataset.FindPrior operations was succesful.

See also

TDataset.FindFirst | Find the first active record (deprecated)
TDataset.FindLast | Find the last active record (deprecated)
TDataset.FindNext | Find the next active record (deprecated)
TDataset.FindPrior | Find the previous active record (deprecated)


TDataSet.FreeBookmark

Free a bookmark obtained with GetBookmark (deprecated)

Declaration

Source position: db.pas line 1588

public procedure TDataSet.FreeBookmark(

  ABookmark: TBookmark

); virtual;

Arguments

ABookmark

Bookmark to free.

Description

FreeBookmark must be used to free a bookmark obtained by TDataset.GetBookmark. It should not be used on bookmarks obtained with the TDataset.Bookmark property. Both GetBookmark and FreeBookmark are deprecated. Use the Bookmark property instead: it uses a string type, which is automatically disposed of when the string variable goes out of scope.

See also

TDataset.GetBookmark | Get a bookmark pointer (deprecated)
TDataset.Bookmark | Get or set the current cursor position


TDataSet.GetBookmark

Get a bookmark pointer (deprecated)

Declaration

Source position: db.pas line 1589

public function TDataSet.GetBookmark: TBookmark; virtual;

Function result

Bookmark for curren location or Nil

Description

GetBookmark gets a bookmark pointer to the current cursor location. The TDataset.SetBookmark call can be used to return to the current record in the dataset. After use, the bookmark must be disposed of with the TDataset.FreeBookmark call. The bookmark will be Nil if the dataset is empty or not active.

This call is deprecated. Use the TDataset.Bookmark property instead to get a bookmark.

See also

TDataset.SetBookmark
TDataset.FreeBookmark | Free a bookmark obtained with GetBookmark (deprecated)
TDataset.Bookmark | Get or set the current cursor position


TDataSet.GetCurrentRecord

Copy the data for the current record in a memory buffer

Declaration

Source position: db.pas line 1590

public function TDataSet.GetCurrentRecord(

  Buffer: TRecordBuffer

):Boolean; virtual;

Arguments

Buffer

Buffer to which record data must be copied.

Function result

True if the data for the current record has been copied succesfully.

Description

GetCurrentRecord can be overridden by TDataset descendents to copy the data for the current record to Buffer. Buffermust point to a memory area, large enough to contain the data for the record. If the data is copied succesfully to the buffer, the function returns True. The TDataset implementation is empty, and returns False.

See also

TDataset.ActiveBuffer

Currently active memory buffer


TDataSet.GetFieldData

Get the data for a field

Declaration

Source position: line 0

function TDataSet.GetFieldData(

  Field: TField;

  Buffer: Pointer

):Boolean; virtual; overload;

function TDataSet.GetFieldData(

  Field: TField;

  Buffer: Pointer;

  NativeFormat: Boolean

):Boolean; virtual; overload;

Arguments

Field | Field for which the data should be fetched
Buffer | Buffer in which the data should be copied

Function result

True if data was available, false if no data was available.

Arguments

Field | Field for which the data should be fetched
Buffer | Buffer in which the data should be copied
NativeFormat | Should the data be in native format

Description

GetFieldData should copy the data for field Field from the internal dataset memory buffer into the memory pointed to by Buffer. This function is not intended for use by end-user applications, and should be used only in descendent classes, where it can be overridden. The function should return True if data was available and has been copied, or False if no data was available (in which case the field has value Null). The NativeFormat determines whether the data should be in native format (e.g. whether the date/time values should be in TDateTime format).

Errors

No checks are performed on the validity of the memory buffer

See also

TField.DisplayText

Formatted field value


TDataSet.GetFieldList

Return field instances in a list

Declaration

Source position: db.pas line 1591

public procedure TDataSet.GetFieldList(

  List: TList;

  const FieldNames:

);

Arguments

List | List in whihc to return field instances
FieldNames | Semicolon-separated list of fieldnames

Description

GetfieldList parses FieldNames for names of fields, and returns the field instances that match the names in list. FieldNames must be a list of field names, separated by semicolons. The list is cleared prior to filling with the requested field instances.

Errors

If FieldNames contains a name of a field that does not exist in the dataset, then an EDatabaseError exception will be raised.

See also

TDataset.GetFieldNames | Return a list of all available field names
TDataset.FieldByName | Search a field by name
TDataset.FindField | Find a field by name


TDataSet.GetFieldNames

Return a list of all available field names

Declaration

Source position: db.pas line 1592

public procedure TDataSet.GetFieldNames(

  List: TStrings

);

Arguments

List

List in which to return field names

Description

GetFieldNames returns in List the names of all available fields, one field per item in the list. The dataset must be open for this function to work correctly.

See also

TDataset.GetFieldNameList
TDataset.FieldByName | Search a field by name
TDataset.FindField | Find a field by name


TDataSet.GotoBookmark

Jump to bookmark

Declaration

Source position: db.pas line 1593

public procedure TDataSet.GotoBookmark(

  ABookmark: TBookmark

);

Arguments

ABookmark

Bookmark to position the dataset on

Description

GotoBookmark positions the dataset to the bookmark position indicated by ABookMark. ABookmark is a bookmark obtained by the TDataset.GetBookmark function.

This function is deprecated, use the TDataset.Bookmark property instead.

Errors

if ABookmark does not contain a valid bookmark, then an exception may be raised.

See also

TDataset.Bookmark | Get or set the current cursor position
TDataset.GetBookmark | Get a bookmark pointer (deprecated)
TDataset.FreeBookmark | Free a bookmark obtained with GetBookmark (deprecated)


TDataSet.Insert

Insert a new record at the current position.

Declaration

Source position: db.pas line 1594

public procedure TDataSet.Insert;

Description

Insert will insert a new record at the current position. When this function is called, any pending modifications (when the dataset already is in insert or edit mode) will be posted. After that, the BeforeInsert, BeforeScroll, OnNewRecord, AfterInsert and AfterScroll events are triggered in the order indicated here. The dataset is in the dsInsert state after this method is called, and the contents of the various fields can be set. To write the new record to the underlying database TDataset.Post must be called.

Errors

If the dataset is read-only, calling Insert will result in an EDatabaseError.

See also

BeforeInsert | Event triggered before the dataset is put in insert mode.
BeforeScroll | Event triggered before the cursor changes position.
OnNewRecord | Event triggered when a new record is created.
AfterInsert | Event triggered after the dataset is put in insert mode.
AfterScroll | Event triggered after the cursor has changed position.
TDataset.Post | Post pending edits to the database.
TDataset.Append | Append a new record to the data


TDataSet.InsertRecord

Insert a new record with given values.

Declaration

Source position: db.pas line 1595

public procedure TDataSet.InsertRecord(

  const Values: array of Const

);

Arguments

Values

Values to apply

Description

InsertRecord is not yet implemented in Free Pascal. It does nothing.

See also

TDataset.Insert

Insert a new record at the current position.

TDataset.SetFieldValues


TDataSet.IsEmpty

Check if the dataset contains no data

Declaration

Source position: db.pas line 1596

public function TDataSet.IsEmpty: Boolean;

Function result

True if the dataset has no data available.

Description

IsEmpty returns True if the dataset is empty, i.e. if EOF and TDataset.BOF are both True, and the dataset is not in insert mode.

See also

TDataset.EOF | Indicates whether the last record has been reached.
TDataset.BOF | Is the cursor at the beginning of the data (on the first record)
TDataset.State | Current operational state of the dataset


TDataSet.IsLinkedTo

Check whether a datasource is linked to the dataset

Declaration

Source position: db.pas line 1597

public function TDataSet.IsLinkedTo(

  ADataSource: TDatasource

):Boolean;

Arguments

ADataSource

TDatasource instance to check.

Function result

True if ADatasource is linked to the dataset.

Description

IsLinkedTo returns True if ADatasource is linked to this dataset, either directly (the ADatasource.Dataset" points to the current dataset instance, or indirectly.

See also

TDatasource.Dataset

Dataset this datasource is connected to


TDataSet.IsSequenced

Is the data sequenced

Declaration

Source position: db.pas line 1598

public function TDataSet.IsSequenced: Boolean; virtual;

Function result

True if RecNo can be used for navigation.

Description

IsSequenced indicates whether it is safe to use the TDataset.RecNo property to navigate in the records of the data. By default, this property is set to True, but TDataset descendents may set this property to False (for instance, unidirectional datasets), in which case RecNo should not be used to navigate through the data.

See also

TDataset.RecNo

Current record number


TDataSet.IsUniDirectional

Is the dataset unidirectional (i.e. forward scrolling only)

Declaration

Source position: db.pas line 1626

public property TDataSet.IsUniDirectional: Boolean
  read FIsUniDirectional
  default false;

Description

IsUniDirectional is True if the dataset is unidirectional. By default it is False, i.e. scrolling backwards is allowed. If the dataset is unidirectional, then any attempt to scroll backwards (using one of TDataset.Prior or TDataset.Next), random positioning of the cursor, editing or filtering will result in an EDatabaseError. Unidirectional datasets are also not suitable for display in a grid, as they have only 1 record in memory at any given time: they are only useful for performing an action on all records:

With MyDataset do
  While not EOF do
    begin
    DoSomething;
    Next;
    end;

See also

TDataset.Prior | Go to the previous record
TDataset.Next | Go to the next record in the dataset.


TDataSet.Last

Navigate forward to the last record

Declaration

Source position: db.pas line 1599

public procedure TDataSet.Last;

Description

Last puts the cursor at the last record in the dataset, fetching more records from the underlying database if needed. After a call to Last, the TDataset.EOF property will be True. Calling this method will trigger the TDataset.BeforeScroll and TDataset.AfterScroll events.

See also

TDataset.First | Position the dataset on the first record.
TDataset.Next | Go to the next record in the dataset.
TDataset.EOF | Indicates whether the last record has been reached.
TDataset.BeforeScroll | Event triggered before the cursor changes position.
TDataset.AfterScroll | Event triggered after the cursor has changed position.


TDataSet.Locate

Locate a record based on some key values

Declaration

Source position: db.pas line 1600

public function TDataSet.Locate(

  const keyfields: ;

  const keyvalues: Variant;

  options: TLocateOptions

):Boolean; virtual;

Arguments

keyfields | List of fields, separated by semicolons
keyvalues | Single value or array of values.
options | Options to take into account when searching for the record.

Function result

True if a record matching KeyValues is found.

Description

Locate attempts to locate a record in the dataset. There are 2 possible cases when using Locate.

  1. Keyvalues is a single value. In that case, KeyFields is the name of the field whose value must be matched to the value in KeyValues
  2. Keyvalues is a variant array. In that case, KeyFields must contain a list of names of fields (separated by semicolons) whose values must be matched to the values in the KeyValues array

The matching always happens according to the Options parameter. For a description of the possible values, see TLocateOption.

If a record is found that matches the criteria, then the locate operation positions the cursor on this record, and returns True. If no record is found to match the criteria, False is returned, and the position of the cursor is unchanged.

The implementation in TDataset always returns False. It is up to TDataset descendents to implement this method and return an appropriate value.

See also

TDataset.Find
TDataset.Lookup | Search for a record and return matching values.
TLocateOption | Available options when locating a record in a dataset


TDataSet.Lookup

Search for a record and return matching values.

Declaration

Source position: db.pas line 1601

public function TDataSet.Lookup(

  const KeyFields: ;

  const KeyValues: Variant;

  const ResultFields:

):Variant; virtual;

Arguments

KeyFields | Semicolon-separated list of fieldnames to locate record.
KeyValues | Values for keyfields to locate record with.
ResultFields | Semicolon-separated list of fieldnames whose values must be returned.

Function result

Value(s) of ResultFields.

Description

Lookup always returns False in TDataset. Descendents of TDataset can override this method to call TDataset.Locate to locate the record with fields KeyFields matching KeyValues and then to return the values of the fields in ResultFields. If ResultFields contains more than one fieldname (separated by semicolons), then the function returns an array. If there is only 1 fieldname, the value is returned directly.

Errors

If the dataset is unidirectional, then a EDatabaseError exception will be raised.

See also

TDataset.Locate

Locate a record based on some key values


TDataSet.Modified

Was the current record modified ?

Declaration

Source position: db.pas line 1625

public property TDataSet.Modified: Boolean
  read FModified;

Description

Modified is True if the current record was modified after a call to Tdataset.Edit or Tdataset.Insert. It becomes True if a value was written to one of the fields of the dataset.

See also

Tdataset.Edit | Set the dataset in editing mode.
TDataset.Insert | Insert a new record at the current position.
TDataset.Append | Append a new record to the data
TDataset.Cancel | Cancel the current editing operation
TDataset.Post | Post pending edits to the database.


TDataSet.MoveBy

Move the cursor position

Declaration

Source position: db.pas line 1602

public function TDataSet.MoveBy(

  Distance: LongInt

):LongInt;

Arguments

Distance

Number of positions the cursor should be moved

Function result

Number of positions the cursor actually moved

Description

MoveBy moves the current record pointer with Distance positions. Distance may be a positive number, in which case the cursor is moved forward, or a negative number, in which case the cursor is moved backward. The move operation will stop as soon as the beginning or end of the data is reached. The TDataset.BeforeScroll and TDataset.AfterScroll events are triggered (once) when this method is called. The function returns the distance which was actually moved by the cursor.

Errors

A negative distance will result in an EDatabaseError exception on unidirectional datasets.

See also

TDataset.RecNo | Current record number
TDataset.BeforeScroll | Event triggered before the cursor changes position.
TDataset.AfterScroll | Event triggered after the cursor has changed position.


TDataSet.Next

Go to the next record in the dataset.

Declaration

Source position: db.pas line 1603

public procedure TDataSet.Next;

Description

Next positions the cursor on the next record in the dataset. It is equivalent to a MoveBy(1) operation. Calling this method triggers the TDataset.BeforeScroll and TDataset.AfterScroll events. If the dataset is located on the last known record (EOF is true), then no action is performed, and the events are not triggered.

Errors

Calling this method on a closed dataset will result in an EDatabaseError exception.

See also

TDataset.MoveBy | Move the cursor position
TDataset.Prior | Go to the previous record
TDataset.Last | Navigate forward to the last record
TDataset.BeforeScroll | Event triggered before the cursor changes position.
TDataset.AfterScroll | Event triggered after the cursor has changed position.
TDataset.EOF | Indicates whether the last record has been reached.


TDataSet.OnCalcFields

Event triggered when values for calculated fields must be computed.

Declaration

Source position: db.pas line 1656

public property TDataSet.OnCalcFields: TDataSetNotifyEvent
  read FOnCalcFields
  write FOnCalcFields;

Description

OnCalcFields is triggered whenever the dataset needs to (re)compute the values of any calculated fields in the dataset. It is called very often, so this event should return as quickly as possible. Only the values of the calculated fields should be set, no methods of the dataset that change the data or cursor position may be called during the execution of this event handler. The frequency with which this event is called can be controlled through the TDataset.AutoCalcFields property. Note that the value of lookup fields does not need to be calculated in this event, their value is computed automatically before this event is triggered.

See also

TDataset.AutoCalcFields

How often should the value of calculated fields be calculated

TField.Kind


TDataSet.OnDeleteError

Event triggered when a delete operation fails.

Declaration

Source position: db.pas line 1657

public property TDataSet.OnDeleteError: TDataSetErrorEvent
  read FOnDeleteError
  write FOnDeleteError;

Description

OnDeleteError is triggered when the TDataset.Delete method fails to delete the record in the underlying database. The event handler can be used to indicate what the response to the failed delete should be. To this end, it gets the exception object passed to it (parameter E), and it can examine this object to return an appropriate action in the DataAction parameter. The following responses are supported:

daFail
The operation should fail (an exception will be raised)
daAbort
The operation should be aborted (edits are undone, and an EAbort exception is raised)
daRetry
Retry the operation.

For more information, see also the description of the TDatasetErrorEvent event handler type.

See also

TDatasetErrorEvent | Error handling callback
TDataset.Delete | Delete the current record.
TDataset.OnEditError | Event triggered when an edit operation fails.
TDataset.OnPostError | Event triggered when a post operation fails.


TDataSet.OnEditError

Event triggered when an edit operation fails.

Declaration

Source position: db.pas line 1658

public property TDataSet.OnEditError: TDataSetErrorEvent
  read FOnEditError
  write FOnEditError;

Description

OnEditError is triggered when the TDataset.Edit method fails to put the dataset in edit mode because the underlying database engine reported an error. The event handler can be used to indicate what the response to the failed edit operation should be. To this end, it gets the exception object passed to it (parameter E), and it can examine this object to return an appropriate action in the DataAction parameter. The following responses are supported:

daFail
The operation should fail (an exception will be raised)
daAbort
The operation should be aborted (edits are undone, and an EAbort exception is raised)
daRetry
Retry the operation.

For more information, see also the description of the TDatasetErrorEvent event handler type.

See also

TDatasetErrorEvent | Error handling callback
TDataset.Edit | Set the dataset in editing mode.
TDataset.OnDeleteError | Event triggered when a delete operation fails.
TDataset.OnPostError | Event triggered when a post operation fails.


TDataSet.OnFilterRecord

Event triggered to filter records.

Declaration

Source position: db.pas line 1659

public property TDataSet.OnFilterRecord: TFilterRecordEvent
  read FOnFilterRecord
  write SetOnFilterRecord;

Description

OnFilterRecord can be used to provide event-based filtering for datasets that support it. This event is only triggered when the Tdataset.Filtered property is set to True. The event handler should set the Accept parameter to True if the current record should be accepted, or to False if it should be rejected. No methods that change the state of the dataset may be used during this event, and calculated fields or lookup field values are not yet available.

See also

TDataset.Filter | Filter to apply to the data in memory.
TDataset.Filtered | Is the filter active or not.
TDataset.state | Current operational state of the dataset


TDataSet.OnNewRecord

Event triggered when a new record is created.

Declaration

Source position: db.pas line 1660

public property TDataSet.OnNewRecord: TDataSetNotifyEvent
  read FOnNewRecord
  write FOnNewRecord;

Description

OnNewRecord is triggered by the TDataset.Append or TDataset.Insert methods when the buffer for the new record's data has been allocated. This event can be used to set default value for some of the fields in the dataset. If an exception is raised during this event handler, the operation is cancelled and the dataset is put again in browse mode (TDataset.State is again dsBrowse).

See also

TDataset.Append | Append a new record to the data
TDataset.Insert | Insert a new record at the current position.
TDataset.State | Current operational state of the dataset


TDataSet.OnPostError

Event triggered when a post operation fails.

Declaration

Source position: db.pas line 1661

public property TDataSet.OnPostError: TDataSetErrorEvent
  read FOnPostError
  write FOnPostError;

Description

OnPostError is triggered when the TDataset.Post method fails to post the changes in the dataset buffer to the underlying database, because the database engine reported an error. The event handler can be used to indicate what the response to the failed post operation should be. To this end, it gets the exception object passed to it (parameter E), and it can examine this object to return an appropriate action in the DataAction parameter. The following responses are supported:

daFail
The operation should fail (an exception will be raised)
daAbort
The operation should be aborted (edits are undone, and an EAbort exception is raised)
daRetry
Retry the operation.

For more information, see also the description of the TDatasetErrorEvent event handler type.

See also

TDatasetErrorEvent | Error handling callback
TDataset.Post | Post pending edits to the database.
TDataset.OnDeleteError | Event triggered when a delete operation fails.
TDataset.OnEditError | Event triggered when an edit operation fails.


TDataSet.Open

Activate the dataset: Fetch data into memory.

Declaration

Source position: db.pas line 1604

public procedure TDataSet.Open;

Description

Open must be used to make the TDataset Active. It does nothing if the dataset is already active. Open initialises the TDataset and brings the dataset in a browsable state:

Effectively the following happens:

  1. The BeforeOpen event is triggered.
  2. The descendents InternalOpen method is called to actually fetch data and initialize fielddefs and field instances.
  3. BOFis set to True
  4. Internal buffers are allocated and filled with data
  5. If the dataset is empty, EOF is set to true
  6. State is set to dsBrowse
  7. The AfterOpen event is triggered

Errors

If the descendent class cannot fetch the data, or the data does not match the field definitions present in the dataset, then an exception will be raised.

See also

TDataset.Active | Is the dataset open or closed.
TDataset.State | Current operational state of the dataset
TDataset.BOF | Is the cursor at the beginning of the data (on the first record)
TDataset.EOF | Indicates whether the last record has been reached.
TDataset.BeforeOpen | Event triggered before the dataset is opened.
TDataset.AfterOpen | Event triggered after the dataset is opened.


TDataSet.Post

Post pending edits to the database.

Declaration

Source position: db.pas line 1605

public procedure TDataSet.Post; virtual;

Description

Post attempts to save pending edits when the dataset is in one of the edit modes: that is, after a Insert, Append or TDataset.Edit operation. The changes will be committed to memory - and usually immediatly to the underlying database as well. Prior to saving the data to memory, it will check some constraints: in TDataset, the presence of a value for all required fields is checked. if for a required field no value is present, an exception will be raised. A call to Post results in the triggering of the BeforePost, AfterPost events. After the call to Past, the State of the dataset is again dsBrowse, i.e. the dataset is again in browse mode.

Errors

Invoking the post method when the dataset is not in one of the editing modes (dsEditModes) will result in an EdatabaseError exception. If an exception occurs during the save operation, the OnPostError event is triggered to handle the error.

See also

Insert | Insert a new record at the current position.
Append | Append a new record to the data
Edit | Set the dataset in editing mode.
OnPostError | Event triggered when a post operation fails.
BeforePost | Event called before changes are posted to the underlying database
AfterPost | Event called after changes have been posted to the underlying database
State | Current operational state of the dataset


TDataSet.Prior

Go to the previous record

Declaration

Source position: db.pas line 1606

public procedure TDataSet.Prior;

Description

Prior moves the cursor to the previous record. It is equivalent to a MoveBy(-1) operation. Calling this method triggers the TDataset.BeforeScroll and TDataset.AfterScroll events. If the dataset is located on the first record, (BOF is true) then no action is performed, and the events are not triggered.

Errors

Calling this method on a closed dataset will result in an EDatabaseError exception.

See also

TDataset.MoveBy | Move the cursor position
TDataset.Next | Go to the next record in the dataset.
TDataset.First | Position the dataset on the first record.
TDataset.BeforeScroll | Event triggered before the cursor changes position.
TDataset.AfterScroll | Event triggered after the cursor has changed position.
TDataset.BOF | Is the cursor at the beginning of the data (on the first record)


TDataSet.RecNo

Current record number

Declaration

Source position: db.pas line 1628

public property TDataSet.RecNo: LongInt
  read GetRecNo
  write SetRecNo;

Description

RecNo returns the current position in the dataset. It can be written to set the cursor to the indicated position. This property must be implemented by TDataset descendents, for TDataset the property always returns -1.

This property should not be used if exact positioning is required. it is inherently unreliable.

See also

TDataset.RecordCount

Number of records in the dataset


TDataSet.RecordCount

Number of records in the dataset

Declaration

Source position: db.pas line 1627

public property TDataSet.RecordCount: LongInt
  read GetRecordCount;

Description

RecordCount is the number of records in the dataset. This number is not necessarily equal to the number of records returned by a query. For optimization purposes, a TDataset descendent may choose not to fetch all records from the database when the dataset is opened. If this is the case, then the RecordCount will only reflect the number of records that have actually been fetched at the current time, and therefor the value will change as more records are fetched from the database.

Only when Last has been called (and the dataset has been forced to fetch all records returned by the database), will the value of RecordCount be equal to the number of records returned by the query.

In general, datasets based on in-memory data or flat files, will return the correct number of records in RecordCount.

See also

TDataset.RecNo

Current record number


TDataSet.RecordSize

Size of the record in memory

Declaration

Source position: db.pas line 1629

public property TDataSet.RecordSize: Word
  read GetRecordSize;

Description

RecordSize is the total size of the memory buffer used for the records. This property returns always 0 in the TDataset implementation. Descendent classes should implement this property. Note that this property does not necessarily reflect the actual data size for the records. that may be more or less, depending on how the TDataset descendent manages it's data.

See also

TField.Datasize | Size of the field's data
TDataset.RecordCount | Number of records in the dataset
TDataset.RecNo | Current record number


TDataSet.Refresh

Refresh the records in the dataset

Declaration

Source position: db.pas line 1607

public procedure TDataSet.Refresh;

Description

Refresh posts any pending edits, and refetches the data in the dataset from the underlying database, and attempts to reposition the cursor on the same record as it was. This operation is not supported by all datasets, and should be used with care. The repositioning may not always succeed, in which case the cursor will be positioned on the first record in the dataset. This is in particular true for unidirectional datasets. Calling Refresh results in the triggering of the BeforeRefresh and AfterRefresh events.

Errors

Refreshing may fail if the underlying dataset descendent does not support it.

See also

TDataset.Close | Close the dataset
TDataset.Open | Activate the dataset: Fetch data into memory.
BeforeRefresh | Event triggered before the data is refreshed.
AfterRefresh | Event triggered after the data has been refreshed.


TDataSet.Resync

Resynchronize the data buffer

Declaration

Source position: db.pas line 1608

public procedure TDataSet.Resync(

  Mode: TResyncMode

); virtual;

Arguments

Mode

How to refresh the buffers.

Description

Resync refetches the records around the cursor position. It should not be used by application code, instead TDataset.Refresh should be used. The Resync parameter indicates how the buffers should be refreshed.

See also

TDataset.Refresh

Refresh the records in the dataset


TDataSet.SetFieldData

Store the data for a field

Declaration

Source position: line 0

procedure TDataSet.SetFieldData(

  Field: TField;

  Buffer: Pointer

); virtual; overload;

procedure TDataSet.SetFieldData(

  Field: TField;

  Buffer: Pointer;

  NativeFormat: Boolean

); virtual; overload;

Arguments

Field

Field to copy data for

Arguments

Field | Field to copy data for
NativeFormat | Is the data in native format

Description

SetFieldData should copy the data from field Field, stored in the memory pointed to by Buffer to the dataset memory buffer for the current record. This function is not intended for use by end-user applications, and should be used only in descendent classes, where it can be overridden. The NativeFormat determines whether the data is in native format (e.g. whether the date/time values are in TDateTime format).

See also

TField.DisplayText

Formatted field value


TDataSet.SetFields

Set a number of field values at once

Declaration

Source position: db.pas line 1609

public procedure TDataSet.SetFields(

  const Values: array of Const

);

Arguments

Values

Values to save in fields

Description

SetFields sets the values of the fields with the corresponding values in the array. It starts with the first field in the TDataset.Fields property, and works it's way down the array.

Errors

If the dataset is not in edit mode, then an EDatabaseError exception will be raised. If there are more values than fields, an EListError exception will be raised.

See also

TDataset.Fields

Indexed access to the fields of the dataset.


TDataSet.State

Current operational state of the dataset

Declaration

Source position: db.pas line 1630

public property TDataSet.State: TDataSetState
  read FState;

Description

State determines the current operational state of the dataset. During it's lifetime, the dataset is in one of many states, depending on which operation is currently in progress:

  • If a dataset is closed, the State is dsInactive.
  • As soon as it is opened, it is in dsBrowse mode, and remains in this state while changing the cursor position.
  • If the Edit or Insert or Append methods is called, the State changes to dsEdit or dsInsert, respectively.
  • As soon as edits have been posted or cancelled, the state is again dsBrowse.
  • Closing the dataset sets the state again to dsInactive.

There are some other states, mainly connected to internal operations, but which can become visible in some of the dataset's events.

See also

TDataset.Active | Is the dataset open or closed.
TDataset.Edit | Set the dataset in editing mode.
TDataset.Insert | Insert a new record at the current position.
TDataset.Append | Append a new record to the data
TDataset.Post | Post pending edits to the database.
TDataset.Cancel | Cancel the current editing operation


TDataSet.Translate

Transliterate a buffer

Declaration

Source position: db.pas line 1610

public function TDataSet.Translate(

  Src: PChar;

  Dest: PChar;

  ToOem: Boolean

):Integer; virtual;

Arguments

Src | Source buffer
Dest | Destination buffer
ToOem | Should translation happen from native to OEM codepage or vice versa ?

Function result

Number of written bytes.

Description

Translate is called for all string fields for which the TStringField.Transliterate property is set to True. The toOEM parameter is set to True if the transliteration must happen from the used codepage to the codepage used for storage, and if it is set to False then the transliteration must happen from the native codepage to the storage codepage. This call must be overridden by descendents of TDataset to provide the necessary transliteration: TDataset just copies the contents of the Src buffer to the Dest buffer. The result must be the number of bytes copied to the destination buffer.

Errors

No checks are performed on the bufffers.

See also

TStringField.Transliterate

Should the field value be transliterated when reading or writing


TDataSet.UpdateCursorPos

Update cursor position

Declaration

Source position: db.pas line 1611

public procedure TDataSet.UpdateCursorPos;

Description

UpdateCursorPos should not be used in application code. It is used to ensure that the logical cursor position is the correct (physical) position.

See also

TDataset.Refresh

Refresh the records in the dataset


TDataSet.UpdateRecord

Indicate that the record contents have changed

Declaration

Source position: db.pas line 1612

public procedure TDataSet.UpdateRecord;

Description

UpdateRecord notifies controls that the contents of the current record have changed. It triggers the event. This should never be called by application code, and is intended only for descendents of TDataset.

See also

OnUpdateRecord


TDataSet.UpdateStatus

Get the update status for the current record

Declaration

Source position: db.pas line 1613

public function TDataSet.UpdateStatus: TUpdateStatus; virtual;

Function result

Status of the current record

Description

UpdateStatus always returns usUnModified in the TDataset implementation. Descendent classes should override this method to indicate the status for the current record in case they support cached updates: the function should return the status of the current record: has the record been locally inserted, modified or deleted, or none of these. UpdateStatus is not used in TDataset itself, but is provided so applications have a unique API to work with datasets that have support for cached updates.


TDatasetClass

Class type for the TDataset class

Declaration

Source position: db.pas line 1292

type TDatasetClass = class of TDataSet;

Description

TDatasetClass is the class type for the TDataset class. It is curently unused in the DB unit and is defined for the benefit of other units.

See also

TDataset

Base class for records-based data-access


TDataSetErrorEvent

Error handling callback

Declaration

Source position: db.pas line 1283

type TDataSetErrorEvent = procedure(

  DataSet: TDataSet;

  E: EDatabaseError;

  var DataAction: TDataAction

) of object;

Arguments

DataSet | Dataset that triggered the event
E | Exception object that caused the operation to fail.
DataAction | Action to take upon return of the event handler.

Description

TDatasetErrorEvent is used by the TDataset.OnEditError, TDataset.OnPostError and TDataset.OnDeleteError event handlers to allow the programmer to specfy what should be done if an update operation fails with an exception: The Dataset parameter indicates what dataset triggered the event, the E parameter contains the exception object. The DataAction must be set by the event handler, and based on it's return value, the dataset instance will take appropriate action. The default value is daFail, i.e. the exception will be raised again. For a list of available return values, see TDataAction.

See also

TDataAction

Action to take when a data manipulation operation has failed.


TDataSetNotifyEvent

Event handler prototype for dataset events

Declaration

Source position: db.pas line 1282

type TDataSetNotifyEvent = procedure(

  DataSet: TDataSet

) of object;

Arguments

DataSet

Dataset which triggered the event

Description

TDatasetNotifyEVent is used in most of the TDataset event handlers. It differs from the more general TNotifyEvent (defined in the Classes unit) in that the Sender parameter of the latter is replaced with the Dataset parameter. This avoids typecasts, the available TDataset methods can be used directly.

See also

TDataset

Base class for records-based data-access


TDataSetState

Current state of the dataset

Declaration

Source position: db.pas line 49

type TDataSetState = (
dsInactive, | The dataset is not active. No data is available.
dsBrowse, | The dataset is active, and the cursor can be used to navigate the data.
dsEdit, | The dataset is in editing mode: the current record can be modified.
dsInsert, | The dataset is in insert mode: the current record is a new record which can be edited.
dsSetKey, | The dataset is calculating the primary key.
dsCalcFields, | The dataset is calculating it's calculated fields.
dsFilter, | The dataset is filtering records.
dsNewValue, | The dataset is showing the new values of a record.
dsOldValue, | The dataset is showing the old values of a record.
dsCurValue, | The dataset is showing the current values of a record.
dsBlockRead, | The dataset is open, but no events are transferred to datasources.
dsInternalCalc, | The dataset is calculating it's internally calculated fields.
dsOpening | The dataset is currently opening, but is not yet completely open.
);

Description

TDataSetState describes the current state of the dataset. During it's lifetime, the dataset's state is described by these enumerated values.

Some state are not used in the default TDataset implementation, and are only used by certain descendents.

See also

TDataset.State

Current operational state of the dataset


TDataSource

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Component representing the link between a local (GUI) component and a dataset

Declaration

Source position: db.pas line 1763

type TDataSource = class(TComponent)
public
constructor Create(); override; | Create a new instance of TDatasource
destructor Destroy; override; | Remove a TDatasource instance from memory
procedure Edit; | Put the dataset in edit mode, if needed
function IsLinkedTo(); | Check if a dataset is linked to a certain dataset
property State: TDataSetState; [r] | State of the dataset
published
property AutoEdit: Boolean; [rw] | Should the dataset be put in edit mode automatically
property DataSet: TDataSet; [rw] | Dataset this datasource is connected to
property Enabled: Boolean; [rw] | Enable or disable sending of events
property OnStateChange: TNotifyEvent; [rw] | Called whenever the state of the dataset changes
property OnDataChange: TDataChangeEvent; [rw] | Called whenever data changes in the current record
property OnUpdateData: TNotifyEvent; [rw] | Called whenever the data in the dataset must be updated
end;

Inheritance

TDataSource

Component representing the link between a local (GUI) component and a dataset
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TDatasource is a mediating component: it handles communication between any DB-Aware component (often edit controls on a form) and a TDataset instance. Any database aware component should never communicate with a dataset directly. Instead, it should communicate with a TDatasource instance. The TDataset instance will communicate with the TDatasource instance, which will notify every component attached to it. Vice versa, any component that wishes to make changes to the dataset, will notify the TDatasource instance, which will then (if needed) notify the TDataset instance. The datasource can be disabled, in which case all communication between the dataset and the DB-AWare components is suspended until the datasource is again enabled.

See also

TDataset | Base class for records-based data-access
TDatalink | Data event handling agent for controls


TDataSource
 | ro | State
pl |  | AutoEdit
pl |  | DataSet
pl |  | Enabled
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | AutoEdit (TDataSource)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | DataSet (TDataSource)
 |  | DesignInfo (TComponent)
pl |  | Enabled (TDataSource)
 |  | Name (TComponent)
 | ro | Owner (TComponent)
 | ro |


TDataSource
 | Create
 | Destroy
 | Edit
 | IsLinkedTo
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TDataSource)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TDataSource)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Edit (TDataSource)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

IsLinkedTo (TDataSource)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDataSource
pl | OnStateChange
pl | OnDataChange
pl | OnUpdateData
TComponent
TPersistent
TObject


pl | OnDataChange (TDataSource)
pl | OnStateChange (TDataSource)
pl |


TDataSource.AutoEdit

Should the dataset be put in edit mode automatically

Declaration

Source position: db.pas line 1791

published property TDataSource.AutoEdit: Boolean
  read FAutoEdit
  write FAutoEdit
  default true;

Description

AutoEdit can be set to True to prevent visual controls from putting the dataset in edit mode. Visual controls use the TDatasource.Edit method to attempt to put the dataset in edit mode as soon as the user changes something. If AutoEdit is set to False then the Edit method does nothing. The effect is that the user must explicitly set the dataset in edit mode (by clicking some button or some other action) before the fields can be edited.

See also

TDatasource.Edit | Put the dataset in edit mode, if needed
TDataset.Edit | Set the dataset in editing mode.


TDataSource.Create

Create a new instance of TDatasource

Declaration

Source position: db.pas line 1785

public constructor TDataSource.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new TDatasource instance.

Description

Create initializes a new instance of TDatasource. It simply allocates some resources and then calls the inherited constructor.

See also

TDatasource.Destroy

Remove a TDatasource instance from memory


TDataSource.DataSet

Dataset this datasource is connected to

Declaration

Source position: db.pas line 1792

published property TDataSource.DataSet: TDataSet
  read FDataSet
  write SetDataSet;

Description

Dataset must be set by the applictaion programmer to the TDataset instance for which this datasource is handling events. Setting it to Nil will disable all controls that are connected to this datasource instance. Once it is set and the datasource is enabled, the datasource will start sending data events to the controls or components connected to it.

See also

TDataset | Base class for records-based data-access
TDatasource.Enabled | Enable or disable sending of events


TDataSource.Destroy

Remove a TDatasource instance from memory

Declaration

Source position: db.pas line 1786

public destructor TDataSource.Destroy; override;

Description

Destroy notifies all TDataLink instances connected to it that the dataset is no loner available, and then removes itself from the TDatalink instance. It then cleans up all resources and calls the inherited constructor.

See also

TDatasource.Create | Create a new instance of TDatasource
TDatalink | Data event handling agent for controls


TDataSource.Edit

Put the dataset in edit mode, if needed

Declaration

Source position: db.pas line 1787

public procedure TDataSource.Edit;

Description

Edit will check AutoEdit: if it is True, then it puts the Dataset it is connected to in edit mode, if it was in browse mode. If AutoEdit is False, then nothing happens. Application or component code that deals with GUI development should always attempt to set a dataset in edit mode through this method instead of calling TDataset.Edit directly.

Errors

An EDatabaseError exception can occur if the dataset is read-only or fails to set itself in edit mode. (e.g. unidirectional datasets).

See also

TDatasource.AutoEdit | Should the dataset be put in edit mode automatically
TDataset.Edit | Set the dataset in editing mode.
TDataset.State | Current operational state of the dataset


TDataSource.Enabled

Enable or disable sending of events

Declaration

Source position: db.pas line 1793

published property TDataSource.Enabled: Boolean
  read FEnabled
  write SetEnabled
  default true;

Description

Enabled is by default set to True: the datasource instance communicates events from the dataset to components connected to the datasource, and vice versa: components can interact with the dataset. If the Enabled property is set to False then no events are communicated to connected components: it is as if the dataset property was set to Nil. Reversely, the components cannot interact with the dataset if the Enabled property is set to False.

See also

TDataset | Base class for records-based data-access
TDatasource.Dataset | Dataset this datasource is connected to
TDatasource.AutoEdit | Should the dataset be put in edit mode automatically


TDataSource.IsLinkedTo

Check if a dataset is linked to a certain dataset

Declaration

Source position: db.pas line 1788

public function TDataSource.IsLinkedTo(

  ADataSet: TDataSet

):Boolean;

Arguments

ADataSet

Dataset to check

Function result

True if the datasource is linked to ADataset

Description

IsLinkedTo checks if it is somehow linked to ADataset: it checks the Dataset property, and returns True if it is the same. If not, it continues by checking any detail dataset fields that the dataset posesses (recursively). This function can be used to detect circular links in e.g. master-detail relationships.

See also

TDatasource.Dataset

Dataset this datasource is connected to


TDataSource.OnDataChange

Called whenever data changes in the current record

Declaration

Source position: db.pas line 1795

published property TDataSource.OnDataChange: TDataChangeEvent
  read FOnDataChange
  write FOnDataChange;

Description

OnDatachange is called whenever a field value changes: if the Field parameter is set, a single field value changed. If the Field parameter is Nil, then the whole record changed: when the dataset is opened, when the user scrolls to a new record. This event handler can be set to react to data changes: to update the contents of non-DB-aware controls for instance. The event is not called when the datasource is not enabled.

See also

TDatasource.OnUpdateData | Called whenever the data in the dataset must be updated
TDatasource.OnStateChange | Called whenever the state of the dataset changes
TDataset.AfterScroll | Event triggered after the cursor has changed position.
TField.OnChange | Event triggerd when the field's value has changed
TDatasource.Enabled | Enable or disable sending of events


TDataSource.OnStateChange

Called whenever the state of the dataset changes

Declaration

Source position: db.pas line 1794

published property TDataSource.OnStateChange: TNotifyEvent
  read FOnStateChange
  write FOnStateChange;

Description

OnStateChange is called whenever the TDataset.State property changes, and the datasource is enabled. It can be used in application code to react to state changes: enabling or disabling non-DB-Aware controls, setting empty values etc.

See also

TDatasource.OnUpdateData | Called whenever the data in the dataset must be updated
TDatasource.OnStateChange | Called whenever the state of the dataset changes
TDataset.State | Current operational state of the dataset
TDatasource.Enabled | Enable or disable sending of events


TDataSource.OnUpdateData

Called whenever the data in the dataset must be updated

Declaration

Source position: db.pas line 1796

published property TDataSource.OnUpdateData: TNotifyEvent
  read FOnUpdateData
  write FOnUpdateData;

Description

OnUpdateData is called whenever the dataset needs the latest data from the controls: usually just before a TDataset.Post operation. It can be used to copy data from non-db-aware controls to the dataset just before the dataset is posting the changes to the underlying database.

See also

TDatasource.OnDataChange | Called whenever data changes in the current record
TDatasource.OnStateChange | Called whenever the state of the dataset changes
TDataset.Post | Post pending edits to the database.


TDataSource.State

State of the dataset

Declaration

Source position: db.pas line 1789

public property TDataSource.State: TDataSetState
  read FState;

Description

State contains the State of the dataset it is connected to, or dsInactive if the dataset property is not set or the datasource is not enabled. Components connected to a dataset through a datasource property should always check TDatasource.State instead of checking TDataset.State directly, to take into account the effect of the Enabled property.

See also

TDataset.State | Current operational state of the dataset
TDatasource.Enabled | Enable or disable sending of events


TDateField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for date values

Declaration

Source position: db.pas line 719

type TDateField = class(TDateTimeField)

public

  constructor Create(); override;

Create a new instance of a TDateField class.

end;

Inheritance

TDateField | Field class for date values
|
TDateTimeField | Field class for date/time/Datetime values
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TDateField is the class used when a dataset must manage data of type date. (TField.DataType equals ftDate). It initializes some of the properties of the TField class to be able to work with date fields.

It should never be necessary to create an instance of TDateField manually, a field of this class will be instantiated automatically for each date field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TDateTimeField | Field class for date/time/Datetime values
TTimeField | Field class for time values


TDateField
TDateTimeField
 |  | Value
pl |  | DisplayFormat
pl | ro | EditMask
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TDateTimeField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
pl | ro | EditMask (TDateTimeField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TDateTimeField)
 |  | VCLComObject (TComponent)
pl |  |


TDateField
 | Create
TDateTimeField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TDateTimeField)

Create (TDateField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDateField
TDateTimeField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TDateField.Create

Create a new instance of a TDateField class.

Declaration

Source position: db.pas line 721

public constructor TDateField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new field instance

Description

Create initializes a new instance of the TDateField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with date values.

See also

TField

Provide access to the contents of a single field in a record


TDateTimeField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for date/time/Datetime values

Declaration

Source position: db.pas line 694

type TDateTimeField = class(TField)
public
constructor Create(); override; | Create a new instance of a TDateTimeField class.
property Value: TDateTime; [rw] | Contents of the field as a TDateTime value
published
property DisplayFormat: ; [rw] | Formatting string for textual representation of the field
property EditMask; | Specify an edit mask for an edit control
end;

Inheritance

TDateTimeField | Field class for date/time/Datetime values
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TDateTimeField is the class used when a dataset must manage data of type datetime. (TField.DataType equals ftDateTime). It also serves as base class for the TDateField or TTimeField classes. It overrides some of the properties and methods of the TField class to be able to work with date/time fields.

It should never be necessary to create an instance of TDateTimeField manually, a field of this class will be instantiated automatically for each datetime field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TDateField | Field class for date values
TTimeField | Field class for time values


TDateTimeField
 |  | Value
pl |  | DisplayFormat
pl | ro | EditMask
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TDateTimeField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TDateTimeField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDateTimeField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TDateTimeField.Create

Create a new instance of a TDateTimeField class.

Declaration

Source position: db.pas line 710

public constructor TDateTimeField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field instance

Description

Create initializes a new instance of the TDateTimeField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with date/time values.

See also

TField

Provide access to the contents of a single field in a record


TDateTimeField.DisplayFormat

Formatting string for textual representation of the field

Declaration

Source position: db.pas line 713

published property TDateTimeField.DisplayFormat:
  read FDisplayFormat
  write SetDisplayFormat;

Description

DisplayFormat can be set to a formatting string that will then be used by the TField.DisplayText property to format the value with the DateTimeToStringfunction.

See also

DateTimeToString

FormatDateTime

TField.DisplayText

Formatted field value


TDateTimeField.EditMask

Specify an edit mask for an edit control

Declaration

Source position: db.pas line 714

published property TDateTimeField.EditMask;

Description

EditMask can be used to specify an edit mask for controls that allow to edit this field. It has no effect on the field value, and serves only to ensure that the user can enter only correct data for this field.

TDateTimeField just changes the visibility of the EditMark property, it is introduced in TField.

For more information on valid edit masks, see the documentation of the GUI controls.

See also

TField.EditMask

Specify an edit mask for an edit control


TDateTimeField.Value

Contents of the field as a TDateTime value

Declaration

Source position: db.pas line 711

public property TDateTimeField.Value: TDateTime
  read GetAsDateTime
  write SetAsDateTime;

Description

Value is redefined from TField.Value by TDateTimeField as a TDateTime value. It returns the same value as the TField.AsDateTime property.

See also

TField.AsDateTime | Access the field's contents as a TDateTime value.
TField.Value | Value of the field as a variant value


TDBDataset

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Dataset connected to a database.

Declaration

Source position: db.pas line 1802

type TDBDataset = class(TDataSet)
public
destructor destroy; override; | Remove the TDBDataset instance from memory.
property DataBase: TDataBase; [rw] | Database this dataset is connected to
property Transaction: TDBTransaction; [rw] | Transaction in which this dataset is running.
end;

Inheritance

TDBDataset | Dataset connected to a database.
|
TDataSet | Base class for records-based data-access
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TDBDataset is a TDataset descendent which introduces the concept of a database: a central component (TDatabase) which represents a connection to a database. This central component is exposed in the TDBDataset.Database property. When the database is no longer connected, or is no longer in memory, all TDBDataset instances connected to it are disabled.

TDBDataset also introduces the notion of a transaction, exposed in the Transaction property.

TDBDataset is an abstract class, it should never be used directly.

Dataset component writers should descend their component from TDBDataset if they wish to introduce a central database connection component. The database connection logic will be handled automatically by TDBDataset.

See also

TDatabase | Base class for connecting a FreePascal application to an external Database engine
TDBTransaction | Encapsulate a transaction


TDBDataset
 |  | DataBase
 |  | Transaction
TDataSet
 |  | BlockReadSize
 | ro | BOF
 |  | Bookmark
 | ro | CanModify
 | ro | DataSource
 | ro | DefaultFields
 | ro | EOF
 | ro | FieldCount
 |  | FieldDefs
 | ro | Found
 | ro | Modified
 | ro | IsUniDirectional
 | ro | RecordCount
 |  | RecNo
 | ro | RecordSize
 | ro | State
 | ro | Fields
 |  | FieldValues
 |  | Filter
 |  | Filtered
 |  | FilterOptions
 |  | Active
 |  | AutoCalcFields
 |  | BeforeOpen
 |  | AfterOpen
 |  | BeforeClose
 |  | AfterClose
 |  | BeforeInsert
 |  | AfterInsert
 |  | BeforeEdit
 |  | AfterEdit
 |  | BeforePost
 |  | AfterPost
 |  | BeforeCancel
 |  | AfterCancel
 |  | BeforeDelete
 |  | AfterDelete
 |  | BeforeScroll
 |  | AfterScroll
 |  | BeforeRefresh
 |  | AfterRefresh
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


 | Active (TDataSet)
 | AfterCancel (TDataSet)
 | AfterClose (TDataSet)
 | AfterDelete (TDataSet)
 | AfterEdit (TDataSet)
 | AfterInsert (TDataSet)
 | AfterOpen (TDataSet)
 | AfterPost (TDataSet)
 | AfterRefresh (TDataSet)
 | AfterScroll (TDataSet)
 | AutoCalcFields (TDataSet)
 | BeforeCancel (TDataSet)
 | BeforeClose (TDataSet)
 | BeforeDelete (TDataSet)
 | BeforeEdit (TDataSet)
 | BeforeInsert (TDataSet)
 | BeforeOpen (TDataSet)
 | BeforePost (TDataSet)
 | BeforeRefresh (TDataSet)
 | BeforeScroll (TDataSet)
 | BlockReadSize (TDataSet)
ro | BOF (TDataSet)
 | Bookmark (TDataSet)
ro | CanModify (TDataSet)
ro | ComObject (TComponent)
ro | ComponentCount (TComponent)
 | ComponentIndex (TComponent)
ro | Components (TComponent)
ro | ComponentState (TComponent)
ro | ComponentStyle (TComponent)
 | DataBase (TDBDataset)
ro | DataSource (TDataSet)
ro | DefaultFields (TDataSet)
 | DesignInfo (TComponent)
ro | EOF (TDataSet)
ro | FieldCount (TDataSet)
 | FieldDefs (TDataSet)
ro | Fields (TDataSet)
 | FieldValues (TDataSet)
 | Filter (TDataSet)
 | Filtered (TDataSet)
 | FilterOptions (TDataSet)
ro | Found (TDataSet)
ro | IsUniDirectional (TDataSet)
ro | Modified (TDataSet)
 | Name (TComponent)
ro | Owner (TComponent)
 | RecNo (TDataSet)
ro | RecordCount (TDataSet)
ro | RecordSize (TDataSet)
ro | State (TDataSet)
 | Tag (TComponent)
 | Transaction (TDBDataset)
 | VCLComObject (TComponent)


TDBDataset
 | destroy
TDataSet
 | Create
 | Destroy
 | ActiveBuffer
 | GetFieldData
 | SetFieldData
 | Append
 | AppendRecord
 | BookmarkValid
 | Cancel
 | CheckBrowseMode
 | ClearFields
 | Close
 | ControlsDisabled
 | CompareBookmarks
 | CreateBlobStream
 | CursorPosChanged
 | DataConvert
 | Delete
 | DisableControls
 | Edit
 | EnableControls
 | FieldByName
 | FindField
 | FindFirst
 | FindLast
 | FindNext
 | FindPrior
 | First
 | FreeBookmark
 | GetBookmark
 | GetCurrentRecord
 | GetFieldList
 | GetFieldNames
 | GotoBookmark
 | Insert
 | InsertRecord
 | IsEmpty
 | IsLinkedTo
 | IsSequenced
 | Last
 | Locate
 | Lookup
 | MoveBy
 | Next
 | Open
 | Post
 | Prior
 | Refresh
 | Resync
 | SetFields
 | Translate
 | UpdateCursorPos
 | UpdateRecord
 | UpdateStatus
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


ActiveBuffer (TDataSet)

AfterConstruction (TObject)

Append (TDataSet)

AppendRecord (TDataSet)

Assign (TPersistent)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

BookmarkValid (TDataSet)

Cancel (TDataSet)

ChangeName (TComponent)

CheckBrowseMode (TDataSet)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

ClearFields (TDataSet)

Close (TDataSet)

CompareBookmarks (TDataSet)

ControlsDisabled (TDataSet)

Create (TObject)

Create (TComponent)

Create (TDataSet)

CreateBlobStream (TDataSet)

CursorPosChanged (TDataSet)

DataConvert (TDataSet)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Delete (TDataSet)

Destroy (TObject)

Destroy (TComponent)

Destroy (TDataSet)

destroy (TDBDataset)

DestroyComponents (TComponent)

Destroying (TComponent)

DisableControls (TDataSet)

Dispatch (TObject)

DispatchStr (TObject)

Edit (TDataSet)

EnableControls (TDataSet)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FieldByName (TDataSet)

FindComponent (TComponent)

FindField (TDataSet)

FindFirst (TDataSet)

FindLast (TDataSet)

FindNext (TDataSet)

FindPrior (TDataSet)

First (TDataSet)

Free (TObject)

FreeBookmark (TDataSet)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetBookmark (TDataSet)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetCurrentRecord (TDataSet)

GetEnumerator (TComponent)

GetFieldData (TDataSet)

GetFieldList (TDataSet)

GetFieldNames (TDataSet)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

GotoBookmark (TDataSet)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

Insert (TDataSet)

InsertComponent (TComponent)

InsertRecord (TDataSet)

InstanceSize (TObject)

Invoke (TComponent)

IsEmpty (TDataSet)

IsImplementorOf (TComponent)

IsLinkedTo (TDataSet)

IsSequenced (TDataSet)

Last (TDataSet)

Loaded (TComponent)

Loading (TComponent)

Locate (TDataSet)

Lookup (TDataSet)

MethodAddress (TObject)

MethodName (TObject)

MoveBy (TDataSet)

newinstance (TObject)

Next (TDataSet)

Notification (TComponent)

Open (TDataSet)

PaletteCreated (TComponent)

Post (TDataSet)

Prior (TDataSet)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Refresh (TDataSet)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

Resync (TDataSet)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldData (TDataSet)

SetFields (TDataSet)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

Translate (TDataSet)

UnitName (TObject)

UpdateAction (TComponent)

UpdateCursorPos (TDataSet)

Updated (TComponent)

UpdateRecord (TDataSet)

UpdateRegistry (TComponent)

UpdateStatus (TDataSet)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDBDataset
TDataSet
 | OnCalcFields
 | OnDeleteError
 | OnEditError
 | OnFilterRecord
 | OnNewRecord
 | OnPostError
TComponent
TPersistent
TObject


TDBDataset.DataBase

Database this dataset is connected to

Declaration

Source position: db.pas line 1812

public property TDBDataset.DataBase: TDataBase
  read FDatabase
  write SetDatabase;

Description

Database should be set to the TDatabase instance this dataset is connected to. It can only be set when the dataset is closed.

Descendent classes should check in the property setter whether the database instance is of the correct class.

Errors

If the property is set when the dataset is active, an EDatabaseError exception will be raised.

See also

TDatabase | Base class for connecting a FreePascal application to an external Database engine
TDBDataset.Transaction | Transaction in which this dataset is running.


TDBDataset.destroy

Remove the TDBDataset instance from memory.

Declaration

Source position: db.pas line 1811

public destructor TDBDataset.destroy; override;

Description

Destroy will disconnect the TDBDataset from its Database and Transaction. After this it calls the inherited destructor.

See also

TDBDataset.Database | Database this dataset is connected to
TDatabase | Base class for connecting a FreePascal application to an external Database engine


TDBDataset.Transaction

Transaction in which this dataset is running.

Declaration

Source position: db.pas line 1813

public property TDBDataset.Transaction: TDBTransaction
  read FTransaction
  write SetTransaction;

Description

Transaction points to a TDBTransaction component that represents the transaction this dataset is active in. This property should only be used for databases that support transactions.

The property can only be set when the dataset is disabled.

See also

TDBTransaction | Encapsulate a transaction
TDBDataset.Database | Database this dataset is connected to


TDBDatasetClass

Class of TDBDataset

Declaration

Source position: db.pas line 1801

type TDBDatasetClass = class of TDBDataset;

Description

TDBDatasetClass is the class pointer for TDBDataset

See also

TDBDataset

Dataset connected to a database.


TDBTransaction

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Encapsulate a transaction

Declaration

Source position: db.pas line 1819

type TDBTransaction = class(TComponent)
public
constructor Create(); override; | Transaction property
destructor destroy; override; | Remove a TDBTransaction instance from memory.
procedure CloseDataSets; | Close all connected datasets
property DataBase: TDataBase; [rw] | Database this transaction is connected to
published
property Active: Boolean; [rw] | Is the transaction active or not
end;

Inheritance

TDBTransaction

Encapsulate a transaction
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TDBTransaction encapsulates a SQL transaction. It is an abstract class, and should be used by component creators that wish to encapsulate transactions in a class. The TDBTransaction class offers functionality to refer to a TDatabase instance, and to keep track of TDataset instances which are connected to the transaction.

See also

TDatabase | Base class for connecting a FreePascal application to an external Database engine
TDataset | Base class for records-based data-access


TDBTransaction
 |  | DataBase
pl |  | Active
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Active (TDBTransaction)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
 |  | DataBase (TDBTransaction)
 |  | DesignInfo (TComponent)
 |  | Name (TComponent)
 | ro |


TDBTransaction
 | Create
 | destroy
 | CloseDataSets
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CloseDataSets (TDBTransaction)

Create (TObject)

Create (TComponent)

Create (TDBTransaction)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

destroy (TDBTransaction)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TDBTransaction

TComponent

TPersistent

TObject


TDBTransaction.Active

Is the transaction active or not

Declaration

Source position: db.pas line 1848

published property TDBTransaction.Active: Boolean
  read FActive
  write setactive;

Description

Active is True if a transaction was started using TDBTransaction.StartTransaction. Reversely, setting Active to True will call StartTransaction, setting it to False will call TDBTransaction.EndTransaction.

See also

TDBTransaction.StartTransaction

TDBTransaction.EndTransaction


TDBTransaction.CloseDataSets

Close all connected datasets

Declaration

Source position: db.pas line 1845

public procedure TDBTransaction.CloseDataSets;

Description

CloseDatasets closes all connected datasets (All TDBDataset instances whose Transaction property points to this TDBTransaction instance).

See also

TDBDataset | Dataset connected to a database.
TDBDataset.Transaction | Transaction in which this dataset is running.


TDBTransaction.Create

Transaction property

Declaration

Source position: db.pas line 1843

public constructor TDBTransaction.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new TDBTransaction instance.

Description

Create initializes a new TDBTransaction instance. It sets up the necessary resources, after having called the inherited constructor.

See also

TDBTransaction.Destroy

Remove a TDBTransaction instance from memory.


TDBTransaction.DataBase

Database this transaction is connected to

Declaration

Source position: db.pas line 1846

public property TDBTransaction.DataBase: TDataBase
  read FDatabase
  write SetDatabase;

Description

Database points to the database that this transaction is part of. This property can be set only when the transaction is not active.

Errors

Setting this property to a new value when the transaction is active will result in an EDatabaseError exception.

See also

TDBTransaction.Active | Is the transaction active or not
TDatabase | Base class for connecting a FreePascal application to an external Database engine


TDBTransaction.destroy

Remove a TDBTransaction instance from memory.

Declaration

Source position: db.pas line 1844

public destructor TDBTransaction.destroy; override;

Description

Destroy first disconnects all connected TDBDataset instances and then cleans up the resources allocated in the Create constructor. After that it calls the inherited destructor.

See also

TDBTransaction.Create

Transaction property


TDBTransactionClass

Class of TDBTransaction

Declaration

Source position: db.pas line 1818

type TDBTransactionClass = class of TDBTransaction;

Description

TDBTransactionClass is the class pointer for the TDBTransaction class.

See also

TDBTransaction

Encapsulate a transaction


TDefCollection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Definition collection

Declaration

Source position: db.pas line 152

type TDefCollection = class(TOwnedCollection)
public
constructor create(); | Instantiate a new TDefCollection instance.
function Find(); | Find an item by name
procedure GetItemNames(); | Return a list of all names in the collection
function IndexOf(); | Find location of item by name
property Dataset: TDataSet; [r] | Dataset this collection manages definitions for.
property Updated: Boolean; [rw] | Has one of the items been changed
end;

Inheritance

TDefCollection

Definition collection
|

TOwnedCollection
|

TCollection
|

TPersistent
|

TObject

Description

TDefCollection is a parent class for the TFieldDefs and TIndexDefs collections: It holds a set of named definitions on behalf of a TDataset component. To this end, it introduces a dataset property, and a mechanism to notify the dataset of any updates in the collection. It is supposed to hold items of class TNamedItem, so the TDefCollection.Find method can find items by named.


TDefCollection
 | ro | Dataset
 |  | Updated
TOwnedCollection
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
ro | Dataset (TDefCollection)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | PropName (TCollection)
ro | UpdateCount (TCollection)


TDefCollection
 | create
 | Find
 | GetItemNames
 | IndexOf
TOwnedCollection
 | GetOwner
 | Create
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

Create (TOwnedCollection)

create (TDefCollection)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

Find (TDefCollection)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetItemNames (TDefCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetOwner (TOwnedCollection)

GetPropName (TCollection)

IndexOf (TDefCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TDefCollection

TOwnedCollection

TCollection

TPersistent

TObject


TDefCollection.create

Instantiate a new TDefCollection instance.

Declaration

Source position: db.pas line 159

public constructor TDefCollection.create(

  ADataset: TDataSet;

  AOwner: TPersistent;

  AClass: TCollectionItemClass

);

Arguments

ADataset | Dataset to manage definitions for
AOwner | Owner of the items in the collection.
AClass | Item class for Add call.

Description

Create saves the ADataset and AOwner components in local variables for later reference, and then calls the inherited Create with AClass as a parameter. AClass should at least be of type TNamedItem. ADataset is the dataset on whose behalf the collection is managed. AOwner is the owner of the collection, normally this is the form or datamodule on which the dataset is dropped.

See also

TDataset | Base class for records-based data-access
TNamedItem | Named collection item


TDefCollection.Dataset

Dataset this collection manages definitions for.

Declaration

Source position: db.pas line 163

public property TDefCollection.Dataset: TDataSet
  read FDataset;

Description

Dataset is the dataset this collection manages definitions for. It must be supplied when the collection is created and cannot cgange during the lifetime of the collection.


TDefCollection.Find

Find an item by name

Declaration

Source position: db.pas line 160

public function TDefCollection.Find(

  const AName:

):TNamedItem;

Arguments

AName

Name to search for in collection.

Function result

Item matching AName

Description

Find searches for an item in the collection with name AName and returns the item if it is found. If no item with the requested name is found, Nil is returned. The search is performed case-insensitive.

Errors

If no item with matching name is found, Nil is returned.

See also

TNamedItem.Name | Name of the item
TDefCollection.IndexOf | Find location of item by name


TDefCollection.GetItemNames

Return a list of all names in the collection

Declaration

Source position: db.pas line 161

public procedure TDefCollection.GetItemNames(

  List: TStrings

);

Arguments

List

List to fill with the names of the items in the collection.

Description

GetItemNames fills List with the names of all items in the collection. It clears the list first.

Errors

If List is not a valid TStrings instance, an exception will occur.

See also

TNamedItem.Name

Name of the item


TDefCollection.IndexOf

Find location of item by name

Declaration

Source position: db.pas line 162

public function TDefCollection.IndexOf(

  const AName:

):LongInt;

Arguments

AName

Name to look for. (case insensitive)

Function result

Index of the found item, or -1 if none was found.

Description

IndexOf searches in the collection for an item whose Name property matches AName and returns the index of the item if it finds one. If no item is found, -1 is returned. The search is performed case-insensitive.

See also

TDefCollection.Find | Find an item by name
TNamedItem.Name | Name of the item


TDefCollection.Updated

Has one of the items been changed

Declaration

Source position: db.pas line 164

public property TDefCollection.Updated: Boolean
  read FUpdated
  write FUpdated;

Description

Changed indicates whether the collection has changed: an item was added or removed, or one of the properties of the items was changed.


TDetailDataLink

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Represents the link between a detail data source and a master datasource.

Declaration

Source position: db.pas line 1725

type TDetailDataLink = class(TDataLink)

public

  property DetailDataSet: TDataSet; [r]

Detail dataset in Master-detail relation

end;

Inheritance

TDetailDataLink | Represents the link between a detail data source and a master datasource.
|
TDataLink | Data event handling agent for controls
|
TPersistent
|
TObject

Description

TDetailDataLink handles the communication between a detail dataset and the master datasource in a master-detail relationship between datasets. It should never be used in an application, and should only be used by component writers that wish to provide master-detail functionality for TDataset descendents.

See also

TDataset | Base class for records-based data-access
TDatasource | Component representing the link between a local (GUI) component and a dataset


TDetailDataLink
 | ro | DetailDataSet
TDataLink
 | ro | Active
 |  | ActiveRecord
 | ro | BOF
 |  | BufferCount
 | ro | DataSet
 |  | DataSource
 |  | DataSourceFixed
 | ro | Editing
 | ro | Eof
 |  | ReadOnly
 | ro | RecordCount
TPersistent
TObject


ro | Active (TDataLink)
 | ActiveRecord (TDataLink)
ro | BOF (TDataLink)
 | BufferCount (TDataLink)
ro | DataSet (TDataLink)
 | DataSource (TDataLink)
 | DataSourceFixed (TDataLink)
ro | DetailDataSet (TDetailDataLink)
ro | Editing (TDataLink)
ro | Eof (TDataLink)
 | ReadOnly (TDataLink)
ro |


TDetailDataLink
TDataLink
 | Create
 | Destroy
 | Edit
 | UpdateRecord
 | ExecuteAction
 | UpdateAction
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TDetailDataLink

TDataLink

TPersistent

TObject


TDetailDataLink.DetailDataSet

Detail dataset in Master-detail relation

Declaration

Source position: db.pas line 1729

public property TDetailDataLink.DetailDataSet: TDataSet
  read GetDetailDataSet;

Description

DetailDataset is the detail dataset in a master-detail relationship between 2 datasets. DetailDataset is always Nil in TDetailDatalink and is only filled in in descendent classes like TMasterDatalink. The master dataset is available through the regular TDataLink.DataSource property.

See also

TDataset | Base class for records-based data-access
TMasterDatalink | Datalink for Master-Detail relationships between datasets.
TDataLink.DataSource | Datasource this datalink is connected to


TField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Provide access to the contents of a single field in a record

Declaration

Source position: db.pas line 261

type TField = class(TComponent)
public
constructor Create(); override; | Create a new TField instance
destructor Destroy; override; | Destroy the TField instance
procedure Assign(); override; | Copy properties from one TField instance to another
procedure AssignValue(); | Assign value of a variant record to the field.
procedure Clear; virtual; | Clear the field contents.
procedure FocusControl; | Set focus to the first control connected to this field.
public
function GetData(); | Get the data from this field
public
class function IsBlob; virtual; | Is the field a BLOB field (untyped data of indeterminate size).
function IsValidChar(); virtual; | Check whether a character is valid input for the field
procedure RefreshLookupList; | Refresh the lookup list
public
procedure SetData(); | Save the field data
public
procedure SetFieldType(); virtual; | Set the field data type
procedure Validate(); | Validate the data buffer
property AsBCD: TBCD; [rw] | Access the field's contents as a BCD (Binary coded Decimal)
property AsBoolean: Boolean; [rw] | Access the field's contents as a Boolean value.
property AsBytes: TBytes; [rw]
property AsCurrency: Currency; [rw] | Access the field's contents as a Currency value.
property AsDateTime: TDateTime; [rw] | Access the field's contents as a TDateTime value.
property AsFloat: Double; [rw] | Access the field's contents as a floating-point (Double) value.
property AsLongint: LongInt; [rw] | Access the field's contents as a 32-bit signed integer (longint) value.
property AsLargeInt: LargeInt; [rw] | Access the field's contents as a 64-bit signed integer (longint) value.
property AsInteger: Integer; [rw] | Access the field's contents as a 32-bit signed integer (longint) value.
property AsString: ; [rw] | Access the field's contents as an AnsiString value.
property AsWideString: WideString; [rw] | Access the field's contents as a WideString value.
property AsVariant: variant; [rw] | Access the field's contents as a Variant value.
property AttributeSet: ; [rw] | Not used: dictionary information
property Calculated: Boolean; [rw] | Is the field a calculated field ?
property CanModify: Boolean; [r] | Can the field's contents be modified.
property CurValue: Variant; [r] | Current value of the field
property DataSet: TDataSet; [rw] | Dataset this field belongs to
property DataSize: Integer; [r] | Size of the field's data
property DataType: TFieldType; [r] | The data type of the field.
property DisplayName: ; [r] | User-readable fieldname
property DisplayText: ; [r] | Formatted field value
property EditMask: TEditMask; [rw] | Specify an edit mask for an edit control
property EditMaskPtr: TEditMask; [r] | Alias for EditMask
property FieldNo: LongInt; [r] | Number of the field in the record
property IsIndexField: Boolean; [r] | Is the field an indexed field ?
property IsNull: Boolean; [r] | Is the field empty
property Lookup: Boolean; [rw] | Is the field a lookup field
property NewValue: Variant; [rw] | The new value of the field
property Offset: Word; [r] | Offset of the field's value in the dataset buffer
property Size: Integer; [rw] | Logical size of the field
property Text: ; [rw] | Text representation of the field
property ValidChars: TFieldChars; [r] | Characters that are valid input for the field's content
property Value: variant; [rw] | Value of the field as a variant value
property OldValue: variant; [r] | Old value of the field
property LookupList: TLookupList; [r] | List of lookup values
published
property Alignment: TAlignment; [rw] | Alignment for this field
property CustomConstraint: ; [rw] | Custom constraint for the field's value
property ConstraintErrorMessage: ; [rw] | Message to display if the CustomConstraint constraint is violated.
property DefaultExpression: ; [rw] | Default value for the field
property DisplayLabel: ; [rws] | Name of the field for display purposes
property DisplayWidth: LongInt; [rw] | Width of the field in characters
property FieldKind: TFieldKind; [rw] | The kind of field.
property FieldName: ; [rw] | Name of the field
property HasConstraints: Boolean; [r] | Does the field have any constraints defined
property Index: LongInt; [rw] | Index of the field in the list of fields
property ImportedConstraint: ; [rw] | Constraint for the field value on the level of the underlying database
property KeyFields: ; [rw] | Key fields to use when looking up a field value.
property LookupCache: Boolean; [rw] | Should lookup values be cached
property LookupDataSet: TDataSet; [rw] | Dataset with lookup values
property LookupKeyFields: ; [rw] | Names of fields on which to perform a locate
property LookupResultField: ; [rw] | Name of field to use as lookup value
property Origin: ; [rw] | Original fieldname of the field.
property ProviderFlags: TProviderFlags; [rw] | Flags for provider or update support
property ReadOnly: Boolean; [rw] | Is the field read-only
property Required: Boolean; [rw] | Does the field require a value
property Visible: Boolean; [rw] | Should the field be shown in grids
property OnChange: TFieldNotifyEvent; [rw] | Event triggerd when the field's value has changed
property OnGetText: TFieldGetTextEvent; [rw] | Event to format the field's content
property OnSetText: TFieldSetTextEvent; [rw] | Event to set the field's content based on a user-formatted string
property OnValidate: TFieldNotifyEvent; [rw] | Event to validate the value of a field before it is written to the data buffer
end;

Inheritance

TField

Provide access to the contents of a single field in a record
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TField is an abstract class that defines access methods for a field in a record, controlled by a TDataset instance. It provides methods and properties to access the contents of the field in the current record. Reading one of the AsXXX properties of TField will access the field contents and return the contents as the desired type. Writing one of the AsXXX properties will write a value to the buffer represented by the TField instance.

TField is an abstract class, meaning that it should never be created directly. TDataset instances always create one of the descendent classes of TField, depending on the type of the underlying data.

See also

TDataset | Base class for records-based data-access
TFieldDef | Class to describe one field in a record in a dataset
TFields | Collection of #fcl.db.TField instances


TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | VCLComObject (TComponent)
pl |  |


TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TField.Alignment

Alignment for this field

Declaration

Source position: db.pas line 423

published property TField.Alignment: TAlignment
  read FAlignment
  write SetAlignment
  default taLeftJustify;

Description

Alignment contains the alignment that UI controls should observe when displaying the contents of the field. Setting the property at the field level will make sure that all DB-Aware controls will display the contents of the field with the same alignment.

See also

TField.DisplayText

Formatted field value


TField.AsBCD

Access the field's contents as a BCD (Binary coded Decimal)

Declaration

Source position: db.pas line 387

public property TField.AsBCD: TBCD
  read GetAsBCD
  write SetAsBCD;

Description

AsBCD can be used to read or write the contents of the field as a BCD value (Binary Coded Decimal). If the native type of the field is not BCD, then an attempt will be made to convert the field value from the native format to a BCD value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a BCD value, an exception may be raised.

See also

TField.AsCurrency | Access the field's contents as a Currency value.
TField.Value | Value of the field as a variant value


TField.AsBoolean

Access the field's contents as a Boolean value.

Declaration

Source position: db.pas line 388

public property TField.AsBoolean: Boolean
  read GetAsBoolean
  write SetAsBoolean;

Description

AsBoolean can be used to read or write the contents of the field as a boolean value. If the native type of the field is not Boolean, then an attempt will be made to convert the field value from the native format to a boolean value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a Boolean value (for instance a string value), an exception may be raised.

See also

TField.Value | Value of the field as a variant value
TField.AsInteger | Access the field's contents as a 32-bit signed integer (longint) value.


TField.AsBytes

Declaration

Source position: db.pas line 389

public property TField.AsBytes: TBytes
  read GetAsBytes
  write SetAsBytes;


TField.AsCurrency

Access the field's contents as a Currency value.

Declaration

Source position: db.pas line 390

public property TField.AsCurrency: Currency
  read GetAsCurrency
  write SetAsCurrency;

Description

AsBoolean can be used to read or write the contents of the field as a currency value. If the native type of the field is not Boolean, then an attempt will be made to convert the field value from the native format to a currency value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a currency-compatible value (dates or string values), an exception may be raised.

See also

TField.Value | Value of the field as a variant value
TField.AsFloat | Access the field's contents as a floating-point (Double) value.


TField.AsDateTime

Access the field's contents as a TDateTime value.

Declaration

Source position: db.pas line 391

public property TField.AsDateTime: TDateTime
  read GetAsDateTime
  write SetAsDateTime;

Description

AsDateTime can be used to read or write the contents of the field as a TDateTime value (for both date and time values). If the native type of the field is not a date or time value, then an attempt will be made to convert the field value from the native format to a TDateTime value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a TDateTime-compatible value (dates or string values), an exception may be raised.

See also

TField.Value | Value of the field as a variant value
TField.AsString | Access the field's contents as an AnsiString value.


TField.AsFloat

Access the field's contents as a floating-point (Double) value.

Declaration

Source position: db.pas line 392

public property TField.AsFloat: Double
  read GetAsFloat
  write SetAsFloat;

Description

AsFloat can be used to read or write the contents of the field as a floating-point value (of type double, i.e. with double precision). If the native type of the field is not a floating-point value, then an attempt will be made to convert the field value from the native format to a floating-point value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a floating-point-compatible value (string values for instance), an exception may be raised.

See also

TField.Value | Value of the field as a variant value
TField.AsString | Access the field's contents as an AnsiString value.
TField.AsCurrency | Access the field's contents as a Currency value.


TField.AsInteger

Access the field's contents as a 32-bit signed integer (longint) value.

Declaration

Source position: db.pas line 395

public property TField.AsInteger: Integer
  read GetAsInteger
  write SetAsInteger;

Description

AsInteger can be used to read or write the contents of the field as a 32-bit signed integer value (of type Integer). If the native type of the field is not an integer value, then an attempt will be made to convert the field value from the native format to a integer value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a 32-bit signed integer-compatible value (string values for instance), an exception may be raised.

See also

TField.Value | Value of the field as a variant value
TField.AsString | Access the field's contents as an AnsiString value.
TField.AsLongint | Access the field's contents as a 32-bit signed integer (longint) value.
TField.AsInt64


TField.AsLargeInt

Access the field's contents as a 64-bit signed integer (longint) value.

Declaration

Source position: db.pas line 394

public property TField.AsLargeInt: LargeInt
  read GetAsLargeInt
  write SetAsLargeInt;

Description

AsLargeInt can be used to read or write the contents of the field as a 64-bit signed integer value (of type Int64). If the native type of the field is not an Int64 value, then an attempt will be made to convert the field value from the native format to an Int64 value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a 64-bit signed integer-compatible value (string values for instance), an exception may be raised.

See also

TField.Value | Value of the field as a variant value
TField.AsString | Access the field's contents as an AnsiString value.
TField.AsInteger | Access the field's contents as a 32-bit signed integer (longint) value.


TField.AsLongint

Access the field's contents as a 32-bit signed integer (longint) value.

Declaration

Source position: db.pas line 393

public property TField.AsLongint: LongInt
  read GetAsLongint
  write SetAsLongint;

Description

AsLongint can be used to read or write the contents of the field as a 32-bit signed integer value (of type longint). If the native type of the field is not a longint value, then an attempt will be made to convert the field value from the native format to a longint value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a 32-bit signed integer-compatible value (string values for instance), an exception may be raised.

This is an alias for the TField.AsInteger.

See also

TField.Value | Value of the field as a variant value
TField.AsString | Access the field's contents as an AnsiString value.
TField.AsInteger | Access the field's contents as a 32-bit signed integer (longint) value.


TField.Assign

Copy properties from one TField instance to another

Declaration

Source position: db.pas line 374

public procedure TField.Assign(

  Source: TPersistent

); override;

Arguments

Source

Source field to copy value from.

Description

Assign is overridden by TField to copy the field value (not the field properties) from Source if it exists. If Source is Nil then the value of the field is cleared.

Errors

If Source is not a TField instance, then an exception will be raised.

See also

TField.Value

Value of the field as a variant value


TField.AssignValue

Assign value of a variant record to the field.

Declaration

Source position: db.pas line 375

public procedure TField.AssignValue(

  const AValue: TVarRec

);

Arguments

AValue

Value to assign to the field

Description

AssignValue assigns the value of a "array of const" record AValue (of type TVarRec) to the field's value. If the record contains a TPersistent instance, it will be used as argument for the Assign to the field.

The dataset must be in edit mode to execute this method.

Errors

If the AValue contains an unsupported value (such as a non-nil pointer) then an exception will be raised. If the dataset is not in one of the edit modes, then executing this method will raise an EDatabaseError exception.

See also

TField.Assign | Copy properties from one TField instance to another
TField.Value | Value of the field as a variant value


TField.AsString

Access the field's contents as an AnsiString value.

Declaration

Source position: db.pas line 396

public property TField.AsString:
  read GetAsString
  write SetAsString;

Description

AsString can be used to read or write the contents of the field as an AnsiString value. If the native type of the field is not an ansistring value, then an attempt will be made to convert the field value from the native format to a ansistring value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not an ansistring-compatible value, an exception may be raised.

See also

TField.Value | Value of the field as a variant value
TField.AsWideString | Access the field's contents as a WideString value.


TField.AsVariant

Access the field's contents as a Variant value.

Declaration

Source position: db.pas line 398

public property TField.AsVariant: variant
  read GetAsVariant
  write SetAsVariant;

Description

AsVariant can be used to read or write the contents of the field as a Variant value. If the native type of the field is not a Variant value, then an attempt will be made to convert the field value from the native format to a variant value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a variant-compatible value, an exception may be raised.

See also

TField.Value

Value of the field as a variant value

TField.Astring


TField.AsWideString

Access the field's contents as a WideString value.

Declaration

Source position: db.pas line 397

public property TField.AsWideString: WideString
  read GetAsWideString
  write SetAsWideString;

Description

AsWideString can be used to read or write the contents of the field as a WideString value. If the native type of the field is not a widestring value, then an attempt will be made to convert the field value from the native format to a widestring value when reading the field's content. Likewise, when writing the property, the value will be converted to the native type of the field (if the value allows it). Therefor, when reading or writing a field value for a field whose native data type is not a widestring-compatible value, an exception may be raised.

See also

TField.Value

Value of the field as a variant value

TField.Astring


TField.AttributeSet

Not used: dictionary information

Declaration

Source position: db.pas line 399

public property TField.AttributeSet:
  read FAttributeSet
  write FAttributeSet;

Description

AttributeSet was used in older Delphi versions to store data dictionary information for use in data-aware controls at design time. Not used in FreePascal (or newer Delphi versions); kept for Delphi compatibility.


TField.Calculated

Is the field a calculated field ?

Declaration

Source position: db.pas line 400

public property TField.Calculated: Boolean
  read FCalculated
  write FCalculated;

Description

Calculated is True if the FieldKind is fkCalculated. Setting the property wil result in FieldKind being set to fkCalculated (for a value of True) or fkData. This property should be considered read-only.

See also

TField.FieldKind

The kind of field.


TField.CanModify

Can the field's contents be modified.

Declaration

Source position: db.pas line 401

public property TField.CanModify: Boolean
  read GetCanModify;

Description

CanModify is True if the field is not read-only and the dataset allows modification.

See also

TField.ReadOnly | Is the field read-only
TDataset.CanModify | Can the data in the dataset be modified


TField.Clear

Clear the field contents.

Declaration

Source position: db.pas line 376

public procedure TField.Clear; virtual;

Description

Clear clears the contents of the field. After calling this method the value of the field is Null and IsNull returns True.

The dataset must be in edit mode to execute this method.

Errors

If the dataset is not in one of the edit modes, then executing this method will raise an EDatabaseError exception.

See also

TField.IsNull | Is the field empty
TField.Value | Value of the field as a variant value


TField.ConstraintErrorMessage

Message to display if the CustomConstraint constraint is violated.

Declaration

Source position: db.pas line 425

published property TField.ConstraintErrorMessage:
  read FConstraintErrorMessage
  write FConstraintErrorMessage;

Description

ConstraintErrorMessage is the message that should be displayed when the dataset checks the constraints and the constraint in TField.CustomConstraint is violated.

This feature is not yet implemented in FPC.

See also

TField.CustomConstraint

Custom constraint for the field's value


TField.Create

Create a new TField instance

Declaration

Source position: db.pas line 372

public constructor TField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field.

Description

Create creates a new TField instance and sets up initial values for the fields. TField is a component, and AOwner will be used as the owner of the TField instance. This usually will be the form or datamodule on which the dataset was placed. There should normally be no need for a programmer to create a Tfield instance manually. The TDataset.Open method will create the necessary TField instances, if none had been creaed in the designer.

See also

TDataset.Open

Activate the dataset: Fetch data into memory.


TField.CurValue

Current value of the field

Declaration

Source position: db.pas line 402

public property TField.CurValue: Variant
  read GetCurValue;

Description

CurValue returns the current value of the field as a variant.

See also

TField.Value

Value of the field as a variant value


TField.CustomConstraint

Custom constraint for the field's value

Declaration

Source position: db.pas line 424

published property TField.CustomConstraint:
  read FCustomConstraint
  write FCustomConstraint;

Description

CustomConstraint may contain a constraint that will be enforced when the dataset posts it's data. It should be a SQL-like expression that results in a True or False value. Examples of valid constraints are:

Salary < 10000
YearsEducation < Age

If the constraint is not satisfied when the record is posted, then an exception will be raised with the value of ConstraintErrorMessage as a message.

This feature is not yet implemented in FPC.

See also

TField.ConstraintErrorMessage | Message to display if the CustomConstraint constraint is violated.
TField.ImportedConstraint | Constraint for the field value on the level of the underlying database


TField.DataSet

Dataset this field belongs to

Declaration

Source position: db.pas line 403

public property TField.DataSet: TDataSet
  read FDataSet
  write SetDataSet;

Description

Dataset contains the dataset this field belongs to. Writing this property will add the field to the list of fields of a dataset, after removing if from the list of fields of the dataset the field was previously assigned to. It should under normal circumstnces never be necessary to set this property, the TDataset code will take care of this.

See also

TDataset | Base class for records-based data-access
TDataset.Fields | Indexed access to the fields of the dataset.


TField.DataSize

Size of the field's data

Declaration

Source position: db.pas line 404

public property TField.DataSize: Integer
  read GetDataSize;

Description

DataSize is the memory size needed to store the field's contents. This is different from the Size property which declares a logical size for datatypes that have a variable size (such as string fields). For BLOB fields, use the TBlobField.BlobSize property to get the size of the field's contents for the current record..

See also

TField.Size | Logical size of the field
TBlobField.BlobSize | Size of the current blob


TField.DataType

The data type of the field.

Declaration

Source position: db.pas line 405

public property TField.DataType: TFieldType
  read FDataType;

Description

Datatype indicates the type of data the field has. This property is initialized when the dataset is opened or when persistent fields are created for the dataset. Instead of checking the class type of the field, it is better to check the Datatype, since the actual class of the TField instance may differ depending on the dataset.

See also

TField.FieldKind

The kind of field.


TField.DefaultExpression

Default value for the field

Declaration

Source position: db.pas line 426

published property TField.DefaultExpression:
  read FDefaultExpression
  write FDefaultExpression;

Description

DefaultValue can be set to a value that should be entered in the field whenever the TDataset.Append or TDataset.Insert methods are executed. It should contain a valid SQL expression that results in the correct type for the field.

This feature is not yet implemented in FPC.

See also

TDataset.Insert | Insert a new record at the current position.
TDataset.Append | Append a new record to the data
TDataset.CustomConstraint


TField.Destroy

Destroy the TField instance

Declaration

Source position: db.pas line 373

public destructor TField.Destroy; override;

Description

Destroy cleans up any structures set up by the field instance, and then calls the inherited destructor. There should be no need to call this method under normal circumstances: the dataset instance will free any TField instances it has created when the dataset was opened.

See also

TDataset.Close

Close the dataset


TField.DisplayLabel

Name of the field for display purposes

Declaration

Source position: db.pas line 427

published property TField.DisplayLabel:
  read GetDisplayName
  write SetDisplayLabel
  stored IsDisplayStored;

Description

DisplayLabel is the name of the field as it will be displayed to the user e.g. in grid column headers. By default it equals the FieldName property, unless assigned another value.

See also

TField.FieldName

Name of the field


TField.DisplayName

User-readable fieldname

Declaration

Source position: db.pas line 406

public property TField.DisplayName:
  read GetDisplayName;

Description

DisplayName is the name of the field as it will be displayed to the user e.g. in grid column headers. By default it equals the FieldName property, unless assigned another value.

The use of this property is deprecated. Use DisplayLabel instead.

See also

Tfield.FieldName

Name of the field


TField.DisplayText

Formatted field value

Declaration

Source position: db.pas line 407

public property TField.DisplayText:
  read GetDisplayText;

Description

DisplayText returns the field's value as it should be displayed to the user, with all necessary formatting applied. Controls that should display the value of the field should use DisplayText instead of the TField.AsString property, which does not take into account any formatting.

See also

TField.AsString

Access the field's contents as an AnsiString value.


TField.DisplayWidth

Width of the field in characters

Declaration

Source position: db.pas line 428

published property TField.DisplayWidth: LongInt
  read GetDisplayWidth
  write SetDisplayWidth;

Description

DisplayWidth is the width (in characters) that should be used by controls that display the contents of the field (such as in grids or lookup lists). It is initialized to a default value for most fields (e.g. it equals Size for string fields) but can be modified to obtain a more appropriate value for the field's expected content.

See also

TField.Alignment | Alignment for this field
TField.DisplayText | Formatted field value


TField.EditMask

Specify an edit mask for an edit control

Declaration

Source position: db.pas line 408

public property TField.EditMask: TEditMask
  read FEditMask
  write FEditMask;

Description

EditMask can be used to specify an edit mask for controls that allow to edit this field. It has no effect on the field value, and serves only to ensure that the user can enter only correct data for this field.

For more information on valid edit masks, see the documentation of the GUI controls.

See also

TDateTimeField.EditMask | Specify an edit mask for an edit control
TStringField.EditMask | Specify an edit mask for an edit control


TField.EditMaskPtr

Alias for EditMask

Declaration

Source position: db.pas line 409

public property TField.EditMaskPtr: TEditMask
  read FEditMask;

Description

EditMaskPtr is a read-only alias for the EditMask property. It is not used.

See also

TField.EditMask

Specify an edit mask for an edit control


TField.FieldKind

The kind of field.

Declaration

Source position: db.pas line 429

published property TField.FieldKind: TFieldKind
  read FFieldKind
  write FFieldKind;

Description

FieldKind indicates the type of the TField instance. Besides TField instances that represent fields present in the underlying data records, there can also be calculated or lookup fields. This property determines what kind of field the TField instance is.


TField.FieldName

Name of the field

Declaration

Source position: db.pas line 430

published property TField.FieldName:
  read FFieldName
  write FFieldName;

Description

FieldName is the name of the field as it is defined in the underlying data structures (for instance the name of the field in a SQL table, DBAse file, or the alias of the field if it was aliased in a SQL SELECT statement. It does not always equal the Name property, which is the name of the TField component instance. The Name property will generally equal the name of the dataset appended with the value of the FieldName property.

See also

TFieldDef.Name
TField.Size | Logical size of the field
TField.DataType | The data type of the field.


TField.FieldNo

Number of the field in the record

Declaration

Source position: db.pas line 410

public property TField.FieldNo: LongInt
  read FFieldNo;

Description

FieldNo is the position of the field in the record. It is a 1-based index and is initialized when the dataset is opened or when persistent fields are created for the dataset.

See also

TField.Index

Index of the field in the list of fields


TField.FocusControl

Set focus to the first control connected to this field.

Declaration

Source position: db.pas line 377

public procedure TField.FocusControl;

Description

FocusControl will set focus to the first control that is connected to this field.

Errors

If the control cannot receive focus, then this method will raise an exception.

See also

TDataset.EnableControls | Enable event propagation of controls
TDataset.DisableControls | Disable event propagation of controls


TField.GetData

Get the data from this field

Declaration

Source position: line 0

function TField.GetData(

  Buffer: Pointer

):Boolean; overload;

function TField.GetData(

  Buffer: Pointer;

  NativeFormat: Boolean

):Boolean; overload;

Arguments

Buffer

Buffer to store field contents in.

Function result

True if data is available.

Arguments

Buffer | Buffer to store field contents in.
NativeFormat | Return date/time values in native (TDateTime) format.

Description

GetData is used internally by TField to fetch the value of the data of this field into the data buffer pointed to by Buffer. If it returns False if the field has no value (i.e. is Null). If the NativeFormat parameter is true, then date/time formats should use the TDateTime format. It should not be necessary to use this method, instead use the various 'AsXXX' methods to access the data.

Errors

No validity checks are performed on Buffer: it should point to a valid memory area, and should be large enough to contain the value of the field. Failure to provide a buffer that matches these criteria will result in an exception.

See also

TField.IsNull | Is the field empty
TField.SetData | Save the field data
TField.Value | Value of the field as a variant value


TField.HasConstraints

Does the field have any constraints defined

Declaration

Source position: db.pas line 431

published property TField.HasConstraints: Boolean
  read FHasConstraints;

Description

HasConstraints will contain True if one of the CustomConstraint or ImportedConstraint properties is set to a non-empty value.

See also

CustomConstraint | Custom constraint for the field's value
ImportedConstraint | Constraint for the field value on the level of the underlying database


TField.ImportedConstraint

Constraint for the field value on the level of the underlying database

Declaration

Source position: db.pas line 433

published property TField.ImportedConstraint:
  read FImportedConstraint
  write FImportedConstraint;

Description

ImportedConstraint contains any constraints that the underlying data engine imposes on the values of a field (usually in an SQL CONSTRAINT) clause. Whether this field is filled with appropriate data depends on the implementation of the TDataset descendent.

See also

TField.CustomConstraint | Custom constraint for the field's value
TDataset | Base class for records-based data-access
TField.ConstraintErrorMessage | Message to display if the CustomConstraint constraint is violated.


TField.Index

Index of the field in the list of fields

Declaration

Source position: db.pas line 432

published property TField.Index: LongInt
  read GetIndex
  write SetIndex;

Description

Index is the name of the field in the list of fields of a dataset. It is, in general, the (0-based) position of the field in the underlying datas structures, but this need not always be so. The TField.FieldNo property should be used for that.

See also

TField.FieldNo

Number of the field in the record


TField.IsBlob

Is the field a BLOB field (untyped data of indeterminate size).

Declaration

Source position: db.pas line 380

public class function TField.IsBlob: Boolean; virtual;

Function result

True if the field is a BLOB field, False otherwise.

Description

IsBlob returns True if the field is one of the blob field types. The TField implementation returns false. Only one of the blob-type field classes override this function and let it return True.

Errors

None.

See also

TBlobField.IsBlob

Is the field a blob field


TField.IsIndexField

Is the field an indexed field ?

Declaration

Source position: db.pas line 411

public property TField.IsIndexField: Boolean
  read FIsIndexField;

Description

IsIndexField is true if the field is an indexed field. By default this property is False, descendents of TDataset can change this to True.

See also

TField.Calculated

Is the field a calculated field ?


TField.IsNull

Is the field empty

Declaration

Source position: db.pas line 412

public property TField.IsNull: Boolean
  read GetIsNull;

Description

IsNull is True if the field does not have a value. If the underlying data contained a value, or a value is written to it, IsNull will return False. After TDataset.Insert is called or Clear is called then IsNull will return True.

See also

TField.Clear | Clear the field contents.
TDataset.Insert | Insert a new record at the current position.


TField.IsValidChar

Check whether a character is valid input for the field

Declaration

Source position: db.pas line 381

public function TField.IsValidChar(

  InputChar: Char

):Boolean; virtual;

Arguments

InputChar

Character to check

Function result

True if InputChar is in the set ValidChars.

Description

IsValidChar checks whether InputChar is a valid characters for the current field. It does this by checking whether InputChar is in the set of characters sepcified by the TField.ValidChars property. The ValidChars property will be initialized to a correct set of characters by descendent classes. For instance, a numerical field will only accept numerical characters and the sign and decimal separator characters.

Descendent classes can override this method to provide custom checks. The ValidChars property can be set to restrict the list of valid characters to a subset of what would normally be available.

See also

TField.ValidChars

Characters that are valid input for the field's content


TField.KeyFields

Key fields to use when looking up a field value.

Declaration

Source position: db.pas line 434

published property TField.KeyFields:
  read FKeyFields
  write FKeyFields;

Description

KeyFields should contain a semi-colon separated list of field names from the lookupfield's dataset which will be matched to the fields enumerated in LookupKeyFields in the dataset pointed to by the LookupDataset property.

See also

LookupKeyFields | Names of fields on which to perform a locate
LookupDataset | Dataset with lookup values


TField.Lookup

Is the field a lookup field

Declaration

Source position: db.pas line 413

public property TField.Lookup: Boolean
  read GetLookup
  write SetLookup;

Description

Lookup is True if the FieldKind equals fkLookup, False otherwise. Setting the Lookup property will switch the FieldKind between the fkLookup and fkData.

See also

TField.FieldKind

The kind of field.


TField.LookupCache

Should lookup values be cached

Declaration

Source position: db.pas line 435

published property TField.LookupCache: Boolean
  read FLookupCache
  write FLookupCache;

Description

LookupCache is by default False. If it is set to True then a list of key, value pairs will be created from the LookupKeyFields in the dataset pointed to by the LookupDataset property. The list of key, value pairs is available through the TField.LookupList property.

See also

LookupKeyFields | Names of fields on which to perform a locate
LookupDataset | Dataset with lookup values
TField.LookupList | List of lookup values


TField.LookupDataSet

Dataset with lookup values

Declaration

Source position: db.pas line 436

published property TField.LookupDataSet: TDataSet
  read FLookupDataSet
  write FLookupDataSet;

Description

LookupDataset is used by lookup fields to fetch the field's value. The LookupKeyFields property is used as a list of fields to locate a record in this dataset, and the value of the LookupResultField field is then used as the value of the lookup field.

See also

KeyFields | Key fields to use when looking up a field value.
LookupKeyFields | Names of fields on which to perform a locate
LookupResultField | Name of field to use as lookup value
LookupCache | Should lookup values be cached


TField.LookupKeyFields

Names of fields on which to perform a locate

Declaration

Source position: db.pas line 437

published property TField.LookupKeyFields:
  read FLookupKeyFields
  write FLookupKeyFields;

Description

LookupKeyFields should contain a semi-colon separated list of field names from the dataset pointed to by the LookupDataset property. These fields will be used when locating a record corresponding to the values in the TField.KeyFields property.

See also

KeyFields | Key fields to use when looking up a field value.
LookupDataset | Dataset with lookup values
LookupResultField | Name of field to use as lookup value
LookupCache | Should lookup values be cached


TField.LookupList

List of lookup values

Declaration

Source position: db.pas line 421

public property TField.LookupList: TLookupList
  read GetLookupList;

Description

LookupList contains the list of key, value pairs used when caching the possible lookup values for a lookup field. The list is only valid when the LookupCache property is set to True. It can be refreshed using the RefreshLookupList method.

See also

TField.RefreshLookupList | Refresh the lookup list
TField.LookupCache | Should lookup values be cached


TField.LookupResultField

Name of field to use as lookup value

Declaration

Source position: db.pas line 438

published property TField.LookupResultField:
  read FLookupResultField
  write FLookupResultField;

Description

LookupResultField contains the field name from a field in the dataset pointed to by the LookupDataset property. The value of this field will be used as the lookup's field value when a record is found in the lookup dataset as result for the lookup field value.

See also

KeyFields | Key fields to use when looking up a field value.
LookupDataset | Dataset with lookup values
LookupKeyFields | Names of fields on which to perform a locate
LookupCache | Should lookup values be cached


TField.NewValue

The new value of the field

Declaration

Source position: db.pas line 414

public property TField.NewValue: Variant
  read GetNewValue
  write SetNewValue;

Description

NewValue returns the new value of the field. The FPC implementation of TDataset does not yet support this.

See also

TField.Value | Value of the field as a variant value
TField.CurValue | Current value of the field


TField.Offset

Offset of the field's value in the dataset buffer

Declaration

Source position: db.pas line 415

public property TField.Offset: Word
  read FOffset;

Description

Offset is the location of the field's contents in the dataset memory buffer. It is read-only and initialized by the dataset when it is opened.

See also

TField.FieldNo | Number of the field in the record
TField.Index | Index of the field in the list of fields
TField.Datasize | Size of the field's data


TField.OldValue

Old value of the field

Declaration

Source position: db.pas line 420

public property TField.OldValue: variant
  read GetOldValue;

Description

OldValue returns the value of the field prior to an edit operation. This feature is currently not supported in FPC.

See also

TField.Value | Value of the field as a variant value
TField.CurValue | Current value of the field
TField.NewValue | The new value of the field


TField.OnChange

Event triggerd when the field's value has changed

Declaration

Source position: db.pas line 444

published property TField.OnChange: TFieldNotifyEvent
  read FOnChange
  write FOnChange;

Description

OnChange is triggered whenever the field's value has been changed. It is triggered only after the new contents have been written to the dataset buffer, so it can be used to react to changes in the field's content. To prevent the writing of changes to the buffer, use the TField.OnValidate event. It is not allowed to change the state of the dataset or the contents of the field during the execution of this event handler: doing so may lead to infinite loops and other unexpected results.

See also

TField.OnChange

Event triggerd when the field's value has changed


TField.OnGetText

Event to format the field's content

Declaration

Source position: db.pas line 445

published property TField.OnGetText: TFieldGetTextEvent
  read FOnGetText
  write FOnGetText;

Description

OnGetText is triggered whenever the TField.Text or TField.DisplayText properties are read. It can be used to return a custom formatted string in the AText parameter which will then typically be used by a control to display the field's contents to the user. It is not allowed to change the state of the dataset or the contents of the field during the execution of this event handler.

See also

TField.Text | Text representation of the field
TField.DisplayText | Formatted field value
TField.OnSetText | Event to set the field's content based on a user-formatted string
TFieldGetTextEvent | Event handler to get field content


TField.OnSetText

Event to set the field's content based on a user-formatted string

Declaration

Source position: db.pas line 446

published property TField.OnSetText: TFieldSetTextEvent
  read FOnSetText
  write FOnSetText;

Description

OnSetText is called whenever the TField.Text property is written. It can be used to set the actual value of the field based on the passed AText parameter. Typically, this event handler will perform the inverse operation of the TField.OnGetText handler, if it exists.

See also

TField.Text | Text representation of the field
TField.OnGetText | Event to format the field's content
TFieldGetTextEvent | Event handler to get field content


TField.OnValidate

Event to validate the value of a field before it is written to the data buffer

Declaration

Source position: db.pas line 447

published property TField.OnValidate: TFieldNotifyEvent
  read FOnValidate
  write FOnValidate;

Description

OnValidate is called prior to writing a new field value to the dataset's data buffer. It can be used to prevent writing the new value to the buffer by raising an exception in the event handler. Note that this event handler is always called, irrespective of the way the value of the field is set.

See also

TField.Text | Text representation of the field
TField.OnGetText | Event to format the field's content
TField.OnSetText | Event to set the field's content based on a user-formatted string
TField.OnChange | Event triggerd when the field's value has changed


TField.Origin

Original fieldname of the field.

Declaration

Source position: db.pas line 439

published property TField.Origin:
  read FOrigin
  write FOrigin;

Description

Origin contains the origin of the field in the form TableName.fieldName. This property is filled only if the TDataset descendent or the database engine support retrieval of this property. It can be used to autmatically create update statements, together with the TField.ProviderFlags property.

See also

TDataset | Base class for records-based data-access
TField.ProviderFlags | Flags for provider or update support


TField.ProviderFlags

Flags for provider or update support

Declaration

Source position: db.pas line 440

published property TField.ProviderFlags: TProviderFlags
  read FProviderFlags
  write FProviderFlags;

Description

ProviderFlags contains a set of flags that can be used by engines that automatically generate update SQL statements or update data packets. The various items in the set tell the engine whether the key is a key field, should be used in the where clause of an update statement or whether - in fact - it should be updated at all.

These properties should be set by the programmer so engines such as SQLDB can create correct update SQL statements whenever they need to post changes to the database. Note that to be able to set these properties in a designer, persistent fields must be created.

See also

TField.Origin

Original fieldname of the field.


TField.ReadOnly

Is the field read-only

Declaration

Source position: db.pas line 441

published property TField.ReadOnly: Boolean
  read FReadOnly
  write SetReadOnly;

Description

ReadOnly can be set to True to prevent controls of writing data to the field, effectively making it a read-only field. Setting this property to True does not prevent the field from getting a value through code: it is just an indication for GUI controls that the field's value is considered read-only.

See also

TFieldDef.Attributes

Additional attributes of the field.


TField.RefreshLookupList

Refresh the lookup list

Declaration

Source position: db.pas line 382

public procedure TField.RefreshLookupList;

Description

RefreshLookupList fills the lookup list for a lookup fields with all key, value pairs found in the lookup dataset. It will open the lookup dataset if needed. The lookup list is only used if the TField.LookupCache property is set to True.

Errors

If the values of the various lookup properties is not correct or the lookup dataset cannot be opened, then an exception will be raised.

See also

LookupDataset | Dataset with lookup values
LookupKeyFields | Names of fields on which to perform a locate
LookupResultField | Name of field to use as lookup value


TField.Required

Does the field require a value

Declaration

Source position: db.pas line 442

published property TField.Required: Boolean
  read FRequired
  write FRequired;

Description

Required determines whether the field needs a value when posting the data: when a dataset posts the changed made to a record (new or existing), it will check whether all fields with the Required property have a value assigned to them. If not, an exception will be raised. Descendents of TDataset will set the property to True when opening the dataset, depending on whether the field is required in the underlying data engine. For fields that are not required by the database engine, the programmer can still set the property to True if the business logic requires a field.

See also

TDataset.Open | Activate the dataset: Fetch data into memory.
ReadOnly | Is the field read-only
Visible | Should the field be shown in grids


TField.SetData

Save the field data

Declaration

Source position: line 0

procedure TField.SetData(

  Buffer: Pointer

); overload;

procedure TField.SetData(

  Buffer: Pointer;

  NativeFormat: Boolean

); overload;

Arguments

Buffer

Buffer to copy field value from

Arguments

Buffer | Buffer to copy field value from
NativeFormat | Is the provided data in native format

Description

SetData saves the value of the field data in Buffer to the dataset internal buffer. The Buffer pointer should point to a memory buffer containing the data for the field in the correct format. If the NativeFormat parameter is true, then date/time formats should use the TDateTime format.

There should normally not be any need to call SetData directly: it is called by the various setter methods of the AsXXX properties of TField.

Errors

No validity checks are performed on Buffer: it should point to a valid memory area, and should be large enough to contain the value of the field. Failure to provide a buffer that matches these criteria will result in an exception.

See also

TField.GetData | Get the data from this field
TField.Value | Value of the field as a variant value


TField.SetFieldType

Set the field data type

Declaration

Source position: db.pas line 385

public procedure TField.SetFieldType(

  AValue: TFieldType

); virtual;

Arguments

AValue

DataType for the field

Description

SetFieldType does nothing, but it can be overridden by descendent classes to provide special handling when the field type is set.

See also

TField.DataType

The data type of the field.


TField.Size

Logical size of the field

Declaration

Source position: db.pas line 416

public property TField.Size: Integer
  read FSize
  write SetSize;

Description

Size is the declared size of the field for datatypes that can have variable size, such as string types, BCD types or array types. To get the size of the storage needed to store the field's content, the DataSize should be used. For blob fields, the current size of the


TField.Text

Text representation of the field

Declaration

Source position: db.pas line 417

public property TField.Text:
  read GetEditText
  write SetEditText;

Description

Text can be used to retrieve or set the value of the value as a string value for editing purposes. It will trigger the TField.OnGetText event handler if a handler was specified. For display purposes, the TField.DisplayText property should be used. Controls that should display the value in a textual format should use text whenever they must display the text for editing purposes. Inversely, when a control should save the value entered by the user, it should write the contents to the Text property, not the AsString property, this will invoke the Tfield.OnSetText event handler, if one is set.

See also

TField.AsString | Access the field's contents as an AnsiString value.
TField.DisplayText | Formatted field value
TField.Value | Value of the field as a variant value


TField.Validate

Validate the data buffer

Declaration

Source position: db.pas line 386

public procedure TField.Validate(

  Buffer: Pointer

);

Arguments

Buffer

Buffer with the data to be validated

Description

Validate is called by SetData prior to writing the data from Buffer to the dataset buffer. It will call the TField.OnValidate event handler, if one is set, to allow the application programmer to program additional checks.

See also

TField.SetData | Save the field data
TField.OnValidate | Event to validate the value of a field before it is written to the data buffer


TField.ValidChars

Characters that are valid input for the field's content

Declaration

Source position: db.pas line 418

public property TField.ValidChars: TFieldChars
  read FValidChars;

Description

ValidChars is a property that is initialized by descendent classes to contain the set of characters that can be entered in an edit control which is used to edit the field. Numerical fields will set this to a set of numerical characters, string fields will set this to all possible characters. It is possible to restrict the possible input by setting this property to a subset of all possible characters (for example, set it to all uppercase letters to allow the user to enter only uppercase characters. TField itself does not enforce the validity of the data when the content of the field is set, an edit control should check the validity of the user input by means of the IsValidChar function.

See also

TField.IsValidChar

Check whether a character is valid input for the field


TField.Value

Value of the field as a variant value

Declaration

Source position: db.pas line 419

public property TField.Value: variant
  read GetAsVariant
  write SetAsVariant;

Description

Value can be used to read or write the value of the field as a Variant value. When setting the value, the value will be converted to the actual type of the field as defined in the underlying data. Likewise, when reading the value property, the actual field value will be converted to a variant value. If the field does not contain a value (when IsNull returns True), then Value will contain Null.

It is not recommended to use the Value property: it should only be used when the type of the field is unknown. If the type of the field is known, it is better to use one of the AsXXX properties, which will not only result in faster code, but will also avoid strange type conversions.

See also

TField.IsNull | Is the field empty
TField.Text | Text representation of the field
TField.DisplayText | Formatted field value


TField.Visible

Should the field be shown in grids

Declaration

Source position: db.pas line 443

published property TField.Visible: Boolean
  read FVisible
  write SetVisible
  default true;

Description

Visible can be used to hide fields from a grid when displaying data to the user. Invisible fields will by default not be shown in the grid.

See also

TField.ReadOnly | Is the field read-only
TField.Required | Does the field require a value


TFieldAttribute

Field attributes

Declaration

Source position: db.pas line 133

type TFieldAttribute = (
faHiddenCol, | Field is a hidden column (used to construct a unique key)
faReadonly, | Field is read-only
faRequired, | Field is required
faLink, | Field is a link field for other datasets
faUnNamed, | Field has no original name
faFixed | Fixed length field
);

Description

TFieldAttribute is used to denote some attributes of a field in a database. It is used in the Attributes property of TFieldDef.

See also

TFieldAttributes | Set of TFieldAttribute values.
TFieldDef.Attributes | Additional attributes of the field.


TFieldAttributes

Set of TFieldAttribute values.

Declaration

Source position: db.pas line 134

type TFieldAttributes = set of (
faHiddenCol, | Field is a hidden column (used to construct a unique key)
faReadonly, | Field is read-only
faRequired, | Field is required
faLink, | Field is a link field for other datasets
faUnNamed, | Field has no original name
faFixed | Fixed length field
);

Description

TFieldAttributes is used in the TFieldDef.Attributes property to denote additional attributes of the underlying field.

See also

TFieldDef.Attributes

Additional attributes of the field.


TFieldChars

Set of valid characters for the field contents

Declaration

Source position: db.pas line 236

type TFieldChars = set of Char;

Description

TFieldChars is a type used in the TField.ValidChars property. It's a simple set of characters.

See also

TField.ValidChars

Characters that are valid input for the field's content


TFieldClass

Declaration

Source position: db.pas line 101

type TFieldClass = class of TField;


TFieldDef

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to describe one field in a record in a dataset

Declaration

Source position: db.pas line 169

type TFieldDef = class(TNamedItem)
procedure Create(); | Constructor for TFieldDef.
public
destructor Destroy; override; | Free the TFieldDef instance
procedure Assign(); override; | Assign the contents of one TFieldDef instance to another.
function CreateField(); | Create TField instance based on definitions in current TFieldDef instance.
property FieldClass: TFieldClass; [r] | TField class used for this fielddef
property FieldNo: LongInt; [r] | Field number
property InternalCalcField: Boolean; [rw] | Is this a definition of an internally calculated field ?
property Required: Boolean; [rw] | Is the field required ?
published
property Attributes: TFieldAttributes; [rw] | Additional attributes of the field.
property DataType: TFieldType; [rw] | Data type for the field
property Precision: LongInt; [rw] | Precision used in BCD (Binary Coded Decimal) fields
property Size: Integer; [rw] | Size of the buffer needed to store the data of the field
end;

Inheritance

TFieldDef | Class to describe one field in a record in a dataset
|
TNamedItem | Named collection item
|
TCollectionItem
|
TPersistent
|
TObject

Description

TFieldDef is used to describe the fields that are present in the data underlying the dataset. For each field in the underlying field, an TFieldDef instance is created when the dataset is opened. This class offers almost no methods, it is mainly a storage class, to store all relevant properties of fields in a record (name, data type, size, required or not, etc.)

See also

TDataset.FieldDefs | Definitions of available fields in the underlying database
TFieldDefs | Collection of TFieldDef instances.


TFieldDef
 | ro | FieldClass
 | ro | FieldNo
 |  | InternalCalcField
 |  | Required
pl |  | Attributes
pl |  | DataType
pl |  | Precision
pl |  | Size
TNamedItem
 |  | DisplayName
pl |  | Name
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


pl |  | Attributes (TFieldDef)
 |  | Collection (TCollectionItem)
pl |  | DataType (TFieldDef)
 |  | DisplayName (TCollectionItem)
 |  | DisplayName (TNamedItem)
 | ro | FieldClass (TFieldDef)
 | ro | FieldNo (TFieldDef)
 | ro | ID (TCollectionItem)
 |  | Index (TCollectionItem)
 |  | InternalCalcField (TFieldDef)
pl |  | Name (TNamedItem)
pl |  | Precision (TFieldDef)
 |  | Required (TFieldDef)
pl |  | Size (TFieldDef)
 | ro | UpdateCount (TCollectionItem)


TFieldDef
 | Create
 | Destroy
 | Assign
 | CreateField
TNamedItem
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

Changed (TCollectionItem)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TCollectionItem)

Create (TFieldDef)

CreateField (TFieldDef)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TCollectionItem)

Destroy (TFieldDef)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetDisplayName (TCollectionItem)

GetHashCode (TObject)

GetIndex (TCollectionItem)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TCollectionItem)

GetOwner (TPersistent)

GetOwner (TCollectionItem)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SetCollection (TCollectionItem)

SetDisplayName (TCollectionItem)

SetIndex (TCollectionItem)


TFieldDef

TNamedItem

TCollectionItem

TPersistent

TObject


TFieldDef.Assign

Assign the contents of one TFieldDef instance to another.

Declaration

Source position: db.pas line 189

public procedure TFieldDef.Assign(

  APersistent: TPersistent

); override;

Arguments

APersistent

TFieldDef instance to copy data from.

Description

Assign assigns all published properties of APersistent to the current instance, if APersistent is an instance of class TFieldDef.

Errors

If APersistent is not of class TFieldDef, then an exception will be raised.


TFieldDef.Attributes

Additional attributes of the field.

Declaration

Source position: db.pas line 196

published property TFieldDef.Attributes: TFieldAttributes
  read FAttributes
  write SetAttributes
  default [];

Description

Attributes contain additional attributes of the field. It shares the faRequired attribute with the Required property.

See also

TFieldDef.Required

Is the field required ?


TFieldDef.Create

Constructor for TFieldDef.

Declaration

Source position: line 0

constructor TFieldDef.create(

  ACollection: TCollection

); override;

constructor TFieldDef.Create(

  AOwner: TFieldDefs;

  const AName: ;

  ADataType: TFieldType;

  ASize: Integer;

  ARequired: Boolean;

  AFieldNo: LongInt

); overload;

Arguments

ACollection

TFieldDefs instance to which to append the definition, or Nil

Arguments

AOwner | Owner of the fielddef.
AName | Name of the field
ADataType | Data type of the field
ASize | Storage size for the field contents, or zero for fixed-size fields
ARequired | Is the fields required or not
AFieldNo | Number of the field

Description

Create is the constructor for the TFieldDef class.

If a simple call is used, with a single argument ACollection, the inherited Create is called and the Field number is set to the incremented current index.

If the more complicated call is used, with multiple arguments, then after the inherited Create call, the Name, datatype, size, precision, FieldNo and the Required property are all set according to the passsed arguments.

Errors

If a duplicate name is passed, then an exception will occur.

See also

Name
datatype | Data type for the field
size | Size of the buffer needed to store the data of the field
precision | Precision used in BCD (Binary Coded Decimal) fields
FieldNo | Field number
Required | Is the field required ?


TFieldDef.CreateField

Create TField instance based on definitions in current TFieldDef instance.

Declaration

Source position: db.pas line 190

public function TFieldDef.CreateField(

  AOwner: TComponent

):TField;

Arguments

AOwner

Owner for the new TField instance.

Function result

Instance of TField corresponding to the field definition

Description

CreateField determines, based on the DataType what TField descendent it should create, and then returns a newly created instance of this class. It sets the appropriate defaults for the Size, FieldName, FieldNo, Precision, ReadOnly and Required properties of the newly created instance. It should nver be necessary to use this call in an end-user program, only TDataset descendent classes should use this call.

The newly created field is owned by the component instance passed in the AOwner parameter.

The DefaultFieldClasses array is used to determine which TField Descendent class should be used when creating the TField instance, but descendents of TDataset may override the values in that array.

See also

DefaultFieldClasses | Default field classes to use when creating a new TField instance.
TField | Provide access to the contents of a single field in a record


TFieldDef.DataType

Data type for the field

Declaration

Source position: db.pas line 197

published property TFieldDef.DataType: TFieldType
  read FDataType
  write SetDataType;

Description

DataType contains the data type of the field's contents. Based on this property, the FieldClass property determines what kind of field class mustbe used to represent this field.

See also

TFieldDef.FieldClass | TField class used for this fielddef
TFieldDef.CreateField | Create TField instance based on definitions in current TFieldDef instance.


TFieldDef.Destroy

Free the TFieldDef instance

Declaration

Source position: db.pas line 188

public destructor TFieldDef.Destroy; override;

Description

Destroy destroys the TFieldDef instance. It simply calls the inherited destructor.

See also

TFieldDef.Create

Constructor for TFieldDef.


TFieldDef.FieldClass

TField class used for this fielddef

Declaration

Source position: db.pas line 191

public property TFieldDef.FieldClass: TFieldClass
  read GetFieldClass;

Description

FieldClass is the class of the TField instance that is created by the CreateField class. The return value is retrieved from the TDataset instance the TFieldDef instance is associated with. If there is no TDataset instance available, the return value is Nil

See also

TDataset | Base class for records-based data-access
CreateField | Create TField instance based on definitions in current TFieldDef instance.
TField | Provide access to the contents of a single field in a record


TFieldDef.FieldNo

Field number

Declaration

Source position: db.pas line 192

public property TFieldDef.FieldNo: LongInt
  read FFieldNo;

Description

FieldNo is the number of the field in the data structure where the dataset contents comes from, for instance in a DBase file. If the underlying data layer does not support the concept of field number, a sequential number is assigned.


TFieldDef.InternalCalcField

Is this a definition of an internally calculated field ?

Declaration

Source position: db.pas line 193

public property TFieldDef.InternalCalcField: Boolean
  read FInternalCalcField
  write FInternalCalcField;

Description

Internalcalc is True if the fielddef instance represents an internally calculated field: for internally calculated fields, storage must be rovided by the underlying data mechanism.


TFieldDef.Precision

Precision used in BCD (Binary Coded Decimal) fields

Declaration

Source position: db.pas line 198

published property TFieldDef.Precision: LongInt
  read FPrecision
  write SetPrecision;

Description

Precision is the number of digits used in a BCD (Binary Coded Decimal) field. It is not the number of digits after the decimal separator, but the total number of digits.

See also

TFieldDef.Size

Size of the buffer needed to store the data of the field


TFieldDef.Required

Is the field required ?

Declaration

Source position: db.pas line 194

public property TFieldDef.Required: Boolean
  read FRequired
  write SetRequired;

Description

Required is set to True if the field requires a value when posting data to the dataset. If no value was entered, the dataset will raise an excepion when the record is posted. The Required property is usually initialized based on the definition of the field in the underlying database. For SQL-based databases, a field declared as NOT NULL will result in a Required property of True.


TFieldDef.Size

Size of the buffer needed to store the data of the field

Declaration

Source position: db.pas line 199

published property TFieldDef.Size: Integer
  read FSize
  write SetSize;

Description

Size indicates the size of the buffer needed to hold data for the field. For types with a fixed size (such as integer, word or data/time) the size can be zero: the buffer mechaism reserves automatically enough heap memory. For types which can have various sizes (blobs, string types, BCD types), the Size property tells the buffer mechanism how many bytes are needed to hold the data for the field.

See also

TFieldDef.Precision | Precision used in BCD (Binary Coded Decimal) fields
TFieldDef.DataType | Data type for the field


TFieldDefs

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection of TFieldDef instances.

Declaration

Source position: db.pas line 204

type TFieldDefs = class(TDefCollection)
public
constructor Create(); | Create a new instance of TFieldDefs
public
procedure Add(); | Add a new field definition to the collection.
public
function AddFieldDef; | Add new TFieldDef
procedure Assign(); overload; | Copy all items from one dataset to another
function Find(); | Find item by name
procedure Update; overload; | Force update of definitions
function MakeNameUnique(); virtual; | Create a unique field name starting from a base name
property HiddenFields: Boolean; [rw] | Should field instances be created for hidden fields
property Items: TFieldDef; default; [rw] | Indexed access to the fielddef instances
end;

Inheritance

TFieldDefs | Collection of TFieldDef instances.
|
TDefCollection | Definition collection
|
TOwnedCollection
|
TCollection
|
TPersistent
|
TObject

Description

TFieldDefs is used by each TDataset instance to keep a description of the data that it manages; for each field in a record that makes up the underlying data, the TFieldDefs instance keeps an instance of TFieldDef that describes the field's contents. For any internally calculated fields of the dataset, a TFieldDef instance is kept as well. This collection is filled by descendent classes of TDataset as soon as the dataset is opened; it is cleared when the dataset closes. After the collection was populated, the dataset creates TField instances based on all the definitions in the collections. If persistent fields were used, the contents of the fielddefs collection is compared to the field components that are present in the dataset. If the collection contains more field definitions than Field components, these extra fields will not be available in the dataset.

See also

TFieldDef | Class to describe one field in a record in a dataset
TDataset | Base class for records-based data-access


TFieldDefs
 |  | HiddenFields
 |  | Items
TDefCollection
 | ro | Dataset
 |  | Updated
TOwnedCollection
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
ro | Dataset (TDefCollection)
 | HiddenFields (TFieldDefs)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | Items (TFieldDefs)
 | PropName (TCollection)
ro | UpdateCount (TCollection)


TFieldDefs
 | Create
 | Add
 | AddFieldDef
 | Assign
 | Find
 | Update
 | MakeNameUnique
TDefCollection
 | create
 | Find
 | GetItemNames
 | IndexOf
TOwnedCollection
 | GetOwner
 | Create
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

Add (TFieldDefs)

AddFieldDef (TFieldDefs)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

Assign (TFieldDefs)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

Create (TOwnedCollection)

create (TDefCollection)

Create (TFieldDefs)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

Find (TDefCollection)

Find (TFieldDefs)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetItemNames (TDefCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetOwner (TOwnedCollection)

GetPropName (TCollection)

IndexOf (TDefCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

MakeNameUnique (TFieldDefs)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TFieldDefs

TDefCollection

TOwnedCollection

TCollection

TPersistent

TObject


TFieldDefs.Add

Add a new field definition to the collection.

Declaration

Source position: line 0

procedure TFieldDefs.Add(

  const AName: ;

  ADataType: TFieldType;

  ASize: Word;

  ARequired: Boolean

); overload;

procedure TFieldDefs.Add(

  const AName: ;

  ADataType: TFieldType;

  ASize: Word

); overload;

procedure TFieldDefs.Add(

  const AName: ;

  ADataType: TFieldType

); overload;

Arguments

AName | Value for the Name property of the new item.
ADataType | Value for the DataType property of the new item.
ASize | Value for the Size property of the new item.
ARequired | Value for the Required property of the new item.

Arguments

AName | Value for the Name property of the new item.
ADataType | Value for the DataType property of the new item.
ASize | Value for the Size property of the new item.

Arguments

AName | Value for the Name property of the new item.
ADataType | Value for the DataType property of the new item.

Description

Add adds a new item to the collection and fills in the Name, DataType, Size and Required properties of the newly added item with the provided parameters.

Errors

If an item with name AName already exists in the collection, then an exception will be raised.

See also

TFieldDefs.AddFieldDef

Add new TFieldDef


TFieldDefs.AddFieldDef

Add new TFieldDef

Declaration

Source position: db.pas line 215

public function TFieldDefs.AddFieldDef: TFieldDef;

Function result

Newly created TFieldDef instance.

Description

AddFieldDef creates a new TFieldDef item and returns the instance.

See also

TFieldDefs.Add

Add a new field definition to the collection.


TFieldDefs.Assign

Copy all items from one dataset to another

Declaration

Source position: db.pas line 216

public procedure TFieldDefs.Assign(

  FieldDefs: TFieldDefs

); overload;

Arguments

FieldDefs

FieldDefs to copy items from

Description

Assign simply calls inherited Assign with the FieldDefs argument.

See also

TFieldDef.Assign

Assign the contents of one TFieldDef instance to another.


TFieldDefs.Create

Create a new instance of TFieldDefs

Declaration

Source position: db.pas line 210

public constructor TFieldDefs.Create(

  ADataSet: TDataSet

);

Arguments

ADataSet

Dataset for which to maintain field definitions.

Description

Create is used to create a new instance of TFieldDefs. The ADataset argument contains the dataset instance for which the collection contains the field definitions.

See also

TFieldDef | Class to describe one field in a record in a dataset
TDataset | Base class for records-based data-access


TFieldDefs.Find

Find item by name

Declaration

Source position: db.pas line 217

public function TFieldDefs.Find(

  const AName:

):TFieldDef;

Arguments

AName

Name to search for

Function result

TFieldDef instance with name AName or Nil

Description

Find simply calls the inherited TDefCollection.Find to find an item with name AName and typecasts the result to TFieldDef.

See also

TDefCollection.Find | Find an item by name
TNamedItem.Name | Name of the item


TFieldDefs.HiddenFields

Should field instances be created for hidden fields

Declaration

Source position: db.pas line 222

public property TFieldDefs.HiddenFields: Boolean
  read FHiddenFields
  write FHiddenFields;

Description

HiddenFields determines whether a field is created for fielddefs that have the faHiddenCol attribute set. If set to False (the default) then no TField instances will be created for hidden fields. If it is set to True, then a TField instance will be created for hidden fields.

See also

TFieldDef.Attributes

Additional attributes of the field.


TFieldDefs.Items

Indexed access to the fielddef instances

Declaration

Source position: db.pas line 223

public property TFieldDefs.Items: TFieldDef
  read GetItem
  write SetItem;
  default;

Description

Items provides zero-based indexed access to all TFieldDef instances in the collection. The index must vary between 0 and Count-1, or an exception will be raised.

See also

TFieldDef

Class to describe one field in a record in a dataset


TFieldDefs.MakeNameUnique

Create a unique field name starting from a base name

Declaration

Source position: db.pas line 221

public function TFieldDefs.MakeNameUnique(

  const AName:

):; virtual;

Arguments

AName

Start of fieldname.

Function result

Unique name, based on AName

Description

MakeNameUnique uses AName to construct a name of a field that is not yet in the collection. If AName is not yet in the collection, then AName is returned. if a field definition with field name equal to AName already exists, then a new name is constructed by appending a sequence number to AName till the resulting name does not appear in the list of field definitions.

See also

TFieldDefs.Find

Find item by name

TFieldDef.Name


TFieldDefs.Update

Force update of definitions

Declaration

Source position: db.pas line 220

public procedure TFieldDefs.Update; overload;

Description

Update notifies the dataset that the field definitions are updated, if it was not yet notified.

See also

TDefCollection.Updated

Has one of the items been changed


Tfields

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection of #fcl.db.TField instances

Declaration

Source position: db.pas line 1067

type Tfields = class(TObject)
public
constructor Create(); | Create a new instance of TFields
destructor Destroy; override; | Free the TFields instance
procedure Add(); | Add a new field to the list
procedure CheckFieldName(); | Check field name for duplicate entries
procedure CheckFieldNames(); | Check a list of field names for duplicate entries
procedure Clear; | Clear the list of fields
function FindField(); | Find a field based on its name
function FieldByName(); | Find a field based on its name
function FieldByNumber(); | Search field based on its fieldnumber
function GetEnumerator; | Return an enumerator for the for..in construct
procedure GetFieldNames(); | Get the list of fieldnames
function IndexOf(); | Return the index of a field instance
procedure Remove(); | Remove an instance from the list
property Count: Integer; [r] | Number of fields in the list
property Dataset: TDataSet; [r] | Dataset the fields belong to
property Fields: TField; default; [rw] | Indexed access to the fields in the list
end;

Inheritance

Tfields

Collection of #fcl.db.TField instances
|

TObject

Description

TFields mimics a TCollection class for the Fields property of TDataset instance. Since TField is a descendent of TComponent, it cannot be an item of a collection, and must be managed by another class.

See also

TField | Provide access to the contents of a single field in a record
TDataset | Base class for records-based data-access
TDataset.Fields | Indexed access to the fields of the dataset.


Tfields
 | ro | Count
 | ro | Dataset
 |  | Fields
TObject


ro | Count (Tfields)
ro |


Tfields
 | Create
 | Destroy
 | Add
 | CheckFieldName
 | CheckFieldNames
 | Clear
 | FindField
 | FieldByName
 | FieldByNumber
 | GetEnumerator
 | GetFieldNames
 | IndexOf
 | Remove
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (Tfields)

AfterConstruction (TObject)

BeforeDestruction (TObject)

CheckFieldName (Tfields)

CheckFieldNames (Tfields)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (Tfields)

Create (TObject)

Create (Tfields)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (Tfields)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

FieldByName (Tfields)

FieldByNumber (Tfields)

FindField (Tfields)

Free (TObject)

FreeInstance (TObject)

GetEnumerator (Tfields)

GetFieldNames (Tfields)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

IndexOf (Tfields)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Remove (Tfields)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


Tfields

TObject


Tfields.Add

Add a new field to the list

Declaration

Source position: db.pas line 1085

public procedure Tfields.Add(

  Field: TField

);

Arguments

Field

TField instance to add to the list of fields.

Description

Add must be used to add a new TField instance to the list of fields. After a TField instance is added to the list, the TFields instance will free the field instance if it is cleared.

See also

TField | Provide access to the contents of a single field in a record
TFields.Clear | Clear the list of fields


Tfields.CheckFieldName

Check field name for duplicate entries

Declaration

Source position: db.pas line 1086

public procedure Tfields.CheckFieldName(

  const Value:

);

Arguments

Value

Field name to check

Description

CheckFieldName checks whether a field with name equal to Value (case insensitive) already appears in the list of fields (using TFields.Find). If it does, then an EDatabaseError exception is raised.

See also

TField.FieldName

Name of the field

TFields.Find


Tfields.CheckFieldNames

Check a list of field names for duplicate entries

Declaration

Source position: db.pas line 1087

public procedure Tfields.CheckFieldNames(

  const Value:

);

Arguments

Value

List of field names to check

Description

CheckFieldNames splits Value in a list of fieldnames, using semicolon as a separator. For each of the fieldnames obtained in this way, it calls CheckFieldName.

Errors

Spaces are not discarded, so leaving a space after of before a fieldname will not find the fieldname, and will yield a false negative result.

See also

TField.FieldName | Name of the field
TFields.CheckFieldName | Check field name for duplicate entries
TFields.Find


Tfields.Clear

Clear the list of fields

Declaration

Source position: db.pas line 1088

public procedure Tfields.Clear;

Description

Clear removes all TField var instances from the list. All field instances are freed after they have been removed from the list.

See also

TField

Provide access to the contents of a single field in a record


Tfields.Count

Number of fields in the list

Declaration

Source position: db.pas line 1096

public property Tfields.Count: Integer
  read GetCount;

Description

Count is the number of fields in the fieldlist. The items in the Fields property are numbered from 0 to Count-1.

See also

TFields.fields

Indexed access to the fields in the list


Tfields.Create

Create a new instance of TFields

Declaration

Source position: db.pas line 1083

public constructor Tfields.Create(

  ADataset: TDataSet

);

Arguments

ADataset

Dataset for which fields must be managed.

Description

Create initializes a new instance of TFields. It stores the ADataset parameter, so it can be retrieved at any time in the TFields.Dataset property, and initializes an internal list object to store te list of fields.

See also

TDataset | Base class for records-based data-access
TFields.Dataset | Dataset the fields belong to
TField | Provide access to the contents of a single field in a record


Tfields.Dataset

Dataset the fields belong to

Declaration

Source position: db.pas line 1097

public property Tfields.Dataset: TDataSet
  read FDataset;

Description

Dataset is the dataset instance that owns the fieldlist. It is set when the TFields instance is created. This property is purely for informational purposes. When adding fields to the list, no check is performed whether the field's Dataset property matches this dataset.

See also

TFields.Create | Create a new instance of TFields
TField.Dataset | Dataset this field belongs to
TDataset | Base class for records-based data-access


Tfields.Destroy

Free the TFields instance

Declaration

Source position: db.pas line 1084

public destructor Tfields.Destroy; override;

Description

Destroy frees the field instances that it manages on behalf of the Dataset. After that it cleans up the internal structures and then calls the inherited destructor.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TFields.Clear | Clear the list of fields


Tfields.FieldByName

Find a field based on its name

Declaration

Source position: db.pas line 1090

public function Tfields.FieldByName(

  const Value:

):TField;

Arguments

Value

Fieldname to search for

Function result

Field instance with FieldName matching Value

Description

Fieldbyname searches the list of fields and returns the field instance whose FieldName property matches Value. The search is performed case-insensitively.

Errors

If no field instance is found, then an exception is raised. If this behaviour is undesired, use TField.FindField, where Nil is returned if no match is found.

See also

TFields.FindField | Find a field based on its name
TFields.FieldName
Tfields.FieldByNumber | Search field based on its fieldnumber
TFields.IndexOf | Return the index of a field instance


Tfields.FieldByNumber

Search field based on its fieldnumber

Declaration

Source position: db.pas line 1091

public function Tfields.FieldByNumber(

  FieldNo: Integer

):TField;

Arguments

FieldNo

Field number to search for

Function result

Field instance with matching FieldNo property.

Description

FieldByNumber searches for the field whose TField.FieldNo property matches the FieldNo parameter. If no such field is found, Nil is returned.

See also

TFields.FieldByName | Find a field based on its name
TFields.FindField | Find a field based on its name
TFields.IndexOf | Return the index of a field instance


Tfields.Fields

Indexed access to the fields in the list

Declaration

Source position: db.pas line 1098

public property Tfields.Fields: TField
  read GetField
  write SetField;
  default;

Description

Fields is the default property of the TFields class. It provides indexed access to the fields in the list: the index runs from 0 to Count-1.

Errors

Providing an index outside the allowed range will result in an EListError exception.

See also

TFields.FieldByName

Find a field based on its name


Tfields.FindField

Find a field based on its name

Declaration

Source position: db.pas line 1089

public function Tfields.FindField(

  const Value:

):TField;

Arguments

Value

Fieldname to search for

Function result

Field instance with FieldName matching Value

Description

FindField searches the list of fields and returns the field instance whose FieldName property matches Value. The search is performed case-insensitively. If no field instance is found, then Nil is returned.

See also

TFields.FieldByName

Find a field based on its name


Tfields.GetEnumerator

Return an enumerator for the for..in construct

Declaration

Source position: db.pas line 1092

public function Tfields.GetEnumerator: TFieldsEnumerator;

Description

GetEnumerator is the implementation of IEnumerable and returns an instance of TFieldsEnumerator

See also

TFieldsEnumerator

Default enumerator for the fields collection of a dataset.

#rtl.system.IEnumerable


Tfields.GetFieldNames

Get the list of fieldnames

Declaration

Source position: db.pas line 1093

public procedure Tfields.GetFieldNames(

  Values: TStrings

);

Arguments

Values

List to store fieldnames in

Description

GetFieldNames fills Values with the fieldnames of all the fields in the list, each item in the list contains 1 fieldname. The list is cleared prior to filling it.

See also

TField.FieldName

Name of the field


Tfields.IndexOf

Return the index of a field instance

Declaration

Source position: db.pas line 1094

public function Tfields.IndexOf(

  Field: TField

):LongInt;

Arguments

Field

Field instance to search for.

Function result

Index of Field in the list

Description

IndexOf scans the list of fields and retuns the index of the field instance in the list (it compares actual field instances, not field names). If the field does not appear in the list, -1 is returned.

See also

TFields.FieldByName | Find a field based on its name
TFields.FieldByNumber | Search field based on its fieldnumber
TFields.FindField | Find a field based on its name


Tfields.Remove

Remove an instance from the list

Declaration

Source position: db.pas line 1095

public procedure Tfields.Remove(

  Value: TField

);

Arguments

Value

Field to remove from the list.

Description

Remove removes the field Value from the list. It does not free the field after it was removed. If the field is not in the list, then nothing happens.

See also

TFields.Clear

Clear the list of fields


TFieldsEnumerator

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Default enumerator for the fields collection of a dataset.

Declaration

Source position: db.pas line 1054

type TFieldsEnumerator = class
public
constructor Create(); | Create a new instance of TFieldsEnumerator.
function MoveNext; | Move the current field to the next field in the collection.
property Current: TField; [r] | Return the current field
end;

Inheritance

TFieldsEnumerator

Default enumerator for the fields collection of a dataset.
|

TObject

Description

TFieldsEnumerator implements all the methods of IEnumerator so a TFields instance can be used in a for..in construct. TFieldsEnumerator returns all the fields in the TFields collection. Therefor the following construct is possible:

Var
  F : TField;

begin
   // ...
   For F in MyDataset.Fields do
     begin
     // F is of type TField.
     end;
   // ...

Do not create an instance of TFieldsEnumerator manually. The compiler will do all that is needed when it encounters the for..in construct.

See also

TField | Provide access to the contents of a single field in a record
TFields | Collection of #fcl.db.TField instances
#rtl.system.IEnumerator


TFieldsEnumerator

ro

Current


TFieldsEnumerator
 | Create
 | MoveNext


Create (TFieldsEnumerator)

MoveNext (TFieldsEnumerator)


TFieldsEnumerator


TFieldsEnumerator.Create

Create a new instance of TFieldsEnumerator.

Declaration

Source position: db.pas line 1060

public constructor TFieldsEnumerator.Create(

  AFields: TFields

);

Description

Create instantiates a new instance of TFieldsEnumerator. It stores the AFields reference, pointing to the TFields instance that created the enumerator. It initializes the enumerator position.


TFieldsEnumerator.Current

Return the current field

Declaration

Source position: db.pas line 1062

public property TFieldsEnumerator.Current: TField
  read GetCurrent;

Description

Current returns the current field. It will return a non-nil value only after MoveNext returned True.

See also

TFieldsEnumerator.MoveNext

Move the current field to the next field in the collection.


TFieldsEnumerator.MoveNext

Move the current field to the next field in the collection.

Declaration

Source position: db.pas line 1061

public function TFieldsEnumerator.MoveNext: Boolean;

Description

MoveNext moves the internal pointer to the next field in the fields collection, and returns True if the operation was a success. If no more fields are available, then False is returned.

See also

TFieldsEnumerator.Current

Return the current field


TFloatField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class for floating point values

Declaration

Source position: db.pas line 626

type TFloatField = class(TNumericField)
public
constructor Create(); override; | Create a new instance of the TFloatField
function CheckRange(); | Check whether a value is in the allowed range of values for the field
property Value: Double; [rw] | Value of the field as a double type
published
property Currency: Boolean; [rw] | Is the field a currency field.
property MaxValue: Double; [rw] | Maximum value for the field
property MinValue: Double; [rw] | Minimum value for the field
property Precision: LongInt; [rw] | Precision (number of digits) of the field in text representations
end;

Inheritance

TFloatField | Class for floating point values
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TFloatField is the class created when a dataset must manage floating point values of double precision. It exposes a few new properties such as Currency, MaxValue, MinValue and overrides some TField methods to work with floating point data.

It should never be necessary to create an instance of TFloatField manually, a field of this class will be instantiated automatically for each floating-point field when a dataset is opened.

See also

Currency | Is the field a currency field.
MaxValue | Maximum value for the field
MinValue | Minimum value for the field


TFloatField
 |  | Value
pl |  | Currency
pl |  | MaxValue
pl |  | MinValue
pl |  | Precision
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
pl | ro | Alignment (TNumericField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
pl |  | Currency (TFloatField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TNumericField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
pl |  | EditFormat (TNumericField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
pl |  | MaxValue (TFloatField)
pl |  | MinValue (TFloatField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | Precision (TFloatField)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TFloatField)
 |  | VCLComObject (TComponent)
pl |  |


TFloatField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TFloatField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TFloatField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TFloatField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TFloatField.CheckRange

Check whether a value is in the allowed range of values for the field

Declaration

Source position: db.pas line 647

public function TFloatField.CheckRange(

  AValue: Double

):Boolean;

Arguments

AValue

Value to check

Function result

true if AValue is in the allowed range of values.

Description

CheckRange returns True if AValue lies within the range defined by the MinValue and MaxValue properties. If the value lies outside of the allowed range, then False is returned.

See also

MaxValue | Maximum value for the field
MinValue | Minimum value for the field


TFloatField.Create

Create a new instance of the TFloatField

Declaration

Source position: db.pas line 646

public constructor TFloatField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field instance

Description

Create initializes a new instance of TFloatField. It calls the inherited constructor and then initializes some properties.


TFloatField.Currency

Is the field a currency field.

Declaration

Source position: db.pas line 651

published property TFloatField.Currency: Boolean
  read FCurrency
  write SetCurrency
  default false;

Description

Currency can be set to True to indicate that the field contains data representing an amount of currency. This affects the way the TField.DisplayText and TField.Text properties format the value of the field: if the Currency property is True, then these properties will format the value as a currency value (generally appending the currency sign) and if the Currency property is False, then they will format it as a normal floating-point value.

See also

TField.DisplayText | Formatted field value
TField.Text | Text representation of the field
TNumericField.DisplayFormat | Format string for display of numerical data
TNumericField.EditFormat | Format string for editing of numerical data


TFloatField.MaxValue

Maximum value for the field

Declaration

Source position: db.pas line 652

published property TFloatField.MaxValue: Double
  read FMaxValue
  write FMaxValue;

Description

MaxValue can be set to a value different from zero, it is then the maximum value for the field if set to any value different from zero. When setting the field's value, the value may not be larger than MaxValue. Any attempt to write a larger value as the field's content will result in an exception. By default MaxValue equals 0, i.e. any floating-point value is allowed.

If MaxValue is set, MinValue should also be set, because it will also be checked.

See also

TFloatField.MinValue

Minimum value for the field


TFloatField.MinValue

Minimum value for the field

Declaration

Source position: db.pas line 653

published property TFloatField.MinValue: Double
  read FMinValue
  write FMinValue;

Description

MinValue can be set to a value different from zero, then it is the minimum value for the field. When setting the field's value, the value may not be less than MinValue. Any attempt to write a smaller value as the field's content will result in an exception. By default MinValue equals 0, i.e. any floating-point value is allowed.

If MinValue is set, MaxValue should also be set, because it will also be checked.

See also

TFloatField.MaxValue | Maximum value for the field
TFloatField.CheckRange | Check whether a value is in the allowed range of values for the field


TFloatField.Precision

Precision (number of digits) of the field in text representations

Declaration

Source position: db.pas line 654

published property TFloatField.Precision: LongInt
  read FPrecision
  write SetPrecision
  default 15;

Description

Precision is the maximum number of digits that should be used when the field is converted to a textual representation in TField.Displaytext or TField.Text, it is used in the arguments to FormatFloat.

See also

TField.Displaytext | Formatted field value
TField.Text | Text representation of the field
FormatFloat


TFloatField.Value

Value of the field as a double type

Declaration

Source position: db.pas line 648

public property TFloatField.Value: Double
  read GetAsFloat
  write SetAsFloat;

Description

Value is redefined by TFloatField to return a value of type Double. It returns the same value as TField.AsFloat

See also

TField.AsFloat | Access the field's contents as a floating-point (Double) value.
TField.Value | Value of the field as a variant value


TFMTBCDField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Declaration

Source position: db.pas line 808

type TFMTBCDField = class(TNumericField)

public

  constructor Create(); override;

  function CheckRange();

  property Value: TBCD; [rw]

published

  property Precision: LongInt; [rw]

  property Currency: Boolean; [rw]

  property MaxValue: ; [rw]

  property MinValue: ; [rw]

  property Size;

end;

Inheritance

TFMTBCDField
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject


TFMTBCDField
 |  | Value
pl |  | Precision
pl |  | Currency
pl |  | MaxValue
pl |  | MinValue
pl | ro | Size
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
pl | ro | Alignment (TNumericField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
pl |  | Currency (TFMTBCDField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TNumericField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
pl |  | EditFormat (TNumericField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
pl |  | MaxValue (TFMTBCDField)
pl |  | MinValue (TFMTBCDField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | Precision (TFMTBCDField)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TFMTBCDField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TFMTBCDField)
 |  | VCLComObject (TComponent)
pl |  |


TFMTBCDField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TFMTBCDField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TFMTBCDField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TFMTBCDField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TFMTBCDField.CheckRange

Declaration

Source position: db.pas line 837

public function TFMTBCDField.CheckRange(

  AValue: TBCD

):Boolean;


TFMTBCDField.Currency

Declaration

Source position: db.pas line 841

published property TFMTBCDField.Currency: Boolean
  read FCurrency
  write FCurrency;


TFMTBCDField.MaxValue

Declaration

Source position: db.pas line 842

published property TFMTBCDField.MaxValue:
  read GetMaxValue
  write SetMaxValue;


TFMTBCDField.MinValue

Declaration

Source position: db.pas line 843

published property TFMTBCDField.MinValue:
  read GetMinValue
  write SetMinValue;


TFMTBCDField.Precision

Declaration

Source position: db.pas line 840

published property TFMTBCDField.Precision: LongInt
  read FPrecision
  write FPrecision
  default 15;


TFMTBCDField.Size

Declaration

Source position: db.pas line 844

published property TFMTBCDField.Size
  default 4;


TFMTBCDField.Value

Declaration

Source position: db.pas line 838

public property TFMTBCDField.Value: TBCD
  read GetAsBCD
  write SetAsBCD;


TGraphicField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for graphical BLOB field data

Declaration

Source position: db.pas line 918

type TGraphicField = class(TBlobField)

public

  constructor Create(); override;

Create a new instance of the TGraphicField class

end;

Inheritance

TGraphicField | Field class for graphical BLOB field data
|
TBlobField | Base class for BLOB field data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TGraphicField is the class used when a dataset must manage graphical BLOB data. (TField.DataType equals ftGraphic). It initializes some of the properties of the TField class. All methods to be able to work with graphical BLOB data have been implemented in the TBlobField parent class.

It should never be necessary to create an instance of TGraphicsField manually, a field of this class will be instantiated automatically for each graphical BLOB field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TBLOBField | Base class for BLOB field data
TMemoField | Base class for MEMO (text BLOB) field data
TWideMemoField | Field class for wide MEMO (widestring text BLOB) field data


TGraphicField
TBlobField
 | ro | BlobSize
 |  | Modified
 |  | Value
 |  | Transliterate
pl |  | BlobType
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TGraphicField
 | Create
TBlobField
 | Create
 | Clear
 | IsBlob
 | LoadFromFile
 | LoadFromStream
 | SaveToFile
 | SaveToStream
 | SetFieldType
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Clear (TBlobField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBlobField)

Create (TGraphicField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsBlob (TBlobField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

LoadFromFile (TBlobField)

LoadFromStream (TBlobField)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SaveToFile (TBlobField)

SaveToStream (TBlobField)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetFieldType (TBlobField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TGraphicField
TBlobField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TGraphicField.Create

Create a new instance of the TGraphicField class

Declaration

Source position: db.pas line 920

public constructor TGraphicField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new TGraphicField instance

Description

Create initializes a new instance of the TGraphicField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with graphical BLOB values.

See also

TField

Provide access to the contents of a single field in a record


TGuidField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for native variant data

Declaration

Source position: db.pas line 957

type TGuidField = class(TStringField)
public
constructor Create(); override; | Create a new instance of the TGUIDField class
property AsGuid: TGUID; [rw] | Field content as a GUID value
end;

Inheritance

TGuidField | Field class for native variant data
|
TStringField | Field class to handle ansistring fields
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TGUIDField is the class used when a dataset must manage native variant-typed data. (TField.DataType equals ftGUID). It initializes some of the properties of the TField class and overrides some of its methods to be able to work with variant data. It also adds a method to retrieve the field value as a native TGUID type.

It should never be necessary to create an instance of TGUIDField manually, a field of this class will be instantiated automatically for each GUID field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TGuidField.AsGuid | Field content as a GUID value


TGuidField
 |  | AsGuid
TStringField
 |  | FixedChar
 |  | Transliterate
 |  | Value
pl | ro | EditMask
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsGuid (TGuidField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
pl | ro | EditMask (TStringField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
 |  | FixedChar (TStringField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TStringField)
 |  | Tag (TComponent)
 |  | Text (TField)
 |  | Transliterate (TStringField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TStringField)
 |  | VCLComObject (TComponent)
pl |  |


TGuidField
 | Create
TStringField
 | Create
 | SetFieldType
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TStringField)

Create (TGuidField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetFieldType (TStringField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TGuidField
TStringField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TGuidField.AsGuid

Field content as a GUID value

Declaration

Source position: db.pas line 966

public property TGuidField.AsGuid: TGUID
  read GetAsGuid
  write SetAsGuid;

Description

AsGUID can be used to get or set the field's content as a value of type TGUID.

See also

TField.AsString

Access the field's contents as an AnsiString value.


TGuidField.Create

Create a new instance of the TGUIDField class

Declaration

Source position: db.pas line 965

public constructor TGuidField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new TGUIDField instance

Description

Create initializes a new instance of the TGUIDField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with GUID values.

See also

TField

Provide access to the contents of a single field in a record


TIndexDef

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Index definition

Declaration

Source position: db.pas line 977

type TIndexDef = class(TNamedItem)
public
constructor Create(); overload; | Create a new index definition
property Expression: ; [rw] | Expression that makes up the index values
property Fields: ; [rw] | Fields making up the index
property CaseInsFields: ; [rw] | Fields in field list that are ordered case-insensitively
property DescFields: ; [rw] | Fields in field list that are ordered descending
property Options: TIndexOptions; [rw] | Index options
property Source: ; [rw] | Source of the index
end;

Inheritance

TIndexDef | Index definition
|
TNamedItem | Named collection item
|
TCollectionItem
|
TPersistent
|
TObject

Description

TIndexDef describes one index in a set of indexes of a TDataset instance. The collection of indexes is descibed by the TIndexDefs class. It just has the necessary properties to describe an index, but does not implement any functionality to maintain an index.

See also

TIndexDefs

A class to keep a list of index definitions


TIndexDef
 |  | Expression
 |  | Fields
 |  | CaseInsFields
 |  | DescFields
 |  | Options
 |  | Source
TNamedItem
 |  | DisplayName
pl |  | Name
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


 |  | CaseInsFields (TIndexDef)
 |  | Collection (TCollectionItem)
 |  | DescFields (TIndexDef)
 |  | DisplayName (TCollectionItem)
 |  | DisplayName (TNamedItem)
 |  | Expression (TIndexDef)
 |  | Fields (TIndexDef)
 | ro | ID (TCollectionItem)
 |  | Index (TCollectionItem)
pl |  | Name (TNamedItem)
 |  | Options (TIndexDef)
 |  | Source (TIndexDef)
 | ro | UpdateCount (TCollectionItem)


TIndexDef
 | Create
TNamedItem
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

Changed (TCollectionItem)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TCollectionItem)

Create (TIndexDef)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TCollectionItem)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetDisplayName (TCollectionItem)

GetHashCode (TObject)

GetIndex (TCollectionItem)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TCollectionItem)

GetOwner (TPersistent)

GetOwner (TCollectionItem)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SetCollection (TCollectionItem)

SetDisplayName (TCollectionItem)

SetIndex (TCollectionItem)


TIndexDef

TNamedItem

TCollectionItem

TPersistent

TObject


TIndexDef.CaseInsFields

Fields in field list that are ordered case-insensitively

Declaration

Source position: db.pas line 996

public property TIndexDef.CaseInsFields:
  read FCaseinsFields
  write SetCaseInsFields;

Description

CaseInsFields is a list of fieldnames, separated by semicolons. It contains the names of the fields in the Fields property which are ordered in a case-insensitive manner. CaseInsFields may not contain fieldnames that do not appear in Fields.

See also

TIndexDef.Fields | Fields making up the index
TIndexDef.Expression | Expression that makes up the index values
TIndexDef.DescFields | Fields in field list that are ordered descending


TIndexDef.Create

Create a new index definition

Declaration

Source position: db.pas line 992

public constructor TIndexDef.Create(

  Owner: TIndexDefs;

  const AName: ;

  const TheFields: ;

  TheOptions: TIndexOptions

); overload;

Arguments

Owner | TIndexDefs Collection to which new instance must be added.
AName | Name for the new index. Each name may appear only once in the collection.
TheFields | Fields that make up the index
TheOptions | Options for the index

Description

Create initializes a new TIndexDef instance with the AName value as the index name, AField as the fields making up the index, and TheOptions as the options. Owner should be the TIndexDefs instance to which the new TIndexDef can be added.

Errors

If an index with name AName already exists in the collection, an exception will be raised.

See also

TIndexDefs | A class to keep a list of index definitions
TIndexDef.Options | Index options
TIndexDef.Fields | Fields making up the index


TIndexDef.DescFields

Fields in field list that are ordered descending

Declaration

Source position: db.pas line 997

public property TIndexDef.DescFields:
  read FDescFields
  write SetDescFields;

Description

DescFields is a list of fieldnames, separated by semicolons. It contains the names of the fields in the Fields property which are ordered in a descending manner. DescFields may not contain fieldnames that do not appear in Fields.

See also

TIndexDef.Fields | Fields making up the index
TIndexDef.Expression | Expression that makes up the index values
TIndexDef.DescFields | Fields in field list that are ordered descending


TIndexDef.Expression

Expression that makes up the index values

Declaration

Source position: db.pas line 994

public property TIndexDef.Expression:
  read GetExpression
  write SetExpression;

Description

Expression is an SQL expression based on which the index values are computed. It is only used when ixExpression is in TIndexDef.Options

See also

TIndexDef.Options | Index options
TindexDef.Fields | Fields making up the index


TIndexDef.Fields

Fields making up the index

Declaration

Source position: db.pas line 995

public property TIndexDef.Fields:
  read FFields
  write FFields;

Description

Fields is a list of fieldnames, separated by semicolons: the fields that make up the index, in case the index is not based on an expression. The list contains the names of all fields, regardless of whether the sort order for a particular field is ascending or descending. The fields should be in the right order, i.e. the first field is sorted on first, and so on.

The TIndexDef.DescFields property can be used to determine the fields in the list that have a descending sort order. The TIndexDef.CaseInsFields property determines which fields are sorted in a case-insensitive manner.

See also

TIndexDef.DescFields | Fields in field list that are ordered descending
TIndexDef.CaseInsFields | Fields in field list that are ordered case-insensitively
TIndexDef.Expression | Expression that makes up the index values


TIndexDef.Options

Index options

Declaration

Source position: db.pas line 998

public property TIndexDef.Options: TIndexOptions
  read FOptions
  write FOptions;

Description

Options describes the various properties of the index. This is usually filled by the dataset that provides the index definitions. For datasets that provide In-memory indexes, this should be set prior to creating the index: it cannot be changed once the index is created.

See the description of TindexOption for more information on the various available options.

See also

TIndexOptions

Set of TIndexOption values


TIndexDef.Source

Source of the index

Declaration

Source position: db.pas line 999

public property TIndexDef.Source:
  read FSource
  write FSource;

Description

Source describes where the index comes from. This is a property for the convenience of the various datasets that provide indexes: they can use it to describe the source of the index.


TIndexDefs

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

A class to keep a list of index definitions

Declaration

Source position: db.pas line 1004

type TIndexDefs = class(TDefCollection)
public
constructor Create(); virtual; overload; | Create a new TIndexDefs instance
procedure Add(); | Add a new index definition with given name and options
function AddIndexDef; | Add a new, empty, index definition
function Find(); | Find an index by name
function FindIndexForFields(); | Find index definition based on field names
function GetIndexForFields(); | Get index definition based on field names
procedure Update; virtual; overload; | Called whenever one of the items changes
property Items: TIndexDef; default; [rw] | Indexed access to the index definitions
end;

Inheritance

TIndexDefs | A class to keep a list of index definitions
|
TDefCollection | Definition collection
|
TOwnedCollection
|
TCollection
|
TPersistent
|
TObject

Description

TIndexDefs is used to keep a collection of index (sort order) definitions. It can be used by classes that provide in-memory or on-disk indexes to provide a list of available indexes.

See also

TIndexDef | Index definition
TIndexDefs.Items | Indexed access to the index definitions


TIndexDefs
 |  | Items
TDefCollection
 | ro | Dataset
 |  | Updated
TOwnedCollection
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
ro | Dataset (TDefCollection)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | Items (TIndexDefs)
 | PropName (TCollection)
ro | UpdateCount (TCollection)


TIndexDefs
 | Create
 | Add
 | AddIndexDef
 | Find
 | FindIndexForFields
 | GetIndexForFields
 | Update
TDefCollection
 | create
 | Find
 | GetItemNames
 | IndexOf
TOwnedCollection
 | GetOwner
 | Create
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

Add (TIndexDefs)

AddIndexDef (TIndexDefs)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

Create (TOwnedCollection)

create (TDefCollection)

Create (TIndexDefs)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

Find (TDefCollection)

Find (TIndexDefs)

FindIndexForFields (TIndexDefs)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetIndexForFields (TIndexDefs)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetItemNames (TDefCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetOwner (TOwnedCollection)

GetPropName (TCollection)

IndexOf (TDefCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TIndexDefs

TDefCollection

TOwnedCollection

TCollection

TPersistent

TObject


TIndexDefs.Add

Add a new index definition with given name and options

Declaration

Source position: db.pas line 1010

public procedure TIndexDefs.Add(

  const Name: ;

  const Fields: ;

  Options: TIndexOptions

);

Arguments

Name | Name for the new index definition
Fields | Value for the Fields property of the new index definition.
Options | Value for the Options property of the new index definition.

Description

Add adds a new TIndexDef instance to the list of indexes. It initializes the index definition properties Name, Fields and Options with the values given in the parameters with the same names.

Errors

If an index with the same Name already exists in the list of indexes, an exception will be raised.

See also

TIndexDef | Index definition
TNamedItem.Name | Name of the item
TIndexDef.Fields | Fields making up the index
TIndexDef.Options | Index options
TIndexDefs.AddIndexDef | Add a new, empty, index definition


TIndexDefs.AddIndexDef

Add a new, empty, index definition

Declaration

Source position: db.pas line 1011

public function TIndexDefs.AddIndexDef: TIndexDef;

Function result

New TIndexDef instance.

Description

AddIndexDef adds a new TIndexDef instance to the list of indexes, and returns the newly created instance. It does not initialize any of the properties of the new index definition.

See also

TIndexDefs.Add

Add a new index definition with given name and options


TIndexDefs.Create

Create a new TIndexDefs instance

Declaration

Source position: db.pas line 1009

public constructor TIndexDefs.Create(

  ADataSet: TDataSet

); virtual; overload;

Arguments

ADataSet

Dataset for which the index definitions are stored

Description

Create initializes a new instance of the TIndexDefs class. It simply calls the inherited destructor with the appropriate item class, TIndexDef.

See also

TIndexDef | Index definition
TIndexDefs.Destroy | Remove the indexdefs from memory.


TIndexDefs.Find

Find an index by name

Declaration

Source position: db.pas line 1012

public function TIndexDefs.Find(

  const IndexName:

):TIndexDef;

Arguments

IndexName

Index name to search for.

Function result

TIndexDef instance with name IndexName or Nil

Description

Find overloads the TDefCollection.Find method to search and return a TIndexDef instance based on the name. The search is case-insensitive and returns Nil if no matching index definition was found.

See also

TIndexDef | Index definition
TDefCollection.Find | Find an item by name
TIndexDefs.FindIndexForFields | Find index definition based on field names


TIndexDefs.FindIndexForFields

Find index definition based on field names

Declaration

Source position: db.pas line 1013

public function TIndexDefs.FindIndexForFields(

  const Fields:

):TIndexDef;

Arguments

Fields

Fieldlist to look for

Function result

TIndexDef instance with fieldlist matching Fields

Description

FindIndexForFields searches in the list of indexes for an index whose TIndexDef.Fields property matches the list of fields in Fields. If it finds an index definition, then it returns the found instance.

Errors

If no matching definition is found, an exception is raised. This is different from other Find functionality, where Find usually returns Nil if nothing is found.

See also

TIndexDef | Index definition
TIndexDefs.Find | Find an index by name
TIndexDefs.GetindexForFields | Get index definition based on field names


TIndexDefs.GetIndexForFields

Get index definition based on field names

Declaration

Source position: db.pas line 1014

public function TIndexDefs.GetIndexForFields(

  const Fields: ;

  CaseInsensitive: Boolean

):TIndexDef;

Arguments

Fields | Fieldlist to look for
CaseInsensitive | Look only for a case-insensitive index

Function result

TIndexDef instance with fieldlist matching Fields or Nil

Description

GetIndexForFields searches in the list of indexes for an index whose TIndexDef.Fields property matches the list of fields in Fields. If CaseInsenstitive is True it only searches for case-sensitive indexes. If it finds an index definition, then it returns the found instance. If it does not find a matching definition, Nil is returned.

See also

TIndexDef | Index definition
TIndexDefs.Find | Find an index by name
TIndexDefs.FindIndexForFields | Find index definition based on field names


TIndexDefs.Items

Indexed access to the index definitions

Declaration

Source position: db.pas line 1017

public property TIndexDefs.Items: TIndexDef
  read GetItem
  write SetItem;
  default;

Description

Items is redefined by TIndexDefs using TIndexDef as the type for the elements. It is the default property of the TIndexDefs class.

See also

TIndexDef

Index definition


TIndexDefs.Update

Called whenever one of the items changes

Declaration

Source position: db.pas line 1016

public procedure TIndexDefs.Update; virtual; overload;

Description

Update can be called to have the dataset update its index definitions.


TIntegerField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Alias for TLongintField

Declaration

Source position: db.pas line 562

type TIntegerField = class(TLongintField) ;

Inheritance

TIntegerField | Alias for TLongintField
|
TLongintField | Field class for 32-bit signed integer data
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TIntegerField is an alias for TLongintField.

See also

TLongintField | Field class for 32-bit signed integer data
TField | Provide access to the contents of a single field in a record


TIntegerField
TLongintField
 |  | Value
pl |  | MaxValue
pl |  | MinValue
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TIntegerField
TLongintField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TLongintField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TLongintField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TIntegerField
TLongintField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TLargeintField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for 64-bit signed integer data

Declaration

Source position: db.pas line 566

type TLargeintField = class(TNumericField)
public
constructor Create(); override; | Create a new instance of the TLargeintField class
function CheckRange(); | Check whether a values falls within the allowed range
property Value: LargeInt; [rw] | Field contents as a 64-bit integer value
published
property MaxValue: LargeInt; [rw] | Maximum value for the field
property MinValue: LargeInt; [rw] | Minimum value for the field
end;

Inheritance

TLargeintField | Field class for 64-bit signed integer data
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TLargeIntField is instantiated when a dataset must manage a field with 64-bit signed data: the data type ftLargeInt. It overrides some methods of TField to handle int64 data, and sets some of the properties to values for int64 data. It also introduces some methods and properties specific to 64-bit integer data such as MinValue and MaxValue.

It should never be necessary to create an instance of TLargeIntField manually, a field of this class will be instantiated automatically for each int64 field when a dataset is opened.

See also

TField | Provide access to the contents of a single field in a record
MinValue | Minimum value for the field
MaxValue | Maximum value for the field


TLargeintField
 |  | Value
pl |  | MaxValue
pl |  | MinValue
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
pl | ro | Alignment (TNumericField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TNumericField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
pl |  | EditFormat (TNumericField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
pl |  | MaxValue (TLargeintField)
pl |  | MinValue (TLargeintField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TLargeintField)
 |  | VCLComObject (TComponent)
pl |  |


TLargeintField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TLargeintField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TLargeintField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TLargeintField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TLargeintField.CheckRange

Check whether a values falls within the allowed range

Declaration

Source position: db.pas line 590

public function TLargeintField.CheckRange(

  AValue: LargeInt

):Boolean;

Arguments

AValue

Value to check

Function result

true if AValue is in the allowed range of values.

Description

CheckRange returns True if AValue lies within the range defined by the MinValue and MaxValue properties. If the value lies outside of the allowed range, then False is returned.

See also

MaxValue | Maximum value for the field
MinValue | Minimum value for the field


TLargeintField.Create

Create a new instance of the TLargeintField class

Declaration

Source position: db.pas line 589

public constructor TLargeintField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the TLargeIntField component

Description

Create initializes a new instance of the TLargeIntField class: it calls the inherited constructor and then initializes the various properties of Tfield and MinValue and MaxValue.

See also

TField | Provide access to the contents of a single field in a record
MinValue | Minimum value for the field
MaxValue | Maximum value for the field


TLargeintField.MaxValue

Maximum value for the field

Declaration

Source position: db.pas line 593

published property TLargeintField.MaxValue: LargeInt
  read FMaxValue
  write SetMaxValue
  default 0;

Description

MaxValue is the maximum value for the field if set to any value different from zero. When setting the field's value, the value may not be larger than MaxValue. Any attempt to write a larger value as the field's content will result in an exception. By default MaxValue equals 0, i.e. any integer value is allowed.

If MaxValue is set, MinValue should also be set, because it will also be checked.

See also

TLargeIntField.MinValue

Minimum value for the field


TLargeintField.MinValue

Minimum value for the field

Declaration

Source position: db.pas line 594

published property TLargeintField.MinValue: LargeInt
  read FMinValue
  write SetMinValue
  default 0;

Description

MinValue is the minimum value for the field. When setting the field's value, the value may not be less than MinValue. Any attempt to write a smaller value as the field's content will result in an exception. By default MinValue equals 0, i.e. any integer value is allowed.

If MinValue is set, MaxValue should also be set, because it will also be checked.

See also

TLargeIntField.MaxValue

Maximum value for the field


TLargeintField.Value

Field contents as a 64-bit integer value

Declaration

Source position: db.pas line 591

public property TLargeintField.Value: LargeInt
  read GetAsLargeint
  write SetAsLargeint;

Description

Value is redefined by TLargeIntField as a 64-bit integer value. It returns the same value as TField.AsLargeInt.

See also

TField.Value | Value of the field as a variant value
TField.AsLargeInt | Access the field's contents as a 64-bit signed integer (longint) value.


TLongintField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for 32-bit signed integer data

Declaration

Source position: db.pas line 532

type TLongintField = class(TNumericField)
public
constructor Create(); override; | Create a new instance of TLongintField
function CheckRange(); | Check whether a valid is in the allowed range of values for the field
property Value: LongInt; [rw] | Value of the field as longint
published
property MaxValue: LongInt; [rw] | Maximum value for the field
property MinValue: LongInt; [rw] | Minimum value for the field
end;

Inheritance

TLongintField | Field class for 32-bit signed integer data
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TLongintField is instantiated when a dataset must manage a field with 32-bit signed data: the data type ftInteger. It overrides some methods of TField to handle integer data, and sets some of the properties to values for integer data. It also introduces some methods and properties specific to integer data such as MinValue and MaxValue.

It should never be necessary to create an instance of TLongintField manually, a field of this class will be instantiated automatically for each integer field when a dataset is opened.

See also

TField | Provide access to the contents of a single field in a record
MaxValue | Maximum value for the field
MinValue | Minimum value for the field


TLongintField
 |  | Value
pl |  | MaxValue
pl |  | MinValue
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TLongintField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TLongintField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TLongintField.CheckRange

Check whether a valid is in the allowed range of values for the field

Declaration

Source position: db.pas line 556

public function TLongintField.CheckRange(

  AValue: LongInt

):Boolean;

Arguments

AValue

Value to check

Function result

true if AValue is in the allowed range of values.

Description

CheckRange returns True if AValue lies within the range defined by the MinValue and MaxValue properties. If the value lies outside of the allowed range, then False is returned.

See also

MaxValue | Maximum value for the field
MinValue | Minimum value for the field


TLongintField.Create

Create a new instance of TLongintField

Declaration

Source position: db.pas line 555

public constructor TLongintField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field component.

Description

Create initializes a new instance of TLongintField. After calling the inherited constructor, it initializes the MinValue and MaxValue properties.

See also

TField | Provide access to the contents of a single field in a record
MaxValue | Maximum value for the field
MinValue | Minimum value for the field


TLongintField.MaxValue

Maximum value for the field

Declaration

Source position: db.pas line 559

published property TLongintField.MaxValue: LongInt
  read FMaxValue
  write SetMaxValue
  default 0;

Description

MaxValue is the maximum value for the field. When setting the field's value, the value may not be larger than MaxValue. Any attempt to write a larger value as the field's content will result in an exception. By default MaxValue equals MaxInt, i.e. any integer value is allowed.

See also

MinValue

Minimum value for the field


TLongintField.MinValue

Minimum value for the field

Declaration

Source position: db.pas line 560

published property TLongintField.MinValue: LongInt
  read FMinValue
  write SetMinValue
  default 0;

Description

MinValue is the minimum value for the field. When setting the field's value, the value may not be less than MinValue. Any attempt to write a smaller value as the field's content will result in an exception. By default MinValue equals -MaxInt, i.e. any integer value is allowed.

See also

MaxValue

Maximum value for the field


TLongintField.Value

Value of the field as longint

Declaration

Source position: db.pas line 557

public property TLongintField.Value: LongInt
  read GetAsLongint
  write SetAsLongint;

Description

Value is redefined by TLongintField as a 32-bit signed integer value. It returns the same value as the TField.AsInteger property.

See also

TField.Value

Value of the field as a variant value


TLookupList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to manage lookup list values

Declaration

Source position: db.pas line 246

type TLookupList = class(TObject)
public
constructor Create; | Create a new instance of TLookupList.
destructor Destroy; override; | Free a TLookupList instance from memory
procedure Add(); | Add a key, value pair to the list
procedure Clear; | Remove all key, value pairs from the list
function FirstKeyByValue(); | Find the first key that matches a value
function ValueOfKey(); | Look up value based on a key
procedure ValuesToStrings(); | Convert values to stringlist
end;

Inheritance

TLookupList

Class to manage lookup list values
|

TObject

Description

TLookupList is a list object used for storing values of lookup operations by lookup fields. There should be no need to create an instance of TLookupList manually, the TField instance will create an instance of TlookupList on demand.

See also

TField.LookupCache

Should lookup values be cached


TLookupList

TObject


TLookupList
 | Create
 | Destroy
 | Add
 | Clear
 | FirstKeyByValue
 | ValueOfKey
 | ValuesToStrings
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TLookupList)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TLookupList)

Create (TObject)

Create (TLookupList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TLookupList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

FirstKeyByValue (TLookupList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

ValueOfKey (TLookupList)

ValuesToStrings (TLookupList)


TLookupList.Add

Add a key, value pair to the list

Declaration

Source position: db.pas line 252

public procedure TLookupList.Add(

  const AKey: Variant;

  const AValue: Variant

);

Arguments

AKey | Lookup key
AValue | Lookup value

Description

Add will add the value AValue to the list and associate it with key AKey. The same key cannot be added twice.

See also

TLookupList.Clear

Remove all key, value pairs from the list


TLookupList.Clear

Remove all key, value pairs from the list

Declaration

Source position: db.pas line 253

public procedure TLookupList.Clear;

Description

Clear removes all keys and associated values from the list.

See also

TLookupList.Add

Add a key, value pair to the list


TLookupList.Create

Create a new instance of TLookupList.

Declaration

Source position: db.pas line 250

public constructor TLookupList.Create;

Description

Create sets up the necessary structures to manage a list of lookup values for a lookup field.

See also

TLookupList.Destroy

Free a TLookupList instance from memory


TLookupList.Destroy

Free a TLookupList instance from memory

Declaration

Source position: db.pas line 251

public destructor TLookupList.Destroy; override;

Description

Destroy frees all resources (mostly memory) allocated by the lookup list, and calls then the inherited destructor.

See also

TLookupList.Create

Create a new instance of TLookupList.


TLookupList.FirstKeyByValue

Find the first key that matches a value

Declaration

Source position: db.pas line 254

public function TLookupList.FirstKeyByValue(

  const AValue: Variant

):Variant;

Arguments

AValue

Value to match key with.

Function result

First key that has AValue associated with it.

Description

FirstKeyByValue does a reverse lookup: it returns the first key value in the list that matches the AValue value. If none is found, Null is returned. This mechanism is quite slow, as a linear search is performed.

Errors

If no key is found, Null is returned.

See also

TLookupList.ValueOfKey

Look up value based on a key


TLookupList.ValueOfKey

Look up value based on a key

Declaration

Source position: db.pas line 255

public function TLookupList.ValueOfKey(

  const AKey: Variant

):Variant;

Arguments

AKey

Key to find associated value for.

Function result

Resulting value or Null

Description

ValueOfKey does a value lookup based on a key: it returns the value in the list that matches the AKey key. If none is found, Null is returned. This mechanism is quite slow, as a linear search is performed.

See also

TLookupList.FirstKeyByValue | Find the first key that matches a value
TLookupList.Add | Add a key, value pair to the list


TLookupList.ValuesToStrings

Convert values to stringlist

Declaration

Source position: db.pas line 256

public procedure TLookupList.ValuesToStrings(

  AStrings: TStrings

);

Arguments

AStrings

Stringlist to put values in.

Description

ValuesToStrings converts the list of values to a stringlist, so they can be used e.g. in a drop-down list.

See also

TLookupList.ValueOfKey

Look up value based on a key


TLookupListRec

Record to store lookup results

Declaration

Source position: db.pas line 239

type TLookupListRec = record
Key: Variant; | Key value
Value: Variant; | Lookup value associated to Key.
end;

Description

TLookupListRec is used by lookup fields to store lookup results, if the results should be cached. Its two fields keep the key value and associated lookup value.

See also

TLookupList

Class to manage lookup list values


TMasterDataLink

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Datalink for Master-Detail relationships between datasets.

Declaration

Source position: db.pas line 1734

type TMasterDataLink = class(TDetailDataLink)
public
constructor Create(); virtual; | Create a new instance of TMasterDataLink
destructor Destroy; override; | Free the datalink instance from memory
property FieldNames: ; [rw] | List of fieldnames that make up the master-detail relationship
property Fields: TList; [r] | List of fields as specified in FieldNames
property OnMasterChange: TNotifyEvent; [rw] | Called whenever the master dataset data changes
property OnMasterDisable: TNotifyEvent; [rw] | Called whenever the master dataset is disabled
end;

Inheritance

TMasterDataLink | Datalink for Master-Detail relationships between datasets.
|
TDetailDataLink | Represents the link between a detail data source and a master datasource.
|
TDataLink | Data event handling agent for controls
|
TPersistent
|
TObject

Description

TMasterDataLink is a TDatalink descendent which handles master-detail relations. It can be used in TDataset descendents that must have master-detail functionality: the detail dataset creates an instance of TMasterDataLink to point to the master dataset, which is subsequently available through the TDataLink.Dataset property.

The class also provides functionailty for keeping a list of fields that make up the master-detail functionality, in the TMasterDatalink.FieldNames and TMasterDataLink.Fields properties.

This class should never be used in application code.

See also

TDataset | Base class for records-based data-access
TDatalink.DataSource | Datasource this datalink is connected to
TDatalink.DataSet | Dataset this datalink is connected to
TMasterDatalink.FieldNames | List of fieldnames that make up the master-detail relationship
TMasterDataLink.Fields | List of fields as specified in FieldNames


TMasterDataLink
 |  | FieldNames
 | ro | Fields
TDetailDataLink
 | ro | DetailDataSet
TDataLink
 | ro | Active
 |  | ActiveRecord
 | ro | BOF
 |  | BufferCount
 | ro | DataSet
 |  | DataSource
 |  | DataSourceFixed
 | ro | Editing
 | ro | Eof
 |  | ReadOnly
 | ro | RecordCount
TPersistent
TObject


ro | Active (TDataLink)
 | ActiveRecord (TDataLink)
ro | BOF (TDataLink)
 | BufferCount (TDataLink)
ro | DataSet (TDataLink)
 | DataSource (TDataLink)
 | DataSourceFixed (TDataLink)
ro | DetailDataSet (TDetailDataLink)
ro | Editing (TDataLink)
ro | Eof (TDataLink)
 | FieldNames (TMasterDataLink)
ro | Fields (TMasterDataLink)
 | ReadOnly (TDataLink)
ro |


TMasterDataLink
 | Create
 | Destroy
TDetailDataLink
TDataLink
 | Create
 | Destroy
 | Edit
 | UpdateRecord
 | ExecuteAction
 | UpdateAction
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TDataLink)

Create (TMasterDataLink)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TDataLink)

Destroy (TMasterDataLink)

Dispatch (TObject)

DispatchStr (TObject)

Edit (TDataLink)

Equals (TObject)

ExecuteAction (TDataLink)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetOwner (TPersistent)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TDataLink)

UpdateRecord (TDataLink)


TMasterDataLink
 | OnMasterChange
 | OnMasterDisable
TDetailDataLink
TDataLink
TPersistent
TObject


OnMasterChange (TMasterDataLink)

OnMasterDisable (TMasterDataLink)


TMasterDataLink.Create

Create a new instance of TMasterDataLink

Declaration

Source position: db.pas line 1751

public constructor TMasterDataLink.Create(

  ADataSet: TDataSet

); virtual;

Arguments

ADataSet

Detail dataset of the master-detail relation.

Description

Create initializes a new instance of TMasterDataLink. The ADataset parameter is the detail dataset in the master-detail relation: it is saved in the DetailDataset property. The master dataset must be set through the DataSource property, and is usually set by the applictaion programmer.

See also

TDetailDataLink.DetailDataset | Detail dataset in Master-detail relation
TDatalink.Datasource | Datasource this datalink is connected to


TMasterDataLink.Destroy

Free the datalink instance from memory

Declaration

Source position: db.pas line 1752

public destructor TMasterDataLink.Destroy; override;

Description

Destroy cleans up the resources used by TMasterDatalink and then calls the inherited destructor.

See also

TMasterDatalink.Create

Create a new instance of TMasterDataLink


TMasterDataLink.FieldNames

List of fieldnames that make up the master-detail relationship

Declaration

Source position: db.pas line 1753

public property TMasterDataLink.FieldNames:
  read FFieldNames
  write SetFieldNames;

Description

FieldNames is a semicolon-separated list of fieldnames in the master dataset (TDatalink.Dataset) on which the master-detail relationship is based. Setting this property will fill the TMasterDataLink.Fields property with the field instances of the master dataset.

See also

TMasterDataLink.Fields | List of fields as specified in FieldNames
TDatalink.Dataset | Dataset this datalink is connected to
TDataset.GetFieldList | Return field instances in a list


TMasterDataLink.Fields

List of fields as specified in FieldNames

Declaration

Source position: db.pas line 1754

public property TMasterDataLink.Fields: TList
  read FFields;

Description

Fields is filled with the TField instances from the master dataset (TDatalink.Dataset) when the FieldNames property is set, and when the master dataset opens.

See also

TField | Provide access to the contents of a single field in a record
TMasterDatalink.FieldNames | List of fieldnames that make up the master-detail relationship


TMasterDataLink.OnMasterChange

Called whenever the master dataset data changes

Declaration

Source position: db.pas line 1755

public property TMasterDataLink.OnMasterChange: TNotifyEvent
  read FOnMasterChange
  write FOnMasterChange;

Description

OnMasterChange is called whenever the field values in the master dataset changes, i.e. when it becomes active, or when the current record changes. If the TMasterDataLink.Fields list is empty, TMasterDataLink.OnMasterDisable is called instead.

See also

TMasterDataLink.OnMasterDisable

Called whenever the master dataset is disabled


TMasterDataLink.OnMasterDisable

Called whenever the master dataset is disabled

Declaration

Source position: db.pas line 1756

public property TMasterDataLink.OnMasterDisable: TNotifyEvent
  read FOnMasterDisable
  write FOnMasterDisable;

Description

OnMasterDisable is called whenever the master dataset is disabled, or when it is active and the field list is empty.

See also

TMasterDataLink.OnMasterChange

Called whenever the master dataset data changes


TMasterParamsDataLink

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to establish a master-detail relationship between dataset, based on parameters

Declaration

Source position: db.pas line 1950

type TMasterParamsDataLink = class(TMasterDataLink)
public
constructor Create(); override; | Initialize a new TMasterParamsDataLink instance
procedure RefreshParamNames; virtual; | Refresh the list of parameter names
procedure CopyParamsFromMaster(); virtual; | Copy parameter values from master dataset.
property Params: TParams; [rw] | Parameters of detail dataset.
end;

Inheritance

TMasterParamsDataLink | Class to establish a master-detail relationship between dataset, based on parameters
|
TMasterDataLink | Datalink for Master-Detail relationships between datasets.
|
TDetailDataLink | Represents the link between a detail data source and a master datasource.
|
TDataLink | Data event handling agent for controls
|
TPersistent
|
TObject

Description

TMasterParamsDataLink is a TDataLink descendent that can be used to establish a master-detail relationship between 2 TDataset instances where the detail dataset is parametrized using a TParams instance. It takes care of closing and opening the detail dataset and copying the parameter values from the master dataset whenever the data in the master dataset changes.

See also

TDatalink | Data event handling agent for controls
TDataset | Base class for records-based data-access
TParams | A collection of parameter values for SQL-based datasets
TParam | Parameter description class


TMasterParamsDataLink
 |  | Params
TMasterDataLink
 |  | FieldNames
 | ro | Fields
TDetailDataLink
 | ro | DetailDataSet
TDataLink
 | ro | Active
 |  | ActiveRecord
 | ro | BOF
 |  | BufferCount
 | ro | DataSet
 |  | DataSource
 |  | DataSourceFixed
 | ro | Editing
 | ro | Eof
 |  | ReadOnly
 | ro | RecordCount
TPersistent
TObject


ro | Active (TDataLink)
 | ActiveRecord (TDataLink)
ro | BOF (TDataLink)
 | BufferCount (TDataLink)
ro | DataSet (TDataLink)
 | DataSource (TDataLink)
 | DataSourceFixed (TDataLink)
ro | DetailDataSet (TDetailDataLink)
ro | Editing (TDataLink)
ro | Eof (TDataLink)
 | FieldNames (TMasterDataLink)
ro | Fields (TMasterDataLink)
 | Params (TMasterParamsDataLink)
 | ReadOnly (TDataLink)
ro |


TMasterParamsDataLink
 | Create
 | RefreshParamNames
 | CopyParamsFromMaster
TMasterDataLink
 | Create
 | Destroy
TDetailDataLink
TDataLink
 | Create
 | Destroy
 | Edit
 | UpdateRecord
 | ExecuteAction
 | UpdateAction
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyParamsFromMaster (TMasterParamsDataLink)

Create (TObject)

Create (TDataLink)

Create (TMasterDataLink)

Create (TMasterParamsDataLink)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TDataLink)

Destroy (TMasterDataLink)

Dispatch (TObject)

DispatchStr (TObject)

Edit (TDataLink)

Equals (TObject)

ExecuteAction (TDataLink)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetOwner (TPersistent)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

RefreshParamNames (TMasterParamsDataLink)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TDataLink)

UpdateRecord (TDataLink)


TMasterParamsDataLink
TMasterDataLink
 | OnMasterChange
 | OnMasterDisable
TDetailDataLink
TDataLink
TPersistent
TObject


TMasterParamsDataLink.CopyParamsFromMaster

Copy parameter values from master dataset.

Declaration

Source position: db.pas line 1960

public procedure TMasterParamsDataLink.CopyParamsFromMaster(

  CopyBound: Boolean

); virtual;

Arguments

CopyBound

Should Bound parameters also get a new value ?

Description

CopyParamsFromMaster calls TParams.CopyParamValuesFromDataset, passing it the master dataset: it provides the parameters of the detail dataset with their new values. If CopyBound is false, then only parameters with their Bound property set to False are copied. If it is True then the value is set for all parameters.

Errors

If the master dataset does not have a corresponding field for each parameter, then an exception will be raised.

See also

TParams.CopyParamValuesFromDataset | Copy parameter values from a the fields in a dataset.
TParam.Bound | Is the parameter value bound (set to fixed value)


TMasterParamsDataLink.Create

Initialize a new TMasterParamsDataLink instance

Declaration

Source position: db.pas line 1958

public constructor TMasterParamsDataLink.Create(

  ADataSet: TDataSet

); override;

Arguments

ADataSet

Detail dataset

Description

Create first calls the inherited constructor using ADataset, and then looks for a property named Params of type TParams in the published properties of ADataset and assigns it to the Params property.

See also

TDataset | Base class for records-based data-access
TParams | A collection of parameter values for SQL-based datasets
TMasterParamsDataLink.Params | Parameters of detail dataset.


TMasterParamsDataLink.Params

Parameters of detail dataset.

Declaration

Source position: db.pas line 1961

public property TMasterParamsDataLink.Params: TParams
  read FParams
  write SetParams;

Description

Params is the TParams instance of the detail dataset. If the detail dataset contains a property named Params of type TParams, then it will be set when the TMasterParamsDataLink instance was created. If the property is not published, or has another name, then the Params property must be set in code.

See also

Tparams | A collection of parameter values for SQL-based datasets
TMasterParamsDataLink.Create | Initialize a new TMasterParamsDataLink instance


TMasterParamsDataLink.RefreshParamNames

Refresh the list of parameter names

Declaration

Source position: db.pas line 1959

public procedure TMasterParamsDataLink.RefreshParamNames; virtual;

Description

RefreshParamNames scans the Params property and sets the FieldNames property to the list of parameter names.

See also

TMasterParamsDataLink.Params | Parameters of detail dataset.
TMasterDataLink.FieldNames | List of fieldnames that make up the master-detail relationship


TMemoField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for MEMO (text BLOB) field data

Declaration

Source position: db.pas line 890

type TMemoField = class(TBlobField)
public
constructor Create(); override; | Create a new instance of the TMemoField class
published
property Transliterate; | Should the contents of the field be transliterated
end;

Inheritance

TMemoField | Base class for MEMO (text BLOB) field data
|
TBlobField | Base class for BLOB field data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TMemoField is the class used when a dataset must manage memo (Text BLOB) data. (TField.DataType equals ftMemo). It initializes some of the properties of the TField class. All methods to be able to work with memo fields have been implemented in the TBlobField parent class.

It should never be necessary to create an instance of TMemoField manually, a field of this class will be instantiated automatically for each memo field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TBLOBField | Base class for BLOB field data
TWideMemoField | Field class for wide MEMO (widestring text BLOB) field data
TGraphicField | Field class for graphical BLOB field data


TMemoField
pl | ro | Transliterate
TBlobField
 | ro | BlobSize
 |  | Modified
 |  | Value
 |  | Transliterate
pl |  | BlobType
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 | ro | BlobSize (TBlobField)
pl |  | BlobType (TBlobField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Modified (TBlobField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TBlobField)
 |  | Tag (TComponent)
 |  | Text (TField)
 |  | Transliterate (TBlobField)
pl | ro | Transliterate (TMemoField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TBlobField)
 |  | VCLComObject (TComponent)
pl |  |


TMemoField
 | Create
TBlobField
 | Create
 | Clear
 | IsBlob
 | LoadFromFile
 | LoadFromStream
 | SaveToFile
 | SaveToStream
 | SetFieldType
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Clear (TBlobField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBlobField)

Create (TMemoField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsBlob (TBlobField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

LoadFromFile (TBlobField)

LoadFromStream (TBlobField)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SaveToFile (TBlobField)

SaveToStream (TBlobField)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetFieldType (TBlobField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TMemoField
TBlobField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TMemoField.Create

Create a new instance of the TMemoField class

Declaration

Source position: db.pas line 895

public constructor TMemoField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the new field instance/

Description

Create initializes a new instance of the TMemoField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with memo values.

See also

TField

Provide access to the contents of a single field in a record


TMemoField.Transliterate

Should the contents of the field be transliterated

Declaration

Source position: db.pas line 897

published property TMemoField.Transliterate
  default true;

Description

Transliterate is redefined from TBlobField.Transliterate with a default value of true.

See also

TBlobField.Transliterate | Should the contents of the field be transliterated
TStringField.Transliterate | Should the field value be transliterated when reading or writing
TDataset.Translate | Transliterate a buffer


TNamedItem

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Named collection item

Declaration

Source position: db.pas line 138

type TNamedItem = class(TCollectionItem)
public
property DisplayName: ; [rw] | Display name
published
property Name: ; [rw] | Name of the item
end;

Inheritance

TNamedItem

Named collection item
|

TCollectionItem
|

TPersistent
|

TObject

Description

NamedItem is a TCollectionItem descendent which introduces a Name property. It automatically returns the value of the Name property as the value of the DisplayName property.

See also

DisplayName | Display name
Name | Name of the item


TNamedItem
 |  | DisplayName
pl |  | Name
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


 | ro | ID (TCollectionItem)
 |  | Index (TCollectionItem)
pl |  | Name (TNamedItem)
 | ro | UpdateCount (TCollectionItem)


TNamedItem
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TNamedItem

TCollectionItem

TPersistent

TObject


TNamedItem.DisplayName

Display name

Declaration

Source position: db.pas line 145

public property TNamedItem.DisplayName:
  read GetDisplayName
  write SetDisplayName;

Description

DisplayName is declared in TCollectionItem, and is made public in TNamedItem. The value equals the value of the Name property.

See also

Name

Name of the item


TNamedItem.Name

Name of the item

Declaration

Source position: db.pas line 147

published property TNamedItem.Name:
  read FName
  write SetDisplayName;

Description

Name is the name of the item in the collection. This property is also used as the vaulue for the DisplayName property. If the TNamedItem item is owned by a TDefCollection collection, then the name must be unique, i.e. each Name value may appear only once in the collection.

See also

DisplayName | Display name
TDefCollection | Definition collection


TNumericField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for all numerical data field classe

Declaration

Source position: db.pas line 511

type TNumericField = class(TField)
public
constructor Create(); override; | Create a new instance of TNumericField
published
property Alignment; | Alignment of the field
property DisplayFormat: ; [rw] | Format string for display of numerical data
property EditFormat: ; [rw] | Format string for editing of numerical data
end;

Inheritance

TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TNumericField is an abstract class which overrides some of the methods of TField to handle numerical data. It also introduces or publishes a couple of properties that are only relevant in the case of numerical data, such as TNumericField.DisplayFormat and TNumericField.EditFormat.

Since TNumericField is an abstract class, it must never be instantiated directly. Instead one of the descendent classes should be created.

See also

TField | Provide access to the contents of a single field in a record
TNumericField.DisplayFormat | Format string for display of numerical data
TNumericField.EditFormat | Format string for editing of numerical data
TField.Alignment | Alignment for this field
TIntegerField | Alias for TLongintField
TLargeIntField | Field class for 64-bit signed integer data
TFloatField | Class for floating point values
TBCDField | Field class for Binary Coded Decimal (BCD) values


TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
pl | ro | Alignment (TNumericField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayFormat (TNumericField)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
pl |  | EditFormat (TNumericField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
 |  | Tag (TComponent)
 |  | Text (TField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | VCLComObject (TComponent)
pl |  |


TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TNumericField.Alignment

Alignment of the field

Declaration

Source position: db.pas line 525

published property TNumericField.Alignment
  default taRightJustify;

Description

Alignment is published by TNumericField with taRightJustify as a default value.

See also

TField.Alignment

Alignment for this field


TNumericField.Create

Create a new instance of TNumericField

Declaration

Source position: db.pas line 523

public constructor TNumericField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field component

Description

Create calls the inherited constructor and then initializes the TField.Alignment property with

See also

TField.Alignment

Alignment for this field


TNumericField.DisplayFormat

Format string for display of numerical data

Declaration

Source position: db.pas line 526

published property TNumericField.DisplayFormat:
  read FDisplayFormat
  write SetDisplayFormat;

Description

DisplayFormat specifies a format string (such as used by the Format and FormatFloat functions) for display purposes: the TField.DisplayText property will use this property to format the field's value. Which formatting function (and, consequently, which format can be entered) is used depends on the descendent of the TNumericField class.

See also

Format
FormatFloat
TField.DisplayText | Formatted field value
TNumericField.EditFormat | Format string for editing of numerical data


TNumericField.EditFormat

Format string for editing of numerical data

Declaration

Source position: db.pas line 527

published property TNumericField.EditFormat:
  read FEditFormat
  write SetEditFormat;

Description

EditFormat specifies a format string (such as used by the Format and FormatFloat functions) for editing purposes: the TField.Text property will use this property to format the field's value. Which formatting function (and, consequently, which format can be entered) is used depends on the descendent of the TNumericField class.

See also

Format
FormatFloat
TField.Text | Text representation of the field
TNumericField.DisplayFormat | Format string for display of numerical data


TParam

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Parameter description class

Declaration

Source position: db.pas line 1115

type TParam = class(TCollectionItem)
procedure Create(); | Create a new parameter value
public
procedure Assign(); override; | Assign one parameter instance to another
procedure AssignField(); | Copy value from field instance
procedure AssignToField(); | Assign parameter value to field
procedure AssignFieldValue(); | Assign field value to the parameter.
procedure AssignFromField(); | Copy field type and value
procedure Clear; | Clear the parameter value
procedure GetData(); | Get the parameter value from a memory buffer
function GetDataSize; | Return the size of the data.
procedure LoadFromFile(); | Load a parameter value from file
procedure LoadFromStream(); | Load a parameter value from stream
procedure SetBlobData(); | Set BLOB data
procedure SetData(); | Set the parameter value from a buffer
property AsBlob: TBlobData; [rw] | Return parameter value as a blob
property AsBoolean: Boolean; [rw] | Get/Set parameter value as a boolean value
property AsCurrency: Currency; [rw] | Get/Set parameter value as a currency value
property AsDate: TDateTime; [rw] | Get/Set parameter value as a date (TDateTime) value
property AsDateTime: TDateTime; [rw] | Get/Set parameter value as a date/time (TDateTime) value
property AsFloat: Double; [rw] | Get/Set parameter value as a floating-point value
property AsInteger: LongInt; [rw] | Get/Set parameter value as an integer (32-bit) value
property AsLargeInt: LargeInt; [rw] | Get/Set parameter value as a 64-bit integer value
property AsMemo: ; [rw] | Get/Set parameter value as a memo (string) value
property AsSmallInt: LongInt; [rw] | Get/Set parameter value as a smallint value
property AsString: ; [rw] | Get/Set parameter value as a string value
property AsTime: TDateTime; [rw] | Get/Set parameter value as a time (TDateTime) value
property AsWord: LongInt; [rw] | Get/Set parameter value as a word value
property AsFMTBCD: TBCD; [rw]
property Bound: Boolean; [rw] | Is the parameter value bound (set to fixed value)
property Dataset: TDataSet; [r] | Dataset to which this parameter belongs
property IsNull: Boolean; [r] | Is the parameter empty
property NativeStr: ; [rw] | No description available
property Text: ; [rw] | Read or write the value of the parameter as a string
property Value: Variant; [rws] | Value as a variant
property AsWideString: WideString; [rw] | Get/Set the value as a widestring
published
property DataType: TFieldType; [rw] | Data type of the parameter
property Name: ; [rw] | Name of the parameter
property NumericScale: Integer; [rw] | Numeric scale
property ParamType: TParamType; [rw] | Type of parameter
property Precision: Integer; [rw] | Precision of the BCD value
property Size: Integer; [rw] | Size of the parameter
end;

Inheritance

TParam

Parameter description class
|

TCollectionItem
|

TPersistent
|

TObject

Description

TParam is one item in a TParams collection. It describes the name (TParam.Name), type (ParamType) and value (TParam.Value) of a parameter in a parametrized query or stored procedure. Under normal circumstances, it should never be necessary to create a TParam instance manually; the TDataset descendent that owns the parameters should have created all necessary TParam instances.

See also

TParams

A collection of parameter values for SQL-based datasets


TParam
 |  | AsBlob
 |  | AsBoolean
 |  | AsCurrency
 |  | AsDate
 |  | AsDateTime
 |  | AsFloat
 |  | AsInteger
 |  | AsLargeInt
 |  | AsMemo
 |  | AsSmallInt
 |  | AsString
 |  | AsTime
 |  | AsWord
 |  | AsFMTBCD
 |  | Bound
 | ro | Dataset
 | ro | IsNull
 |  | NativeStr
 |  | Text
 |  | Value
 |  | AsWideString
pl |  | DataType
pl |  | Name
pl |  | NumericScale
pl |  | ParamType
pl |  | Precision
pl |  | Size
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


 |  | AsBlob (TParam)
 |  | AsBoolean (TParam)
 |  | AsCurrency (TParam)
 |  | AsDate (TParam)
 |  | AsDateTime (TParam)
 |  | AsFloat (TParam)
 |  | AsFMTBCD (TParam)
 |  | AsInteger (TParam)
 |  | AsLargeInt (TParam)
 |  | AsMemo (TParam)
 |  | AsSmallInt (TParam)
 |  | AsString (TParam)
 |  | AsTime (TParam)
 |  | AsWideString (TParam)
 |  | AsWord (TParam)
 |  | Bound (TParam)
 |  | Collection (TCollectionItem)
 | ro | Dataset (TParam)
pl |  | DataType (TParam)
 |  | DisplayName (TCollectionItem)
 | ro | ID (TCollectionItem)
 |  | Index (TCollectionItem)
 | ro | IsNull (TParam)
pl |  | Name (TParam)
 |  | NativeStr (TParam)
pl |  | NumericScale (TParam)
pl |  | ParamType (TParam)
pl |  | Precision (TParam)
pl |  | Size (TParam)
 |  | Text (TParam)
 | ro | UpdateCount (TCollectionItem)


TParam
 | Create
 | Assign
 | AssignField
 | AssignToField
 | AssignFieldValue
 | AssignFromField
 | Clear
 | GetData
 | GetDataSize
 | LoadFromFile
 | LoadFromStream
 | SetBlobData
 | SetData
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignField (TParam)

AssignFieldValue (TParam)

AssignFromField (TParam)

AssignTo (TPersistent)

AssignToField (TParam)

BeforeDestruction (TObject)

Changed (TCollectionItem)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TParam)

Create (TObject)

Create (TCollectionItem)

Create (TParam)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TCollectionItem)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetData (TParam)

GetDataSize (TParam)

GetDisplayName (TCollectionItem)

GetHashCode (TObject)

GetIndex (TCollectionItem)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TCollectionItem)

GetOwner (TPersistent)

GetOwner (TCollectionItem)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

LoadFromFile (TParam)

LoadFromStream (TParam)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SetBlobData (TParam)

SetCollection (TCollectionItem)

SetData (TParam)

SetDisplayName (TCollectionItem)

SetIndex (TCollectionItem)


TParam

TCollectionItem

TPersistent

TObject


TParam.AsBlob

Return parameter value as a blob

Declaration

Source position: db.pas line 1178

public property TParam.AsBlob: TBlobData
  read GetAsString
  write SetAsBlob;

Description

AsBlob returns the parameter value as a blob: currently this is a string. It can be set to set the parameter value.

See also

TParam.AsString

Get/Set parameter value as a string value


TParam.AsBoolean

Get/Set parameter value as a boolean value

Declaration

Source position: db.pas line 1179

public property TParam.AsBoolean: Boolean
  read GetAsBoolean
  write SetAsBoolean;

Description

AsBoolean will return the parameter value as a boolean value. If it is written, the value is set to the specified value and the data type is set to ftBoolean.

See also

TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsCurrency

Get/Set parameter value as a currency value

Declaration

Source position: db.pas line 1180

public property TParam.AsCurrency: Currency
  read GetAsCurrency
  write SetAsCurrency;

Description

AsCurrency will return the parameter value as a currency value. If it is written, the value is set to the specified value and the data type is set to ftCurrency.

See also

TParam.AsFloat | Get/Set parameter value as a floating-point value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsDate

Get/Set parameter value as a date (TDateTime) value

Declaration

Source position: db.pas line 1181

public property TParam.AsDate: TDateTime
  read GetAsDateTime
  write SetAsDate;

Description

AsDate will return the parameter value as a date value. If it is written, the value is set to the specified value and the data type is set to ftDate.

See also

TParam.AsDateTime | Get/Set parameter value as a date/time (TDateTime) value
TParam.AsTime | Get/Set parameter value as a time (TDateTime) value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsDateTime

Get/Set parameter value as a date/time (TDateTime) value

Declaration

Source position: db.pas line 1182

public property TParam.AsDateTime: TDateTime
  read GetAsDateTime
  write SetAsDateTime;

Description

AsDateTime will return the parameter value as a TDateTime value. If it is written, the value is set to the specified value and the data type is set to ftDateTime.

See also

TParam.AsDate | Get/Set parameter value as a date (TDateTime) value
TParam.asTime | Get/Set parameter value as a time (TDateTime) value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsFloat

Get/Set parameter value as a floating-point value

Declaration

Source position: db.pas line 1183

public property TParam.AsFloat: Double
  read GetAsFloat
  write SetAsFloat;

Description

AsFLoat will return the parameter value as a double floating-point value. If it is written, the value is set to the specified value and the data type is set to ftFloat.

See also

TParam.AsCurrency | Get/Set parameter value as a currency value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsFMTBCD

Declaration

Source position: db.pas line 1191

public property TParam.AsFMTBCD: TBCD
  read GetAsFMTBCD
  write SetAsFMTBCD;


TParam.AsInteger

Get/Set parameter value as an integer (32-bit) value

Declaration

Source position: db.pas line 1184

public property TParam.AsInteger: LongInt
  read GetAsInteger
  write SetAsInteger;

Description

AsInteger will return the parameter value as a 32-bit signed integer value. If it is written, the value is set to the specified value and the data type is set to ftInteger.

See also

TParam.AsLargeInt | Get/Set parameter value as a 64-bit integer value
TParam.AsSmallInt | Get/Set parameter value as a smallint value
TParam.AsWord | Get/Set parameter value as a word value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsLargeInt

Get/Set parameter value as a 64-bit integer value

Declaration

Source position: db.pas line 1185

public property TParam.AsLargeInt: LargeInt
  read GetAsLargeInt
  write SetAsLargeInt;

Description

AsLargeInt will return the parameter value as a 64-bit signed integer value. If it is written, the value is set to the specified value and the data type is set to ftLargeInt.

See also

TParam.asInteger | Get/Set parameter value as an integer (32-bit) value
TParam.asSmallint | Get/Set parameter value as a smallint value
TParam.AsWord | Get/Set parameter value as a word value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsMemo

Get/Set parameter value as a memo (string) value

Declaration

Source position: db.pas line 1186

public property TParam.AsMemo:
  read GetAsMemo
  write SetAsMemo;

Description

AsMemo will return the parameter value as a memo (string) value. If it is written, the value is set to the specified value and the data type is set to ftMemo.

See also

TParam.asString | Get/Set parameter value as a string value
TParam.LoadFromStream | Load a parameter value from stream
TParam.SaveToStream
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.Assign

Assign one parameter instance to another

Declaration

Source position: db.pas line 1166

public procedure TParam.Assign(

  Source: TPersistent

); override;

Arguments

Source

Source object to copy value from

Description

Assign copies the Name, ParamType, Bound, Value, SizePrecision and NumericScale properties from ASource if it is of type TParam. If Source is of type TField, then it is passed to TParam.AssignField. If Source is of type TStrings, then it is assigned to TParams.AsMemo.

Errors

If Source is not of type TParam, TField or TStrings, an exception will be raised.

See also

TField | Provide access to the contents of a single field in a record
TParam.Name | Name of the parameter
TParam.Bound | Is the parameter value bound (set to fixed value)
TParam.NumericScale | Numeric scale
TParam.ParamType | Type of parameter
TParam.value | Value as a variant
TParam.Size | Size of the parameter
TParam.AssignField | Copy value from field instance
Tparam.AsMemo | Get/Set parameter value as a memo (string) value


TParam.AssignField

Copy value from field instance

Declaration

Source position: db.pas line 1167

public procedure TParam.AssignField(

  Field: TField

);

Arguments

Field

Field instance to copy field name and value from.

Description

AssignField copies the Field, FieldName and Value to the parameter instance. The parameter is bound after this operation. If Field is Nil then the parameter name and value are cleared.

See also

TParam.assign | Assign one parameter instance to another
TParam.AssignToField | Assign parameter value to field
TParam.AssignFieldValue | Assign field value to the parameter.


TParam.AssignFieldValue

Assign field value to the parameter.

Declaration

Source position: db.pas line 1169

public procedure TParam.AssignFieldValue(

  Field: TField;

  const AValue: Variant

);

Arguments

Field | Field to copy parameter type from.
AValue | Value to assign to parameter.

Description

AssignFieldValue copies only the field type from Field and the value from the AValue parameter. It sets the TParam.Bound bound parameter to True. This method is called from TParam.AssignField.

See also

TField | Provide access to the contents of a single field in a record
TParam.AssignField | Copy value from field instance
TParam.Bound | Is the parameter value bound (set to fixed value)


TParam.AssignFromField

Copy field type and value

Declaration

Source position: db.pas line 1170

public procedure TParam.AssignFromField(

  Field: TField

);

Arguments

Field

Field to copy type and value from.

Description

AssignFromField copies the field value and data type (TField.DataType) to the parameter instance. If Field is Nil, nothing happens. This is the reverse operation of TParam.AssignToField.

Errors

An EDatabaseError exception is raised if the field has an unsupported field type (for types ftCursor, ftArray, ftDataset,ftReference).

See also

TParam.Assign | Assign one parameter instance to another
TParam.AssignField | Copy value from field instance
TParam.AssignToField | Assign parameter value to field


TParam.AssignToField

Assign parameter value to field

Declaration

Source position: db.pas line 1168

public procedure TParam.AssignToField(

  Field: TField

);

Arguments

Field

Field instance to assign value to.

Description

AssignToField copies the parameter value to the field instance. If Field is Nil, nothing happens.

Errors

An EDatabaseError exception is raised if the field has an unsupported field type (for types ftCursor, ftArray, ftDataset,ftReference).

See also

TParam.Assign | Assign one parameter instance to another
TParam.AssignField | Copy value from field instance
TParam.AssignFromField | Copy field type and value


TParam.AsSmallInt

Get/Set parameter value as a smallint value

Declaration

Source position: db.pas line 1187

public property TParam.AsSmallInt: LongInt
  read GetAsInteger
  write SetAsSmallInt;

Description

AsSmallint will return the parameter value as a 16-bit signed integer value. If it is written, the value is set to the specified value and the data type is set to ftSmallint.

See also

TParam.AsInteger | Get/Set parameter value as an integer (32-bit) value
TParam.AsLargeInt | Get/Set parameter value as a 64-bit integer value
TParam.AsWord | Get/Set parameter value as a word value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsString

Get/Set parameter value as a string value

Declaration

Source position: db.pas line 1188

public property TParam.AsString:
  read GetAsString
  write SetAsString;

Description

AsString will return the parameter value as a string value. If it is written, the value is set to the specified value and the data type is set to ftString.

See also

TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsTime

Get/Set parameter value as a time (TDateTime) value

Declaration

Source position: db.pas line 1189

public property TParam.AsTime: TDateTime
  read GetAsDateTime
  write SetAsTime;

Description

AsTime will return the parameter value as a time (TDateTime) value. If it is written, the value is set to the specified value and the data type is set to ftTime.

See also

TParam.AsDate | Get/Set parameter value as a date (TDateTime) value
TParam.AsDateTime | Get/Set parameter value as a date/time (TDateTime) value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.AsWideString

Get/Set the value as a widestring

Declaration

Source position: db.pas line 1198

public property TParam.AsWideString: WideString
  read GetAsWideString
  write SetAsWideString;

Description

AsWideString returns the parameter value as a widestring value. Setting the property will set the value of the parameter and will also set the DataType to ftWideString.

See also

TParam.AsString | Get/Set parameter value as a string value
TParam.Value | Value as a variant
TParam.DataType | Data type of the parameter


TParam.AsWord

Get/Set parameter value as a word value

Declaration

Source position: db.pas line 1190

public property TParam.AsWord: LongInt
  read GetAsInteger
  write SetAsWord;

Description

AsWord will return the parameter value as an integer. If it is written, the value is set to the specified value and the data type is set to ftWord.

See also

TParam.AsInteger | Get/Set parameter value as an integer (32-bit) value
TParam.AsLargeInt | Get/Set parameter value as a 64-bit integer value
TParam.AsSmallint | Get/Set parameter value as a smallint value
TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.Bound

Is the parameter value bound (set to fixed value)

Declaration

Source position: db.pas line 1192

public property TParam.Bound: Boolean
  read FBound
  write FBound;

Description

Bound indicates whether a parameter has received a fixed value: setting the parameter value will set Bound to True. When creating master-detail relationships, parameters with their Bound property set to True will not receive a value from the master dataset: their value will be kept. Only parameters where Bound is False will receive a new value from the master dataset.

See also

TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant


TParam.Clear

Clear the parameter value

Declaration

Source position: db.pas line 1171

public procedure TParam.Clear;

Description

Clear clears the parameter value, it is set to UnAssigned. The Datatype, parameter type or name are not touched.

See also

TParam.Value | Value as a variant
TParam.Name | Name of the parameter
TParam.ParamType | Type of parameter
TParam.DataType | Data type of the parameter


TParam.Create

Create a new parameter value

Declaration

Source position: line 0

constructor TParam.Create(

  ACollection: TCollection

); override; overload;

constructor TParam.Create(

  AParams: TParams;

  AParamType: TParamType

); overload;

Arguments

ACollection

Collection this parameter is part of

Arguments

AParams | TParams instance this parameter is part of
AParamType | Parameter type for the new parameter instance

Description

Create first calls the inherited create, and then initializes the parameter properties. The first form creates a default parameter, the second form is a convenience function and initializes a parameter of a certain kind (AParamType), in which case the owning TParams collection must be specified in AParams

See also

TParams

A collection of parameter values for SQL-based datasets


TParam.Dataset

Dataset to which this parameter belongs

Declaration

Source position: db.pas line 1193

public property TParam.Dataset: TDataSet
  read GetDataset;

Description

Dataset is the dataset that owns the TParams instance of which this TParam instance is a part. It is Nil if the collection is not set, or is not a TParams instance.

See also

TDataset | Base class for records-based data-access
TParams | A collection of parameter values for SQL-based datasets


TParam.DataType

Data type of the parameter

Declaration

Source position: db.pas line 1200

published property TParam.DataType: TFieldType
  read FDataType
  write SetDataType;

Description

DataType is the current data type of the parameter value. It is set automatically when one of the various AsXYZ properties is written, or when the value is copied from a field value.

See also

TParam.IsNull | Is the parameter empty
TParam.Value | Value as a variant
TParam.AssignField | Copy value from field instance


TParam.GetData

Get the parameter value from a memory buffer

Declaration

Source position: db.pas line 1172

public procedure TParam.GetData(

  Buffer: Pointer

);

Arguments

Buffer

Buffer to copy parameter value to.

Description

GetData retrieves the parameter value and stores it in buffer It uses the same data layout as TField, and can be used to copy the parameter value to a record buffer.

Errors

Only basic field types are supported. Using an unsupported field type will result in an EdatabaseError exception.

See also

TParam.SetData | Set the parameter value from a buffer
TField | Provide access to the contents of a single field in a record


TParam.GetDataSize

Return the size of the data.

Declaration

Source position: db.pas line 1173

public function TParam.GetDataSize: Integer;

Function result

Size (in bytes) for the current value

Description

GetDataSize returns the size (in bytes) needed to store the current value of the parameter.

Errors

For an unsupported data type, an EDatabaseError exception is raised when this function is called.

See also

TParam.GetData | Get the parameter value from a memory buffer
TParam.SetData | Set the parameter value from a buffer


TParam.IsNull

Is the parameter empty

Declaration

Source position: db.pas line 1194

public property TParam.IsNull: Boolean
  read GetIsNull;

Description

IsNull is True is the value is empty or not set (Null or UnAssigned).

See also

TParam.Clear | Clear the parameter value
TParam.Value | Value as a variant


TParam.LoadFromFile

Load a parameter value from file

Declaration

Source position: db.pas line 1174

public procedure TParam.LoadFromFile(

  const FileName: ;

  BlobType: TBlobType

);

Arguments

FileName | Name of existing file to load blob data from.
BlobType | New value for DataType

Description

LoadFromFile can be used to load a BLOB-type parameter from a file named FileName. The BlobType parameter can be used to set the exact data type of the parameter: it must be one of the BLOB data types. This function simply creates a TFileStream instance and passes it to TParam.LoadFromStream.

Errors

If the specified FileName is not a valid file, or the file is not readable, an exception will occur.

See also

TParam.LoadFromStream | Load a parameter value from stream
TBlobType | Valid BLOB fieldtypes
TParam.SaveToFile


TParam.LoadFromStream

Load a parameter value from stream

Declaration

Source position: db.pas line 1175

public procedure TParam.LoadFromStream(

  Stream: TStream;

  BlobType: TBlobType

);

Arguments

Stream | Stream to load BLOB data from.
BlobType | Data type for the parameter

Description

LoadFromStream can be used to load a BLOB-type parameter from a stream. The BlobType parameter can be used to set the exact data type of the parameter: it must be one of the BLOB data types.

Errors

If the stream does not support taking the Size of the stream, an exception will be raised.

See also

TParam.LoadFromFile

Load a parameter value from file

TParam.SaveToStream


TParam.Name

Name of the parameter

Declaration

Source position: db.pas line 1201

published property TParam.Name:
  read FName
  write FName;

Description

Name is the name of the parameter. The name is usually determined automatically from the SQL statement the parameter is part of. Each parameter name should appear only once in the collection.

See also

TParam.DataType | Data type of the parameter
TParam.Value | Value as a variant
TParams.ParamByName | Return a parameter by name


TParam.NativeStr

No description available

Declaration

Source position: db.pas line 1195

public property TParam.NativeStr:
  read FNativeStr
  write FNativeStr;

Description

No description available


TParam.NumericScale

Numeric scale

Declaration

Source position: db.pas line 1202

published property TParam.NumericScale: Integer
  read FNumericScale
  write FNumericScale
  default 0;

Description

NumericScale can be used to store the numerical scale for BCD values. It is currently unused.

See also

TParam.Precision | Precision of the BCD value
TParam.Size | Size of the parameter


TParam.ParamType

Type of parameter

Declaration

Source position: db.pas line 1203

published property TParam.ParamType: TParamType
  read FParamType
  write FParamType;

Description

ParamTyp specifies the type of parameter: is the parameter value written to the database engine, or is it received from the database engine, or both ? It can have the following value:

ptUnknown
Unknown type
ptInput
Input parameter
ptOutput
Output paramete, filled on result
ptInputOutput
Input/output parameter
ptResult
Result parameter

The ParamType property is usually set by the database engine that creates the parameter instances.

See also

TParam.DataType | Data type of the parameter
TParam.DataSize
TParam.Name | Name of the parameter


TParam.Precision

Precision of the BCD value

Declaration

Source position: db.pas line 1204

published property TParam.Precision: Integer
  read FPrecision
  write FPrecision
  default 0;

Description

Precision can be used to store the numerical precision for BCD values. It is currently unused.

See also

TParam.NumericScale | Numeric scale
TParam.Size | Size of the parameter


TParam.SetBlobData

Set BLOB data

Declaration

Source position: db.pas line 1176

public procedure TParam.SetBlobData(

  Buffer: Pointer;

  ASize: Integer

);

Arguments

Buffer | Memory buffer to load data from
ASize | Size of memory buffer to load data from

Description

SetBlobData reads the value of a BLOB type parameter from a memory buffer: the data is read from the memory buffer Buffer and is assumed to be Size bytes long.

Errors

No checking is performed on the validity of the data buffer. If the data buffer is invalid or the size is wrong, an exception may occur.

See also

TParam.LoadFromStream

Load a parameter value from stream


TParam.SetData

Set the parameter value from a buffer

Declaration

Source position: db.pas line 1177

public procedure TParam.SetData(

  Buffer: Pointer

);

Arguments

Buffer

Buffer to read data from

Description

SetData performs the rever operation of TParam.GetData: it reads the parameter value from the memory area pointed to by Buffer. The size of the data read is determined by TParam.GetDataSize and the type of data by TParam.DataType : it is the same storage mechanism used by TField, and so can be used to copy the value from a TDataset record buffer.

Errors

Not all field types are supported. If an unsupported field type is encountered, an EDatabaseError exception is raised.

See also

TDataset | Base class for records-based data-access
TParam.GetData | Get the parameter value from a memory buffer
TParam.DataType | Data type of the parameter
TParam.GetDataSize | Return the size of the data.


TParam.Size

Size of the parameter

Declaration

Source position: db.pas line 1205

published property TParam.Size: Integer
  read FSize
  write FSize
  default 0;

Description

Size is the declared size of the parameter. In the current implementation, this parameter is ignored other than copying it from TField.DataSize in the TParam.AssignFieldValue method. The actual size can be retrieved through the TParam.Datasize property.

See also

TParam.Datasize
TField.DataSize | Size of the field's data
TParam.AssignFieldValue | Assign field value to the parameter.


TParam.Text

Read or write the value of the parameter as a string

Declaration

Source position: db.pas line 1196

public property TParam.Text:
  read GetAsString
  write SetText;

Description

AsText returns the same value as TParam.AsString, but, when written, does not set the data type: instead, it attempts to convert the value to the type specified in TParam.Datatype.

See also

TParam.AsString | Get/Set parameter value as a string value
TParam.DataType | Data type of the parameter


TParam.Value

Value as a variant

Declaration

Source position: db.pas line 1197

public property TParam.Value: Variant
  read GetAsVariant
  write SetAsVariant
  stored IsParamStored;

Description

Value returns (or sets) the value as a variant value.

See also

TParam.DataType

Data type of the parameter


TParamBinding

Auxiliary type, used when binding parameters.

Declaration

Source position: db.pas line 1106

type TParamBinding = array of Integer;

Description

TParamBinding is an axuiliary type used when parsing and binding parameters in SQL statements. It should never be used directly in application code.

See also

TParams | A collection of parameter values for SQL-based datasets
TParam | Parameter description class


TParams

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

A collection of parameter values for SQL-based datasets

Declaration

Source position: db.pas line 1211

type TParams = class(TCollection)
procedure Create(); | Create a new instance of TParams
public
procedure AddParam(); | Add a parameter to the collection
procedure AssignValues(); | Copy values from another collection
function CreateParam(); | Create and add a new parameter to the collection
function FindParam(); | Find a parameter with given name
procedure GetParamList(); | Fetch a list of TParam instances
function IsEqual(); | Is the list of parameters equal
function ParamByName(); | Return a parameter by name
public
function ParseSQL(); | Parse SQL statement, replacing parameter names with SQL parameter placeholders
public
procedure RemoveParam(); | Remove a parameter from the collection
procedure CopyParamValuesFromDataset(); | Copy parameter values from a the fields in a dataset.
property Dataset: TDataSet; [r] | Dataset that owns the TParams instance
property Items: TParam; default; [rw] | Indexed access to TParams instances in the collection
property ParamValues: Variant; [rw] | Named access to the parameter values.
end;

Inheritance

TParams

A collection of parameter values for SQL-based datasets
|

TCollection
|

TPersistent
|

TObject

Description

TParams is a collection of TParam values. It is used to specify parameter values for parametrized SQL statemens, but is also used to specify parameter values for stored procedures. Its default property is an array of TParam values. The class also offers a method to scan a SQL statement for parameter names and replace them with placeholders understood by the SQL engine: TParams.ParseSQL.

TDataset itself does not use TParams. The class is provided in the DB unit, so all TDataset descendents that need some kind of parametrization make use of the same interface. The TMasterParamsDataLink class can be used to establish a master-detail relationship between a parameter-aware TDataset instance and another dataset; it will automatically refresh parameter values when the fields in the master dataset change. To this end, the TParams.CopyParamValuesFromDataset method exists.

See also

TDataset | Base class for records-based data-access
TMasterParamsDataLink | Class to establish a master-detail relationship between dataset, based on parameters
TParam | Parameter description class
TParams.ParseSQL | Parse SQL statement, replacing parameter names with SQL parameter placeholders
TParams.CopyParamValuesFromDataset | Copy parameter values from a the fields in a dataset.


TParams
 | ro | Dataset
 |  | Items
 |  | ParamValues
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
ro | Dataset (TParams)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | Items (TParams)
 | ParamValues (TParams)
 | PropName (TCollection)
ro | UpdateCount (TCollection)


TParams
 | Create
 | AddParam
 | AssignValues
 | CreateParam
 | FindParam
 | GetParamList
 | IsEqual
 | ParamByName
 | ParseSQL
 | RemoveParam
 | CopyParamValuesFromDataset
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

AddParam (TParams)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

AssignValues (TParams)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

CopyParamValuesFromDataset (TParams)

Create (TObject)

Create (TCollection)

Create (TParams)

CreateParam (TParams)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

FindItemID (TCollection)

FindParam (TParams)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetParamList (TParams)

GetPropName (TCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

IsEqual (TParams)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

ParamByName (TParams)

ParseSQL (TParams)

RemoveItem (TCollection)

RemoveParam (TParams)

SafeCallException (TObject)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TParams

TCollection

TPersistent

TObject


TParams.AddParam

Add a parameter to the collection

Declaration

Source position: db.pas line 1225

public procedure TParams.AddParam(

  Value: TParam

);

Arguments

Value

TParam instance to add to the collection.

Description

AddParam adds Value to the collection.

Errors

No checks are done on the TParam instance. If it is Nil, an exception will be raised.

See also

TParam

Parameter description class

#rtl.classes.tcollection.add


TParams.AssignValues

Copy values from another collection

Declaration

Source position: db.pas line 1226

public procedure TParams.AssignValues(

  Value: TParams

);

Arguments

Value

Set of parameters to copy values from.

Description

AssignValues examines all TParam instances in Value, and looks in its own items for a TParam instance with the same name. If it is found, then the value and type of the parameter are copied (using TParam.Assign). If it is not found, nothing is done.

See also

TParam | Parameter description class
TParam.Assign | Assign one parameter instance to another


TParams.CopyParamValuesFromDataset

Copy parameter values from a the fields in a dataset.

Declaration

Source position: db.pas line 1237

public procedure TParams.CopyParamValuesFromDataset(

  ADataset: TDataSet;

  CopyBound: Boolean

);

Arguments

ADataset | Dataset to copy values from
CopyBound | Copy value also for bound parameters ?

Description

CopyParamValuesFromDataset assigns values to all parameters in the collection by searching in ADataset for fields with the same name, and assigning the value of the field to the Tparam instances using TParam.AssignField. By default, this operation is only performed on TParam instances with their Bound property set to False. If CopyBound is true, then the operation is performed on all TParam instances in the collection.

Errors

If, for some TParam instance, ADataset misses a field with the same name, an EDatabaseError exception will be raised.

See also

TParam | Parameter description class
TParam.Bound | Is the parameter value bound (set to fixed value)
TParam.AssignField | Copy value from field instance
TDataset | Base class for records-based data-access
TDataset.FieldByName | Search a field by name


TParams.Create

Create a new instance of TParams

Declaration

Source position: line 0

constructor TParams.Create(

  AOwner: TPersistent

); overload;

constructor TParams.Create; overload;

Arguments

AOwner

Owner of the collection.

Description

Create initializes a new instance of TParams. It calls the inherited constructor with TParam as the collection's item class, and sets AOwner as the owner of the collection. Usually, AOwner will be the dataset that needs parameters.

See also

#rtl.classes.TCollection.create

TParam

Parameter description class


TParams.CreateParam

Create and add a new parameter to the collection

Declaration

Source position: db.pas line 1227

public function TParams.CreateParam(

  FldType: TFieldType;

  const ParamName: ;

  ParamType: TParamType

):TParam;

Arguments

FldType | Value for the DataType property of the new instance.
ParamName | Value for the Name property of the new instance.
ParamType | Value for the ParamType property of the new instance.

Function result

Newly added TParam instance.

Description

CreateParam creates a new TParam instance with datatype equal to fldType, Name equal to ParamName and sets its ParamType property to ParamType. The parameter is then added to the collection.

See also

TParam | Parameter description class
TParam.Name | Name of the parameter
TParam.Datatype | Data type of the parameter
TParam.Paramtype | Type of parameter


TParams.Dataset

Dataset that owns the TParams instance

Declaration

Source position: db.pas line 1238

public property TParams.Dataset: TDataSet
  read GetDataset;

Description

Dataset is the TDataset instance that was specified when the TParams instance was created.

See also

TParams.Create | Create a new instance of TParams
TDataset | Base class for records-based data-access


TParams.FindParam

Find a parameter with given name

Declaration

Source position: db.pas line 1228

public function TParams.FindParam(

  const Value:

):TParam;

Arguments

Value

Parameter name to search for.

Function result

TParam instance with Name equal to Value or Nil.

Description

FindParam searches the collection for the TParam instance with property Name equal to Value. It will return the last instance with the given name, and will only return one instance. If no match is found, Nil is returned.

Remark: A TParams collection can have 2 TParam instances with the same name: no checking for duplicates is done.

See also

TParam.Name | Name of the parameter
TParams.ParamByName | Return a parameter by name
TParams.GetParamList | Fetch a list of TParam instances


TParams.GetParamList

Fetch a list of TParam instances

Declaration

Source position: db.pas line 1229

public procedure TParams.GetParamList(

  List: TList;

  const ParamNames:

);

Arguments

List | List to add TParam instances to.
ParamNames | Semicolon-separated list of parameter names.

Description

GetParamList examines the parameter names in the semicolon-separated list ParamNames. It searches each TParam instance from the names in the list and adds it to List.

Errors

If the ParamNames list contains an unknown parameter name, then an exception is raised. Whitespace is not discarded.

See also

TParam | Parameter description class
TParam.Name | Name of the parameter
TParams.ParamByName | Return a parameter by name


TParams.IsEqual

Is the list of parameters equal

Declaration

Source position: db.pas line 1230

public function TParams.IsEqual(

  Value: TParams

):Boolean;

Arguments

Value

Collection of TParam values.

Function result

True if all items in Value match the own items

Description

IsEqual compares the parameter count of Value and if it matches, it compares all TParam items of Value with the items it owns. If all items are equal (all properties match), then True is returned. The items are compared on index, so the order is important.

See also

TParam

Parameter description class


TParams.Items

Indexed access to TParams instances in the collection

Declaration

Source position: db.pas line 1239

public property TParams.Items: TParam
  read GetItem
  write SetItem;
  default;

Description

Items is overridden by TParams so it has the proper type (TParam). The Index runs from 0 to Count-1.

See also

TParams

A collection of parameter values for SQL-based datasets


TParams.ParamByName

Return a parameter by name

Declaration

Source position: db.pas line 1231

public function TParams.ParamByName(

  const Value:

):TParam;

Arguments

Value

Name to search for.

Function result

TParam instance with Name equal to Value.

Description

ParamByName searches the collection for the TParam instance with property Name equal to Value. It will return the last instance with the given name, and will only return one instance. If no match is found, an exception is raised.

Remark: A TParams collection can have 2 TParam instances with the same name: no checking for duplicates is done.

See also

TParam.Name | Name of the parameter
TParams.FindParam | Find a parameter with given name
TParams.GetParamList | Fetch a list of TParam instances


TParams.ParamValues

Named access to the parameter values.

Declaration

Source position: db.pas line 1240

public property TParams.ParamValues: Variant
  read GetParamValue
  write SetParamValue;

Description

ParamValues provides access to the parameter values (TParam.Value) by name. It is equivalent to reading and writing

ParamByName(ParamName).Value

See also

TParam.Value | Value as a variant
TParams.ParamByName | Return a parameter by name


TParams.ParseSQL

Parse SQL statement, replacing parameter names with SQL parameter placeholders

Declaration

Source position: line 0

function TParams.ParseSQL(

  SQL: ;

  DoCreate: Boolean

):; overload;

function TParams.ParseSQL(

  SQL: ;

  DoCreate: Boolean;

  EscapeSlash: Boolean;

  EscapeRepeat: Boolean;

  ParameterStyle: TParamStyle

):; overload;

function TParams.ParseSQL(

  SQL: ;

  DoCreate: Boolean;

  EscapeSlash: Boolean;

  EscapeRepeat: Boolean;

  ParameterStyle: TParamStyle;

  var ParamBinding: TParamBinding

):; overload;

function TParams.ParseSQL(

  SQL: ;

  DoCreate: Boolean;

  EscapeSlash: Boolean;

  EscapeRepeat: Boolean;

  ParameterStyle: TParamStyle;

  var ParamBinding: TParamBinding;

  var ReplaceString:

):; overload;

Arguments

SQL | SQL statement to scan for parameter names
DoCreate | Set to True if TParam instances must be created for the found parameters.

Function result

SQL statement with parameter names replaced with placeholders

Arguments

SQL | SQL statement to scan for parameter names
DoCreate | Set to True if TParam instances must be created for the found parameters.
EscapeSlash | True if the backslash character acts as an escape token.
EscapeRepeat | True if quotes are escaped by specifying them two times.
ParameterStyle | SQL Placeholder style

Arguments

SQL | SQL statement to scan for parameter names
DoCreate | Set to True if TParam instances must be created for the found parameters.
EscapeSlash | True if the backslash character acts as an escape token.
EscapeRepeat | True if quotes are escaped by specifying them two times.
ParameterStyle | SQL Placeholder style
ParamBinding | On return, filled with indexes of TParam instances corresponding to the placeholders

Arguments

SQL | SQL statement to scan for parameter names
DoCreate | Set to True if TParam instances must be created for the found parameters.
EscapeSlash | True if the backslash character acts as an escape token.
EscapeRepeat | True if quotes are escaped by specifying them two times.
ParameterStyle | SQL Placeholder style
ParamBinding | On return, filled with indexes of TParam instances corresponding to the placeholders
ReplaceString | Placeholder string.

Description

ParseSQl parses the SQL statement for parameter names in the form :ParamName. It replaces them with a SQL parameter placeholder. If DoCreate is True then a TParam instance is added to the collection with the found parameter name.

The parameter placeholder is determined by the ParameterStyle property, which can have the following values:

psInterbase
Parameters are specified by a ? character
psPostgreSQL
Parameters are specified by a $N character.
psSimulated
Parameters are specified by a $N character.

psInterbase is the default.

If the EscapeSlash parameter is True, then backslash characters are used to quote the next character in the SQL statement. If it is False, the backslash character is regarded as a normal character.

If the EscapeRepeat parameter is True (the default) then embedded quotes in string literals are escaped by repeating themselves. If it is false then they should be quoted with backslashes.

ParamBinding, if specified, is filled with the indexes of the parameter instances in the parameter collection: for each SQL parameter placeholder, the index of the corresponding TParam instance is returned in the array.

ReplaceString, if specified, contains the placeholder used for the parameter names (by default, $). It has effect only when ParameterStyle equals psSimulated.

The function returns the SQL statement with the parameter names replaced by placeholders.

See also

TParam | Parameter description class
TParam.Name | Name of the parameter
TParamStyle | Style of parameter


TParams.RemoveParam

Remove a parameter from the collection

Declaration

Source position: db.pas line 1236

public procedure TParams.RemoveParam(

  Value: TParam

);

Arguments

Value

Parameter to remove from the collection.

Description

RemoveParam removes the parameter Value from the collection, but does not free the instance.

Errors

Value must be a valid instance, or an exception will be raised.

See also

TParam

Parameter description class


TParamStyle

Style of parameter

Declaration

Source position: db.pas line 1111

type TParamStyle = (
psInterbase, | Parameters are specified by a ? character
psPostgreSQL, | Parameters are specified by a $N character.
psSimulated | Parameters are specified by a $N character.
);

Description

TParamStyle denotes the style in which parameters are specified in a query. It is used in the TParams.ParseSQl method, and can have the following values:

psInterbase
Parameters are specified by a ? character
psPostgreSQL
Parameters are specified by a $N character.
psSimulated
Parameters are specified by a $N character.

See also

TParams.ParseSQL

Parse SQL statement, replacing parameter names with SQL parameter placeholders


TSmallintField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for smallint (16-bit signed integer) data

Declaration

Source position: db.pas line 599

type TSmallintField = class(TLongintField)

public

  constructor Create(); override;

Create a new instance of the TSmallintField class.

end;

Inheritance

TSmallintField | Field class for smallint (16-bit signed integer) data
|
TLongintField | Field class for 32-bit signed integer data
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TSmallIntField is the class created when a dataset must manage 16-bit signed integer data, of datatype ftSmallInt. It exposes no new properties, but simply overrides some methods to manage 16-bit signed integer data.

It should never be necessary to create an instance of TSmallIntField manually, a field of this class will be instantiated automatically for each smallint field when a dataset is opened.

See also

TField | Provide access to the contents of a single field in a record
TNumericField | Base class for all numerical data field classe
TLongintField | Field class for 32-bit signed integer data
TWordField | Field class for word (16-bit unsigned integer) data


TSmallintField
TLongintField
 |  | Value
pl |  | MaxValue
pl |  | MinValue
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TSmallintField
 | Create
TLongintField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TLongintField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TLongintField)

Create (TSmallintField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TSmallintField
TLongintField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TSmallintField.Create

Create a new instance of the TSmallintField class.

Declaration

Source position: db.pas line 603

public constructor TSmallintField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field component.

Description

Create initializes a new instance of the TSmallintField class. It calls the inherited constructor and then simply sets some of the TField properties to work with 16-bit signed integer data.

See also

TField

Provide access to the contents of a single field in a record


TStringField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class to handle ansistring fields

Declaration

Source position: db.pas line 452

type TStringField = class(TField)
public
constructor Create(); override; | Create a new instance of the TStringField class
procedure SetFieldType(); override; | Set the field type
property FixedChar: Boolean; [rw] | Is the string declared with a fixed length ?
property Transliterate: Boolean; [rw] | Should the field value be transliterated when reading or writing
property Value: ; [rw] | Value of the field as a string
published
property EditMask; | Specify an edit mask for an edit control
property Size; | Maximum size of the string
end;

Inheritance

TStringField | Field class to handle ansistring fields
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TStringField is the class used whenever a dataset has to handle a string field type (data type ftString). This class overrides some of the standard TField methods to handle string data, and introduces some properties that are only pertinent for data fields of string type. It should never be necessary to create an instance of TStringField manually, a field of this class will be instantiated automatically for each string field when a dataset is opened.

See also

TField | Provide access to the contents of a single field in a record
TWideStringField | Field class for widestring data
TDataset | Base class for records-based data-access


TStringField
 |  | FixedChar
 |  | Transliterate
 |  | Value
pl | ro | EditMask
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
pl | ro | EditMask (TStringField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
 |  | FixedChar (TStringField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TStringField)
 |  | Tag (TComponent)
 |  | Text (TField)
 |  | Transliterate (TStringField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TStringField)
 |  | VCLComObject (TComponent)
pl |  |


TStringField
 | Create
 | SetFieldType
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TStringField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetFieldType (TStringField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TStringField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TStringField.Create

Create a new instance of the TStringField class

Declaration

Source position: db.pas line 475

public constructor TStringField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the field class instance

Description

Create is used to create a new instance of the TStringField class. It initializes some TField properties after having called the inherited constructor.


TStringField.EditMask

Specify an edit mask for an edit control

Declaration

Source position: db.pas line 481

published property TStringField.EditMask;

Description

EditMask can be used to specify an edit mask for controls that allow to edit this field. It has no effect on the field value, and serves only to ensure that the user can enter only correct data for this field.

TStringField just changes the visibility of the EditMark property, it is introduced in TField.

For more information on valid edit masks, see the documentation of the GUI controls.

See also

TField.EditMask

Specify an edit mask for an edit control


TStringField.FixedChar

Is the string declared with a fixed length ?

Declaration

Source position: db.pas line 477

public property TStringField.FixedChar: Boolean
  read FFixedChar
  write FFixedChar;

Description

FixedChar is True if the underlying data engine has declared the field with a fixed length, as in a SQL CHAR() declaration: the field's value will then always be padded with as many spaces as needed to obain the declared length of the field. If it is False then the declared length is simply the maximum length for the field, and no padding with spaces is performed.


TStringField.SetFieldType

Set the field type

Declaration

Source position: db.pas line 476

public procedure TStringField.SetFieldType(

  AValue: TFieldType

); override;

Description

SetFieldType is overridden in TStringField to check the data type more accurately (ftString and ftFixedChar). No extra functionality is added.

See also

TField.DataType

The data type of the field.


TStringField.Size

Maximum size of the string

Declaration

Source position: db.pas line 482

published property TStringField.Size
  default 20;

Description

Size is made published by the TStringField class so it can be set in the IDE: it is the declared maximum size of the string (in characters) and is used to calculate the size of the dataset buffer.

See also

TField.Size

Logical size of the field


TStringField.Transliterate

Should the field value be transliterated when reading or writing

Declaration

Source position: db.pas line 478

public property TStringField.Transliterate: Boolean
  read FTransliterate
  write FTransliterate;

Description

Transliterate can be set to True if the field's contents should be transliterated prior to copying it from or to the field's buffer. Transliteration is done by a method of TDataset: TDataset.Translate.

See also

TDataset.Translate

Transliterate a buffer


TStringField.Value

Value of the field as a string

Declaration

Source position: db.pas line 479

public property TStringField.Value:
  read GetAsString
  write SetAsString;

Description

Value is overridden in TField to return the value of the field as a string. It returns the contents of TField.AsString when read, or sets the AsString property when written to.

See also

TField.AsString | Access the field's contents as an AnsiString value.
TField.Value | Value of the field as a variant value


TStringFieldBuffer

Type to access string field content buffers as an array of characters

Declaration

Source position: db.pas line 45

type TStringFieldBuffer = array [0..dsMaxStringSize] of Char;


TTimeField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for time values

Declaration

Source position: db.pas line 726

type TTimeField = class(TDateTimeField)

public

  constructor Create(); override;

Create a new instance of a TTimeField class.

end;

Inheritance

TTimeField | Field class for time values
|
TDateTimeField | Field class for date/time/Datetime values
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TimeField is the class used when a dataset must manage data of type time. (TField.DataType equals ftTime). It initializes some of the properties of the TField class to be able to work with time fields.

It should never be necessary to create an instance of TTimeField manually, a field of this class will be instantiated automatically for each time field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TDateTimeField | Field class for date/time/Datetime values
TDateField | Field class for date values


TTimeField
TDateTimeField
 |  | Value
pl |  | DisplayFormat
pl | ro | EditMask
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TTimeField
 | Create
TDateTimeField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TDateTimeField)

Create (TTimeField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TTimeField
TDateTimeField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TTimeField.Create

Create a new instance of a TTimeField class.

Declaration

Source position: db.pas line 730

public constructor TTimeField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new field instance

Description

Create initializes a new instance of the TTimeField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with time values.

See also

TField

Provide access to the contents of a single field in a record


TVarBytesField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for variable size byte array values

Declaration

Source position: db.pas line 763

type TVarBytesField = class(TBytesField)

public

  constructor Create(); override;

Create a new instance of a TVarBytesField class.

end;

Inheritance

TVarBytesField | Field class for variable size byte array values
|
TBytesField | Field class for fixed size byte array values
|
TBinaryField | Field class for working with binary field data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TVarBytesField is the class used when a dataset must manage data of variable-size binary type. (TField.DataType equals ftVarBytes). It initializes some of the properties of the TField class to be able to work with variable-size byte fields.

It should never be necessary to create an instance of TVarBytesField manually, a field of this class will be instantiated automatically for each variable-sized binary data field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TBytesField | Field class for fixed size byte array values


TVarBytesField
TBytesField
TBinaryField
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TVarBytesField
 | Create
TBytesField
 | Create
TBinaryField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBinaryField)

Create (TBytesField)

Create (TVarBytesField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TVarBytesField
TBytesField
TBinaryField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TVarBytesField.Create

Create a new instance of a TVarBytesField class.

Declaration

Source position: db.pas line 767

public constructor TVarBytesField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the new field instance

Description

Create initializes a new instance of the TVarBytesField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with variable-size binary data values.

See also

TField

Provide access to the contents of a single field in a record


TVariantField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for native variant data

Declaration

Source position: db.pas line 925

type TVariantField = class(TField)

public

  constructor Create(); override;

Create a new instance of the TVariantField class

end;

Inheritance

TVariantField | Field class for native variant data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TVariantField is the class used when a dataset must manage native variant-typed data. (TField.DataType equals ftVariant). It initializes some of the properties of the TField class and overrides some of its methods to be able to work with variant data.

It should never be necessary to create an instance of TVariantField manually, a field of this class will be instantiated automatically for each variant field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record


TVariantField
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TVariantField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TVariantField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TVariantField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TVariantField.Create

Create a new instance of the TVariantField class

Declaration

Source position: db.pas line 952

public constructor TVariantField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner for the new TVariantField instance

Description

Create initializes a new instance of the TVariantField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with variant values.

See also

TField

Provide access to the contents of a single field in a record


TWideMemoField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for wide MEMO (widestring text BLOB) field data

Declaration

Source position: db.pas line 902

type TWideMemoField = class(TBlobField)
public
constructor Create(); override; | Create a new instance of the TWideMemoField class
property Value: WideString; [rw] | Value of the field's contents as a widestring
end;

Inheritance

TWideMemoField | Field class for wide MEMO (widestring text BLOB) field data
|
TBlobField | Base class for BLOB field data
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TWideMemoField is the class used when a dataset must manage memo (Text BLOB) data. (TField.DataType equals ftWideMemo). It initializes some of the properties of the TField class. All methods to be able to work with widestring memo fields have been implemented in the TBlobField parent class.

It should never be necessary to create an instance of TWideMemoField manually, a field of this class will be instantiated automatically for each widestring memo field when a dataset is opened.

See also

TDataset | Base class for records-based data-access
TField | Provide access to the contents of a single field in a record
TBLOBField | Base class for BLOB field data
TMemoField | Base class for MEMO (text BLOB) field data
TGraphicField | Field class for graphical BLOB field data


TWideMemoField
 |  | Value
TBlobField
 | ro | BlobSize
 |  | Modified
 |  | Value
 |  | Transliterate
pl |  | BlobType
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 | ro | BlobSize (TBlobField)
pl |  | BlobType (TBlobField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Modified (TBlobField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TBlobField)
 |  | Tag (TComponent)
 |  | Text (TField)
 |  | Transliterate (TBlobField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TBlobField)
 |  | Value (TWideMemoField)
 |  | VCLComObject (TComponent)
pl |  |


TWideMemoField
 | Create
TBlobField
 | Create
 | Clear
 | IsBlob
 | LoadFromFile
 | LoadFromStream
 | SaveToFile
 | SaveToStream
 | SetFieldType
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Clear (TBlobField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TBlobField)

Create (TWideMemoField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsBlob (TBlobField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

LoadFromFile (TBlobField)

LoadFromStream (TBlobField)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SaveToFile (TBlobField)

SaveToStream (TBlobField)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetFieldType (TBlobField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TWideMemoField
TBlobField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TWideMemoField.Create

Create a new instance of the TWideMemoField class

Declaration

Source position: db.pas line 910

public constructor TWideMemoField.Create(

  aOwner: TComponent

); override;

Arguments

aOwner

Owner for the new field instance

Description

Create initializes a new instance of the TWideMemoField class. It calls the inherited destructor, and then sets some TField properties to configure the instance for working with widestring memo values.

See also

TField

Provide access to the contents of a single field in a record


TWideMemoField.Value

Value of the field's contents as a widestring

Declaration

Source position: db.pas line 911

public property TWideMemoField.Value: WideString
  read GetAsWideString
  write SetAsWideString;

Description

Value is redefined by TWideMemoField as a WideString value. Reading and writing this property is equivalent to reading and writing the TField.AsWideString property.

See also

TField.Value | Value of the field as a variant value
Tfield.AsWideString | Access the field's contents as a WideString value.


TWideStringField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for widestring data

Declaration

Source position: db.pas line 487

type TWideStringField = class(TStringField)
public
constructor Create(); override; | Create a new instance of the TWideStringField class.
procedure SetFieldType(); override; | Set the field type
property Value: WideString; [rw] | Value of the field as a widestring
end;

Inheritance

TWideStringField | Field class for widestring data
|
TStringField | Field class to handle ansistring fields
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TWideStringField is the string field class instantiated for fields of data type ftWideString. This class overrides some of the standard TField methods to handle widestring data, and introduces some properties that are only pertinent for data fields of widestring type. It should never be necessary to create an instance of TWideStringField manually, a field of this class will be instantiated automatically for each widestring field when a dataset is opened.

See also

TField | Provide access to the contents of a single field in a record
TStringField | Field class to handle ansistring fields
TDataset | Base class for records-based data-access


TWideStringField
 |  | Value
TStringField
 |  | FixedChar
 |  | Transliterate
 |  | Value
pl | ro | EditMask
pl | ro | Size
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Alignment (TField)
 |  | AsBCD (TField)
 |  | AsBoolean (TField)
 |  | AsBytes (TField)
 |  | AsCurrency (TField)
 |  | AsDateTime (TField)
 |  | AsFloat (TField)
 |  | AsInteger (TField)
 |  | AsLargeInt (TField)
 |  | AsLongint (TField)
 |  | AsString (TField)
 |  | AsVariant (TField)
 |  | AsWideString (TField)
 |  | AttributeSet (TField)
 |  | Calculated (TField)
 | ro | CanModify (TField)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConstraintErrorMessage (TField)
 | ro | CurValue (TField)
pl |  | CustomConstraint (TField)
 |  | DataSet (TField)
 | ro | DataSize (TField)
 | ro | DataType (TField)
pl |  | DefaultExpression (TField)
 |  | DesignInfo (TComponent)
pl |  | DisplayLabel (TField)
 | ro | DisplayName (TField)
 | ro | DisplayText (TField)
pl |  | DisplayWidth (TField)
 |  | EditMask (TField)
pl | ro | EditMask (TStringField)
 | ro | EditMaskPtr (TField)
pl |  | FieldKind (TField)
pl |  | FieldName (TField)
 | ro | FieldNo (TField)
 |  | FixedChar (TStringField)
pl | ro | HasConstraints (TField)
pl |  | ImportedConstraint (TField)
pl |  | Index (TField)
 | ro | IsIndexField (TField)
 | ro | IsNull (TField)
pl |  | KeyFields (TField)
 |  | Lookup (TField)
pl |  | LookupCache (TField)
pl |  | LookupDataSet (TField)
pl |  | LookupKeyFields (TField)
 | ro | LookupList (TField)
pl |  | LookupResultField (TField)
 |  | Name (TComponent)
 |  | NewValue (TField)
 | ro | Offset (TField)
 | ro | OldValue (TField)
pl |  | Origin (TField)
 | ro | Owner (TComponent)
pl |  | ProviderFlags (TField)
pl |  | ReadOnly (TField)
pl |  | Required (TField)
 |  | Size (TField)
pl | ro | Size (TStringField)
 |  | Tag (TComponent)
 |  | Text (TField)
 |  | Transliterate (TStringField)
 | ro | ValidChars (TField)
 |  | Value (TField)
 |  | Value (TStringField)
 |  | Value (TWideStringField)
 |  | VCLComObject (TComponent)
pl |  |


TWideStringField
 | Create
 | SetFieldType
TStringField
 | Create
 | SetFieldType
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TStringField)

Create (TWideStringField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetFieldType (TStringField)

SetFieldType (TWideStringField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TWideStringField
TStringField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TWideStringField.Create

Create a new instance of the TWideStringField class.

Declaration

Source position: db.pas line 504

public constructor TWideStringField.Create(

  aOwner: TComponent

); override;

Arguments

aOwner

Owner of the TWideStringField class instance

Description

Create is used to create a new instance of the TWideStringField class. It initializes some TField properties after having called the inherited constructor.


TWideStringField.SetFieldType

Set the field type

Declaration

Source position: db.pas line 505

public procedure TWideStringField.SetFieldType(

  AValue: TFieldType

); override;

Description

SetFieldType is overridden in TWideStringField to check the data type more accurately (ftWideString and ftFixedWideChar). No extra functionality is added.

See also

TField.DataType

The data type of the field.


TWideStringField.Value

Value of the field as a widestring

Declaration

Source position: db.pas line 506

public property TWideStringField.Value: WideString
  read GetAsWideString
  write SetAsWideString;

Description

Value is overridden by the TWideStringField to return a WideString value. It is the same value as the TField.AsWideString property.

See also

TField.AsWideString | Access the field's contents as a WideString value.
TField.Value | Value of the field as a variant value


TWordField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class for word (16-bit unsigned integer) data

Declaration

Source position: db.pas line 608

type TWordField = class(TLongintField)

public

  constructor Create(); override;

Create a new instance of the TWordField class.

end;

Inheritance

TWordField | Field class for word (16-bit unsigned integer) data
|
TLongintField | Field class for 32-bit signed integer data
|
TNumericField | Base class for all numerical data field classe
|
TField | Provide access to the contents of a single field in a record
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TWordField is the class created when a dataset must manage 16-bit unsigned integer data, of datatype ftWord. It exposes no new properties, but simply overrides some methods to manage 16-bit unsigned integer data.

It should never be necessary to create an instance of TWordField manually, a field of this class will be instantiated automatically for each word field when a dataset is opened.

See also

TField | Provide access to the contents of a single field in a record
TNumericField | Base class for all numerical data field classe
TLongintField | Field class for 32-bit signed integer data
TSmallIntField | Field class for smallint (16-bit signed integer) data


TWordField
TLongintField
 |  | Value
pl |  | MaxValue
pl |  | MinValue
TNumericField
pl | ro | Alignment
pl |  | DisplayFormat
pl |  | EditFormat
TField
 |  | AsBCD
 |  | AsBoolean
 |  | AsBytes
 |  | AsCurrency
 |  | AsDateTime
 |  | AsFloat
 |  | AsLongint
 |  | AsLargeInt
 |  | AsInteger
 |  | AsString
 |  | AsWideString
 |  | AsVariant
 |  | AttributeSet
 |  | Calculated
 | ro | CanModify
 | ro | CurValue
 |  | DataSet
 | ro | DataSize
 | ro | DataType
 | ro | DisplayName
 | ro | DisplayText
 |  | EditMask
 | ro | EditMaskPtr
 | ro | FieldNo
 | ro | IsIndexField
 | ro | IsNull
 |  | Lookup
 |  | NewValue
 | ro | Offset
 |  | Size
 |  | Text
 | ro | ValidChars
 |  | Value
 | ro | OldValue
 | ro | LookupList
pl |  | Alignment
pl |  | CustomConstraint
pl |  | ConstraintErrorMessage
pl |  | DefaultExpression
pl |  | DisplayLabel
pl |  | DisplayWidth
pl |  | FieldKind
pl |  | FieldName
pl | ro | HasConstraints
pl |  | Index
pl |  | ImportedConstraint
pl |  | KeyFields
pl |  | LookupCache
pl |  | LookupDataSet
pl |  | LookupKeyFields
pl |  | LookupResultField
pl |  | Origin
pl |  | ProviderFlags
pl |  | ReadOnly
pl |  | Required
pl |  | Visible
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


TWordField
 | Create
TLongintField
 | Create
 | CheckRange
TNumericField
 | Create
TField
 | Create
 | Destroy
 | Assign
 | AssignValue
 | Clear
 | FocusControl
 | GetData
 | IsBlob
 | IsValidChar
 | RefreshLookupList
 | SetData
 | SetFieldType
 | Validate
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

AssignValue (TField)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

CheckRange (TLongintField)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TField)

Create (TObject)

Create (TComponent)

Create (TField)

Create (TNumericField)

Create (TLongintField)

Create (TWordField)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TField)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

FocusControl (TField)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetData (TField)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsBlob (TField)

IsImplementorOf (TComponent)

IsValidChar (TField)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RefreshLookupList (TField)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetData (TField)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetFieldType (TField)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

Validate (TField)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TWordField
TLongintField
TNumericField
TField
pl | OnChange
pl | OnGetText
pl | OnSetText
pl | OnValidate
TComponent
TPersistent
TObject


TWordField.Create

Create a new instance of the TWordField class.

Declaration

Source position: db.pas line 612

public constructor TWordField.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the field instance.

Description

Create initializes a new instance of the TWordField class. It calls the inherited constructor and then simply sets some of the TField properties to work with 16-bit unsigned integer data.

See also

TField

Provide access to the contents of a single field in a record


ELogError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised on errors in the TEventLog component

Declaration

Source position: eventlog.pp line 107

type ELogError = class(Exception) ;

Inheritance

ELogError

Exception raised on errors in the TEventLog component
|

Exception
|

TObject

Description

ELogError is the exception used in the TEventLog component to indicate errors.

See also

TEventLog

Event logging class


ELogError
Exception
 | HelpContext
 | Message
TObject


ELogError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


ELogError

Exception

TObject


TEventLog

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Event logging class

Declaration

Source position: eventlog.pp line 30

type TEventLog = class(TComponent)
public
destructor Destroy; override; | Clean up TEventLog instance
function EventTypeToString(); | Create a string representation of an event type
function RegisterMessageFile(); virtual; | Register message file
function UnRegisterMessageFile; virtual; | Unregister the message file (needed on windows only)
procedure Pause;
procedure Resume;
public
procedure Log(); | Log a message to the system log.
procedure Warning(); | Log a warning message.
procedure Error(); | Log an error message to
procedure Debug(); | Log a debug message
procedure Info(); | Log an informational message
published
property AppendContent: Boolean; [rw] | Control whether output is appended to an existing file
property Identification: ; [rw] | Identification string for messages
property LogType: TLogType; [rw] | Log type
property Active: Boolean; [rw] | Activate the log mechanism
property RaiseExceptionOnError: Boolean; [rw] | Determines whether logging errors are reported or ignored
property DefaultEventType: TEventType; [rw] | Default event type for the Log call.
property FileName: ; [rw] | File name for log file
property TimeStampFormat: ; [rw] | Format for the timestamp string
property CustomLogType: Word; [rw] | Custom log type ID
property EventIDOffset: DWord; [rw] | Offset for event ID messages identifiers
property OnGetCustomCategory: TLogCategoryEvent; [rw] | Event to retrieve custom message category
property OnGetCustomEventID: TLogCodeEvent; [rw] | Event to retrieve custom event ID
property OnGetCustomEvent: TLogCodeEvent; [rw] | Event to retrieve custom event Code
property Paused: Boolean; [rw]
end;

Inheritance

TEventLog

Event logging class
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TEventLog is a component which can be used to send messages to the system log. In case no system log exists (such as on Windows 95/98 or DOS), the messages are written to a file. Messages can be logged using the general Log call, or the specialized Warning, Error, Info or Debug calls, which have the event type predefined.

See also

Log | Log a message to the system log.
Warning | Log a warning message.
Error | Log an error message to
Info | Log an informational message
Debug | Log a debug message


TEventLog
pl |  | AppendContent
pl |  | Identification
pl |  | LogType
pl |  | Active
pl |  | RaiseExceptionOnError
pl |  | DefaultEventType
pl |  | FileName
pl |  | TimeStampFormat
pl |  | CustomLogType
pl |  | EventIDOffset
pl |  | Paused
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Active (TEventLog)
pl |  | AppendContent (TEventLog)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | CustomLogType (TEventLog)
pl |  | DefaultEventType (TEventLog)
 |  | DesignInfo (TComponent)
pl |  | EventIDOffset (TEventLog)
pl |  | FileName (TEventLog)
pl |  | Identification (TEventLog)
pl |  | LogType (TEventLog)
 |  | Name (TComponent)
 | ro | Owner (TComponent)
pl |  | Paused (TEventLog)
pl |  | RaiseExceptionOnError (TEventLog)
 |  | Tag (TComponent)
pl |  |


TEventLog
 | Destroy
 | EventTypeToString
 | RegisterMessageFile
 | UnRegisterMessageFile
 | Pause
 | Resume
 | Log
 | Warning
 | Error
 | Debug
 | Info
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Debug (TEventLog)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TEventLog)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Error (TEventLog)

EventTypeToString (TEventLog)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

Info (TEventLog)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

Log (TEventLog)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

Pause (TEventLog)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

RegisterMessageFile (TEventLog)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

Resume (TEventLog)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UnRegisterMessageFile (TEventLog)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

Warning (TEventLog)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TEventLog
pl | OnGetCustomCategory
pl | OnGetCustomEventID
pl | OnGetCustomEvent
TComponent
TPersistent
TObject


pl | OnGetCustomCategory (TEventLog)
pl | OnGetCustomEvent (TEventLog)
pl |


TEventLog.Active

Activate the log mechanism

Declaration

Source position: eventlog.pp line 94

published property TEventLog.Active: Boolean
  read FActive
  write SetActive;

Description

Active determines whether the log mechanism is active: if set to True, the component connects to the system log mechanism, or opens the log file if needed. Any attempt to log a message while the log is not active will try to set this property to True. Disconnecting from the system log or closing the log file is done by setting the Active property to False.

If the connection to the system logger fails, or the log file cannot be opened, then setting this property may result in an exception.

See also

Log

Log a message to the system log.


TEventLog.AppendContent

Control whether output is appended to an existing file

Declaration

Source position: eventlog.pp line 91

published property TEventLog.AppendContent: Boolean
  read fAppendContent
  write fAppendContent;

Description

AppendContent determines what is done when the log type is ltFile and a log file already exists. If the log file already exists, then the default behaviour (AppendContent=False) is to re-create the log file when the log is activated. If AppendContent is True then output will be appended to the existing file.

See also

LogType | Log type
FileName | File name for log file


TEventLog.CustomLogType

Custom log type ID

Declaration

Source position: eventlog.pp line 99

published property TEventLog.CustomLogType: Word
  read FCustomLogType
  write FCustomLogType;

Description

CustomLogType is used in the EventTypeToString to format the custom log event type string.

See also

EventTypeToString

Create a string representation of an event type


TEventLog.Debug

Log a debug message

Declaration

Source position: line 0

procedure TEventLog.Debug(

  const Msg:

); overload;

procedure TEventLog.Debug(

  const Fmt: ;

  Args: array of Const

); overload;

Arguments

Msg

Complete debug message

Arguments

Fmt | Formatting string for Args
Args | Arguments to format message with

Description

Debug is a utility function which logs a message with the etDebug type. The message is either the parameter Msg as is, or is formatted from the Fmt and Args parameters.

See also

Log | Log a message to the system log.
Info | Log an informational message
Warning | Log a warning message.
Error | Log an error message to


TEventLog.DefaultEventType

Default event type for the Log call.

Declaration

Source position: eventlog.pp line 96

published property TEventLog.DefaultEventType: TEventType
  read FDEfaultEventType
  write FDefaultEventType;

Description

DefaultEventType is the event type used by the Log call if it's EventType parameter is omitted.

See also

Log

Log a message to the system log.


TEventLog.Destroy

Clean up TEventLog instance

Declaration

Source position: eventlog.pp line 72

public destructor TEventLog.Destroy; override;

Description

Destroy cleans up the TEventLog instance. It cleans any log structures that might have been set up to perform logging, by setting the Active property to False.

See also

Active

Activate the log mechanism


TEventLog.Error

Log an error message to

Declaration

Source position: line 0

procedure TEventLog.Error(

  const Msg:

); overload;

procedure TEventLog.Error(

  const Fmt: ;

  Args: array of Const

); overload;

Arguments

Msg

Complete error message

Arguments

Fmt | Formatting string for Args
Args | Arguments to format message with

Description

Error is a utility function which logs a message with the etError type. The message is either the parameter Msg as is, or is formatted from the Fmt and Args parameters.

See also

Log | Log a message to the system log.
Info | Log an informational message
Warning | Log a warning message.
Debug | Log a debug message


TEventLog.EventIDOffset

Offset for event ID messages identifiers

Declaration

Source position: eventlog.pp line 100

published property TEventLog.EventIDOffset: DWord
  read FEventIDOffset
  write FEventIDOffset;

Description

EventIDOffset is the offset for the message formatting strings in the windows resource file. This property is ignored on other platforms.

The message strings in the file registered with the RegisterMessageFile call are windows resource strings. They each have a unique ID, which must be communicated to windows. In the resource file distributed by Free Pascal, the resource strings are numbered from 1000 to 1004. The actual number communicated to windows is formed by adding the ordinal value of the message's eventtype to EventIDOffset (which is by default 1000), which means that by default, the string numbers are:

1000
Custom event types
1001
Information event type
1002
Warning event type
1003
Error event type
1004
Debug event type

See also

RegisterMessageFile

Register message file


TEventLog.EventTypeToString

Create a string representation of an event type

Declaration

Source position: eventlog.pp line 73

public function TEventLog.EventTypeToString(

  E: TEventType

):;

Arguments

E

Event type to convert to string

Function result

String representation of E

Description

EventTypeToString converts the event type E to a suitable string representation for logging purposes. It's mainly used when writing messages to file, as the system log usually has it's own mechanisms for displaying the various event types.

See also

#rtl.sysutils.TEventType


TEventLog.FileName

File name for log file

Declaration

Source position: eventlog.pp line 97

published property TEventLog.FileName:
  read FFileName
  write SetFileName;

Description

FileName is the name of the log file used to log messages if no system logger is available or the LogType is ltFile. If none is specified, then the name of the application binary is used, with the extension replaced by .log. The file is then located in the /tmp directory on unix-like systems, or in the application directory for Dos/Windows like systems.

See also

LogType

Log type


TEventLog.Identification

Identification string for messages

Declaration

Source position: eventlog.pp line 92

published property TEventLog.Identification:
  read FIdentification
  write SetIdentification;

Description

Identification is used as a string identifying the source of the messages in the system log. If it is empty, the filename part of the application binary is used.

See also

Active | Activate the log mechanism
TimeStampFormat | Format for the timestamp string


TEventLog.Info

Log an informational message

Declaration

Source position: line 0

procedure TEventLog.Info(

  const Msg:

); overload;

procedure TEventLog.Info(

  const Fmt: ;

  Args: array of Const

); overload;

Arguments

Msg

Complete information message

Arguments

Fmt | Formatting string for Args
Args | Arguments to format message with

Description

Info is a utility function which logs a message with the etInfo type. The message is either the parameter Msg as is, or is formatted from the Fmt and Args parameters.

See also

Log | Log a message to the system log.
Warning | Log a warning message.
Error | Log an error message to
Debug | Log a debug message


TEventLog.Log

Log a message to the system log.

Declaration

Source position: line 0

procedure TEventLog.Log(

  EventType: TEventType;

  const Msg:

); overload;

procedure TEventLog.Log(

  EventType: TEventType;

  const Fmt: ;

  Args: array of Const

); overload;

procedure TEventLog.Log(

  const Msg:

); overload;

procedure TEventLog.Log(

  const Fmt: ;

  Args: array of Const

); overload;

Arguments

EventType | Event type to use.
Msg | Complete log message

Arguments

EventType | Event type to use.
Fmt | Format string for Args
Args | Arguments to be formatted with Fmt

Arguments

Msg

Complete log message

Arguments

Fmt | Format string for Args
Args | Arguments to be formatted with Fmt

Description

Log sends a log message to the system log. The message is either the parameter Msg as is, or is formatted from the Fmt and Args parameters. If EventType is specified, then it is used as the message event type. If EventType is omitted, then the event type is determined from DefaultEventType.

If EventType is etCustom, then the OnGetCustomEvent, OnGetCustomEventID and OnGetCustomCategory.

The other logging calls: Info, Warning, Error and Debug use the Log call to do the actual work.

See also

Info | Log an informational message
Warning | Log a warning message.
Error | Log an error message to
Debug | Log a debug message
OnGetCustomEvent | Event to retrieve custom event Code
OnGetCustomEventID | Event to retrieve custom event ID
OnGetCustomCategory | Event to retrieve custom message category


TEventLog.LogType

Log type

Declaration

Source position: eventlog.pp line 93

published property TEventLog.LogType: TLogType
  read Flogtype
  write SetlogType;

Description

LogType is the type of the log: if it is ltSystem, then the system log is used, if it is available. If it is ltFile or there is no system log available, then the log messages are written to a file. The name for the log file is taken from the FileName property.

See also

FileName

File name for log file


TEventLog.OnGetCustomCategory

Event to retrieve custom message category

Declaration

Source position: eventlog.pp line 101

published property TEventLog.OnGetCustomCategory: TLogCategoryEvent
  read FOnGetCustomCategory
  write FOnGetCustomCategory;

Description

OnGetCustomCategory is called on the windows platform to determine the category of a custom event type. It should return an ID which will be used by windows to look up the string which describes the message category in the file containing the resource strings.

See also

OnGetCustomEventID | Event to retrieve custom event ID
OnGetCustomEvent | Event to retrieve custom event Code


TEventLog.OnGetCustomEvent

Event to retrieve custom event Code

Declaration

Source position: eventlog.pp line 103

published property TEventLog.OnGetCustomEvent: TLogCodeEvent
  read FOnGetCustomEvent
  write FOnGetCustomEvent;

Description

OnGetCustomEvent is called on the windows platform to determine the event code of a custom event type. It should return an ID.

See also

OnGetCustomCategory | Event to retrieve custom message category
OnGetCustomEventID | Event to retrieve custom event ID


TEventLog.OnGetCustomEventID

Event to retrieve custom event ID

Declaration

Source position: eventlog.pp line 102

published property TEventLog.OnGetCustomEventID: TLogCodeEvent
  read FOnGetCustomEventID
  write FOnGetCustomEventID;

Description

OnGetCustomEventID is called on the windows platform to determine the category of a custom event type. It should return an ID which will be used by windows to look up the string which formats the message, in the file containing the resource strings.

See also

OnGetCustomCategory | Event to retrieve custom message category
OnGetCustomEvent | Event to retrieve custom event Code


TEventLog.Pause

Declaration

Source position: eventlog.pp line 76

public procedure TEventLog.Pause;


TEventLog.Paused

Declaration

Source position: eventlog.pp line 104

published property TEventLog.Paused: Boolean
  read FPaused
  write FPaused;


TEventLog.RaiseExceptionOnError

Determines whether logging errors are reported or ignored

Declaration

Source position: eventlog.pp line 95

published property TEventLog.RaiseExceptionOnError: Boolean
  read FRaiseExceptionOnError
  write FRaiseExceptionOnError;

Description

RaiseExceptionOnError determines whether an error during a logging operation will be signaled with an exception or not. If set to False, errors will be silently ignored, thus not disturbing normal operation of the program.


TEventLog.RegisterMessageFile

Register message file

Declaration

Source position: eventlog.pp line 74

public function TEventLog.RegisterMessageFile(

  AFileName:

):Boolean; virtual;

Arguments

AFileName

Filename with messages as resource strings.

Function result

True if the call was succesful, False if not.

Description

RegisterMessageFile is used on Windows to register the file AFileName containing the formatting strings for the system messages. This should be a file containing resource strings. If AFileName is empty, the filename of the application binary is substituted.

When a message is logged to the windows system log, Windows looks for a formatting string in the file registered with this call.

There are 2 kinds of formatting strings:

Category strings these should be numbered from 1 to 4

1
Should contain the description of the etInfo event type.
2
Should contain the description of the etWarning event type.
4
Should contain the description of the etError event type.
4
Should contain the description of the etDebug event type.

None of these strings should have a string substitution placeholder.

The second type of strings are the message definitions. Their number starts at EventIDOffset (default is 1000) and each string should have 1 placeholder.

Free Pascal comes with a fclel.res resource file which contains default values for the 8 strings, in english. It can be linked in the application binary with the statement

{$R fclel.res}

This file is generated from the fclel.mc and fclel.rc files that are distributed with the Free Pascal sources.

If the strings are not registered, windows will still display the event messages, but they will not be formatted nicely.

Note that while any messages logged with the event logger are displayed in the event viewern Windows locks the file registered here. This usually means that the binary is locked.

On non-windows operating systems, this call is ignored.

Errors

If AFileName is invalid, false is returned.


TEventLog.Resume

Declaration

Source position: eventlog.pp line 77

public procedure TEventLog.Resume;


TEventLog.TimeStampFormat

Format for the timestamp string

Declaration

Source position: eventlog.pp line 98

published property TEventLog.TimeStampFormat:
  read FTimeStampFormat
  write FTimeStampFormat;

Description

TimeStampFormat is the formatting string used to create a timestamp string when writing log messages to file. It should have a format suitable for the FormatDateTime call. If it is left empty, then yyyy-mm-dd hh:nn:ss.zzz is used.

See also

TEventLog.Identification

Identification string for messages


TEventLog.UnRegisterMessageFile

Unregister the message file (needed on windows only)

Declaration

Source position: eventlog.pp line 75

public function TEventLog.UnRegisterMessageFile: Boolean; virtual;

Function result

True if the message file was successfully unregistered, false if an error occurred.

Description

UnRegisterMessageFile can be used to unregister a message file previously registered with TEventLog.RegisterMessageFile. This function is usable only on windows, it has no effect on other platforms. Note that windows locks the registered message file while viewing messages, so unregistering helps to avoid file locks while event viewer is open.

See also

TEventLog.RegisterMessageFile

Register message file


TEventLog.Warning

Log a warning message.

Declaration

Source position: line 0

procedure TEventLog.Warning(

  const Msg:

); overload;

procedure TEventLog.Warning(

  const Fmt: ;

  Args: array of Const

); overload;

Arguments

Msg

Complete warning message

Arguments

Fmt | Formatting string for Args
Args | Arguments to format message with

Description

Warning is a utility function which logs a message with the etWarning type. The message is either the parameter Msg as is, or is formatted from the Fmt and Args parameters.

See also

Log | Log a message to the system log.
Info | Log an informational message
Error | Log an error message to
Debug | Log a debug message


ECGIException

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised by TEZcgi

Declaration

Source position: ezcgi.pp line 26

type ECGIException = class(Exception) ;

Inheritance

ECGIException

Exception raised by TEZcgi
|

Exception
|

TObject

See also

TEZcgi

Easy CGI class


ECGIException
Exception
 | HelpContext
 | Message
TObject


ECGIException
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


ECGIException

Exception

TObject


TEZcgi

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Easy CGI class

Declaration

Source position: ezcgi.pp line 28

type TEZcgi = class(TObject)
public
constructor Create; | Creates a new instance of the TEZCGI component
destructor Destroy; override; | Removes the TEZCGI component from memory
procedure Run; | Run the CGI application.
procedure WriteContent(); | Writes the content type to standard output
procedure PutLine(); | Send a line of output to the web-client
function GetValue(); | Return the value of a request variable.
procedure DoPost; virtual; | Method to handle POST requests
procedure DoGet; virtual; | Method to handle GET requests
property Values: ; [r] | Variables passed to the CGI script
property Names: ; [r] | Indexed array with available variable names.
property Variables: ; [r] | Indexed array with variables as name=value pairs.
property VariableCount: Integer; [r] | Number of available variables.
property Name: ; [rw] | Name of the server administrator
property Email: ; [rw] | Email of the server administrator
end;

Inheritance

TEZcgi

Easy CGI class
|

TObject

Description

TEZcgi implements all functionality to analyze the CGI environment and query the variables present in it. It's main use is the exposed variables.

Programs wishing to use this class should make a descendent class of this class and override the DoPost or DoGet methods. To run the program, an instance of this class must be created, and it's Run method should be invoked. This will analyze the environment and call the DoPost or DoGet method, depending on what HTTP method was used to invoke the program.


TEZcgi
 | ro | Values
 | ro | Names
 | ro | Variables
 | ro | VariableCount
 |  | Name
 |  | Email
TObject


ro | Names (TEZcgi)
ro | Values (TEZcgi)
ro | VariableCount (TEZcgi)
ro |


TEZcgi
 | Create
 | Destroy
 | Run
 | WriteContent
 | PutLine
 | GetValue
 | DoPost
 | DoGet
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TEZcgi)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TEZcgi)

Dispatch (TObject)

DispatchStr (TObject)

DoGet (TEZcgi)

DoPost (TEZcgi)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetValue (TEZcgi)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

PutLine (TEZcgi)

Run (TEZcgi)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

WriteContent (TEZcgi)


TEZcgi

TObject


TEZcgi.Create

Creates a new instance of the TEZCGI component

Declaration

Source position: ezcgi.pp line 61

public constructor TEZcgi.Create;

Description

Create initializes the CGI program's environment: it reads the environment variables passed to the CGI program and stores them in the Variable property.

See also

Variables | Indexed array with variables as name=value pairs.
Names | Indexed array with available variable names.
Values | Variables passed to the CGI script


TEZcgi.Destroy

Removes the TEZCGI component from memory

Declaration

Source position: ezcgi.pp line 62

public destructor TEZcgi.Destroy; override;

Description

Destroy removes all variables from memory and then calls the inherited destroy, removing the TEZCGI instance from memory.

Destroy should never be called directly. Instead Free should be used, or FreeAndNil

See also

Create

Creates a new instance of the TEZCGI component


TEZcgi.DoGet

Method to handle GET requests

Declaration

Source position: ezcgi.pp line 69

public procedure TEZcgi.DoGet; virtual;

Description

DoGet is called by the Run method the GET method was used to invoke the CGI application. It should be overridden in descendents of TEZcgi to actually handle the request.

See also

Run | Run the CGI application.
DoPost | Method to handle POST requests


TEZcgi.DoPost

Method to handle POST requests

Declaration

Source position: ezcgi.pp line 68

public procedure TEZcgi.DoPost; virtual;

Description

DoPost is called by the Run method the POST method was used to invoke the CGI application. It should be overridden in descendents of TEZcgi to actually handle the request.

See also

Run | Run the CGI application.
DoGet | Method to handle GET requests


TEZcgi.Email

Email of the server administrator

Declaration

Source position: ezcgi.pp line 77

public property TEZcgi.Email:
  read FEmail
  write FEmail;

Description

Email is used when displaying an error message to the user. This should set prior to calling the TEZcgi.Run method.

See also

TEZcgi.Run | Run the CGI application.
TEZcgi.Name | Name of the server administrator


TEZcgi.GetValue

Return the value of a request variable.

Declaration

Source position: ezcgi.pp line 66

public function TEZcgi.GetValue(

  Index: ;

  defaultValue:

):;

Arguments

Index | Name of variable.
defaultValue | Value to return in case variable is empty.

Function result

Value of variable.

Description

GetValue returns the value of the variable named Index, and returns DefaultValue if it is empty or does not exist.

See also

Values

Variables passed to the CGI script


TEZcgi.Name

Name of the server administrator

Declaration

Source position: ezcgi.pp line 76

public property TEZcgi.Name:
  read FName
  write FName;

Description

Name is used when displaying an error message to the user. This should set prior to calling the TEZcgi.Run method.

See also

TEZcgi.Run | Run the CGI application.
TEZcgi.Email | Email of the server administrator


TEZcgi.Names

Indexed array with available variable names.

Declaration

Source position: ezcgi.pp line 72

public property TEZcgi.Names:
  read GetName;

Description

Names provides indexed access to the available variable names. The Index may run from 0 to VariableCount. Any other value will result in an exception being raised.

See also

TEZcgi.Variables | Indexed array with variables as name=value pairs.
TEZcgi.Values | Variables passed to the CGI script
TEZcgi.GetValue | Return the value of a request variable.
TEZcgi.VariableCount | Number of available variables.


TEZcgi.PutLine

Send a line of output to the web-client

Declaration

Source position: ezcgi.pp line 65

public procedure TEZcgi.PutLine(

  sOut:

);

Arguments

sOut

Text to be sent to the client.

Description

PutLine writes a line of text (sOut) to the web client (currently, to standard output). It should be called only after WriteContent was called with a content type of text. The sent text is not processed in any way, i.e. no HTML entities or so are inserted instead of special HTML characters. This should be done by the user.

Errors

No check is performed whether the content type is right.

See also

WriteContent

Writes the content type to standard output


TEZcgi.Run

Run the CGI application.

Declaration

Source position: ezcgi.pp line 63

public procedure TEZcgi.Run;

Description

Run analyses the variables passed to the application, processes the request variables (it stores them in the Variables property) and calls the DoPost or DoGet methods, depending on the method passed to the web server.

After creating the instance of TEZCGI, the Run method is the only method that should be called when using this component.

See also

Variables | Indexed array with variables as name=value pairs.
DoPost | Method to handle POST requests
DoGet | Method to handle GET requests


TEZcgi.Values

Variables passed to the CGI script

Declaration

Source position: ezcgi.pp line 71

public property TEZcgi.Values:
  read GetVal;

Description

Values is a name-based array of variables that were passed to the script by the web server or the HTTP request. The Index variable is the name of the variable whose value should be retrieved. The following standard values are available:

AUTH_TYPE
Authorization type
CONTENT_LENGTH
Content length
CONTENT_TYPE
Content type
GATEWAY_INTERFACE
Used gateway interface
PATH_INFO
Requested URL
PATH_TRANSLATED
Transformed URL
QUERY_STRING
Client query string
REMOTE_ADDR
Address of remote client
REMOTE_HOST
DNS name of remote client
REMOTE_IDENT
Remote identity.
REMOTE_USER
Remote user
REQUEST_METHOD
Request methods (POST or GET)
SCRIPT_NAME
Script name
SERVER_NAME
Server host name
SERVER_PORT
Server port
SERVER_PROTOCOL
Server protocol
SERVER_SOFTWARE
Web server software
HTTP_ACCEPT
Accepted responses
HTTP_ACCEPT_CHARSET
Accepted character sets
HTTP_ACCEPT_ENCODING
Accepted encodings
HTTP_IF_MODIFIED_SINCE
Proxy information
HTTP_REFERER
Referring page
HTTP_USER_AGENT
Client software name

Other than the standard list, any variables that were passed by the web-client request, are also available. Note that the variables are case insensitive.

See also

TEZCGI.Variables | Indexed array with variables as name=value pairs.
TEZCGI.Names | Indexed array with available variable names.
TEZCGI.GetValue | Return the value of a request variable.
TEZcgi.VariableCount | Number of available variables.


TEZcgi.VariableCount

Number of available variables.

Declaration

Source position: ezcgi.pp line 74

public property TEZcgi.VariableCount: Integer
  read GetVarCount;

Description

TEZcgi.VariableCount returns the number of available CGI variables. This includes both the standard CGI environment variables and the request variables. The actual names and values can be retrieved with the Names and Variables properties.

See also

Names | Indexed array with available variable names.
Variables | Indexed array with variables as name=value pairs.
TEZcgi.Values | Variables passed to the CGI script
TEZcgi.GetValue | Return the value of a request variable.


TEZcgi.Variables

Indexed array with variables as name=value pairs.

Declaration

Source position: ezcgi.pp line 73

public property TEZcgi.Variables:
  read GetVariable;

Description

Variables provides indexed access to the available variable names and values. The variables are returned as Name=Value pairs. The Index may run from 0 to VariableCount. Any other value will result in an exception being raised.

See also

TEZcgi.Names | Indexed array with available variable names.
TEZcgi.Values | Variables passed to the CGI script
TEZcgi.GetValue | Return the value of a request variable.
TEZcgi.VariableCount | Number of available variables.


TEZcgi.WriteContent

Writes the content type to standard output

Declaration

Source position: ezcgi.pp line 64

public procedure TEZcgi.WriteContent(

  ctype:

);

Arguments

ctype

Content type

Description

WriteContent writes the content type cType to standard output, followed by an empty line. After this method was called, no more HTTP headers may be written to standard output. Any HTTP headers should be written before WriteContent is called. It should be called from the DoPost or DoGet methods.

See also

DoPost | Method to handle POST requests
DoGet | Method to handle GET requests
PutLine | Send a line of output to the web-client


TFPCustomTimer

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Custom timer class

Declaration

Source position: fptimer.pp line 40

type TFPCustomTimer = class(TComponent)
public
constructor Create(); override; | Create a new timer
destructor Destroy; override; | Release a timer instance from memory
procedure StartTimer; virtual; | Start the timer
procedure StopTimer; virtual; | Stop the timer
end;

Inheritance

TFPCustomTimer

Custom timer class
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TFPCustomTimer is the timer class containing the timer's implementation. It relies on an extra driver instance (of type TFPTimerDriver) to do the actual work.

TFPCustomTimer publishes no events or properties, so it is unsuitable for handling in an IDE. The TFPTimer descendent class publishes all needed events of TFPCustomTimer.

See also

TFPTimerDriver | Abstract driver class
TFPTimer | Timer class with published properties


TFPCustomTimer
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


ro | ComObject (TComponent)
ro | ComponentCount (TComponent)
 | ComponentIndex (TComponent)
ro | Components (TComponent)
ro | ComponentState (TComponent)
ro | ComponentStyle (TComponent)
 | DesignInfo (TComponent)
 | Name (TComponent)
ro |


TFPCustomTimer
 | Create
 | Destroy
 | StartTimer
 | StopTimer
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TFPCustomTimer)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TFPCustomTimer)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StartTimer (TFPCustomTimer)

StopTimer (TFPCustomTimer)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TFPCustomTimer

TComponent

TPersistent

TObject


TFPCustomTimer.Create

Create a new timer

Declaration

Source position: fptimer.pp line 54

public constructor TFPCustomTimer.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the timer instance

Description

Create instantiates a new TFPCustomTimer instance. It creates the timer driver instance from the DefaultTimerDriverClass class pointer.

See also

TFPCustomTimer.Destroy

Release a timer instance from memory


TFPCustomTimer.Destroy

Release a timer instance from memory

Declaration

Source position: fptimer.pp line 55

public destructor TFPCustomTimer.Destroy; override;

Description

Destroy releases the timer driver component from memory, and then calls Inherited to clean the TFPCustomTimer instance from memory.

See also

TFPCustomTimer.Create

Create a new timer


TFPCustomTimer.StartTimer

Start the timer

Declaration

Source position: fptimer.pp line 56

public procedure TFPCustomTimer.StartTimer; virtual;

Description

StartTimer starts the timer. After a call to StartTimer, the timer will start producing timer ticks.

The timer stops producing ticks only when the StopTimer event is called.

See also

StopTimer | Stop the timer
Enabled | Start or stop the timer
OnTimer | Event called on each timer tick.


TFPCustomTimer.StopTimer

Stop the timer

Declaration

Source position: fptimer.pp line 57

public procedure TFPCustomTimer.StopTimer; virtual;

Description

Stoptimer stops a started timer. After a call to StopTimer, the timer no longer produces timer ticks.

See also

StartTimer | Start the timer
Enabled | Start or stop the timer
OnTimer | Event called on each timer tick.


TFPTimer

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Timer class with published properties

Declaration

Source position: fptimer.pp line 64

type TFPTimer = class(TFPCustomTimer)
published
property Enabled; | Start or stop the timer
property Interval; | Timer tick interval in milliseconds.
property OnTimer; | Event called on each timer tick.
end;

Inheritance

TFPTimer | Timer class with published properties
|
TFPCustomTimer | Custom timer class
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TFPTimer implements no new events or properties, but merely publishes events and properties already implemented in TFPCustomTimer: Enabled, OnTimer and Interval.

The TFPTimer class is suitable for use in an IDE.

See also

TFPCustomTimer | Custom timer class
Enabled | Start or stop the timer
OnTimer | Event called on each timer tick.
Interval | Timer tick interval in milliseconds.


TFPTimer
pl | ro | Enabled
pl | ro | Interval
TFPCustomTimer
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
 |  | DesignInfo (TComponent)
pl | ro | Enabled (TFPTimer)
pl | ro | Interval (TFPTimer)
 |  | Name (TComponent)
 | ro |


TFPTimer
TFPCustomTimer
 | Create
 | Destroy
 | StartTimer
 | StopTimer
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TFPTimer

pl

ro

OnTimer

TFPCustomTimer

TComponent

TPersistent

TObject


pl

ro


TFPTimer.Enabled

Start or stop the timer

Declaration

Source position: fptimer.pp line 66

published property TFPTimer.Enabled;

Description

Enabled controls whether the timer is active. Setting Enabled to True will start the timer (calling StartTimer), setting it to False will stop the timer (calling StopTimer).

See also

StartTimer | Start the timer
StopTimer | Stop the timer
OnTimer | Event called on each timer tick.
Interval | Timer tick interval in milliseconds.


TFPTimer.Interval

Timer tick interval in milliseconds.

Declaration

Source position: fptimer.pp line 67

published property TFPTimer.Interval;

Description

Interval specifies the timer interval in milliseconds. Every Interval milliseconds, the OnTimer event handler will be called.

Note that the milliseconds interval is a minimum interval. Under high system load, the timer tick may arrive later.

See also

OnTimer | Event called on each timer tick.
Enabled | Start or stop the timer


TFPTimer.OnTimer

Event called on each timer tick.

Declaration

Source position: fptimer.pp line 68

published property TFPTimer.OnTimer;

Description

OnTimer is called on each timer tick. The event handler must be assigned to a method that will do the actual work that should occur when the timer fires.

See also

Interval | Timer tick interval in milliseconds.
Enabled | Start or stop the timer


TFPTimerDriver

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Abstract driver class

Declaration

Source position: fptimer.pp line 71

type TFPTimerDriver = class(TObject)
public
constructor Create(); virtual; | Create new driver instance
procedure StartTimer; virtual; abstract; | Start the timer
procedure StopTimer; virtual; abstract; | Stop the timer
property Timer: TFPCustomTimer; [r] | Timer tick
end;

Inheritance

TFPTimerDriver

Abstract driver class
|

TObject

Description

TFPTimerDriver is the abstract timer driver class: it simply provides an interface for the TFPCustomTimer class to use.

The fpTimer unit implements a descendent of this class which implements the default timer mechanism.

See also

TFPCustomTimer | Custom timer class
DefaultTimerDriverClass | Actual timer class to be used


TFPTimerDriver

ro

Timer

TObject


TFPTimerDriver
 | Create
 | StartTimer
 | StopTimer
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TFPTimerDriver)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StartTimer (TFPTimerDriver)

StopTimer (TFPTimerDriver)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TFPTimerDriver

TObject


TFPTimerDriver.Create

Create new driver instance

Declaration

Source position: fptimer.pp line 75

public constructor TFPTimerDriver.Create(

  ATimer: TFPCustomTimer

); virtual;

Arguments

ATimer

Timer instance that created the driver

Description

Create should be overridden by descendents of TFPTimerDriver to do additional initialization of the timer driver. Create just stores (in Timer) a reference to the ATimer instance which created the driver instance.

See also

Timer | Timer tick
TFPTimer | Timer class with published properties


TFPTimerDriver.StartTimer

Start the timer

Declaration

Source position: fptimer.pp line 76

public procedure TFPTimerDriver.StartTimer; virtual; abstract;

Description

StartTimer is called by TFPCustomTimer.StartTimer. It should be overridden by descendents of TFPTimerDriver to actually start the timer.

See also

TFPCustomTimer.StartTimer | Start the timer
TFPTimerDriver.StopTimer | Stop the timer


TFPTimerDriver.StopTimer

Stop the timer

Declaration

Source position: fptimer.pp line 77

public procedure TFPTimerDriver.StopTimer; virtual; abstract;

Description

StopTimer is called by TFPCustomTimer.StopTimer. It should be overridden by descendents of TFPTimerDriver to actually stop the timer.

See also

TFPCustomTimer.StopTimer | Stop the timer
TFPTimerDriver.StartTimer | Start the timer


TFPTimerDriver.Timer

Timer tick

Declaration

Source position: fptimer.pp line 78

public property TFPTimerDriver.Timer: TFPCustomTimer
  read FTimer;

Description

Timer calls the TFPCustomTimer timer event. Descendents of TFPTimerDriver should call Timer whenever a timer tick occurs.

See also

TFPTimer.OnTimer | Event called on each timer tick.
TFPTimerDriver.StartTimer | Start the timer
TFPTimerDriver.StopTimer | Stop the timer


TFPTimerDriverClass

Class of TFPTimerDriver

Declaration

Source position: fptimer.pp line 80

type TFPTimerDriverClass = class of TFPTimerDriver;

Description

TFPTimerDriverClass is the class pointer of TFPTimerDriver it exists mainly for the purpose of being able to set DefaultTimerDriverClass, so a custom timer driver can be used for the timer instances.

See also

DefaultTimerDriverClass

Actual timer class to be used


EMOFileError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised in case of an error.

Declaration

Source position: gettext.pp line 69

type EMOFileError = class(Exception) ;

Inheritance

EMOFileError

Exception raised in case of an error.
|

Exception
|

TObject

Description

EMOFileError is raised in case an TMOFile instance is created with an invalid .mo.

See also

TMOFile

Class providing access to a .mo file.


EMOFileError
Exception
 | HelpContext
 | Message
TObject


EMOFileError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EMOFileError

Exception

TObject


TMOFile

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class providing access to a .mo file.

Declaration

Source position: gettext.pp line 54

type TMOFile = class
procedure Create(); | Create a new instance of the TMOFile class.
public
destructor Destroy; override; | Removes the TMOFile instance from memory
public
function Translate(); | Translate a string
end;

Inheritance

TMOFile

Class providing access to a .mo file.
|

TObject

Description

TMOFile is a class providing easy access to a .mo file. It can be used to translate any of the strings that reside in the .mo file. The internal structure of the .mo is completely hidden.


TMOFile


TMOFile
 | Create
 | Destroy
 | Translate


Create (TMOFile)

Destroy (TMOFile)

Translate (TMOFile)


TMOFile.Create

Create a new instance of the TMOFile class.

Declaration

Source position: line 0

constructor TMOFile.Create(

  const AFilename:

);

constructor TMOFile.Create(

  AStream: TStream

);

Arguments

AFilename

File to open.

Arguments

AStream

Contents of a .mo file.

Description

Create creates a new instance of the MOFile class. It opens the file AFileName or the stream AStream. If a stream is provided, it should be seekable.

The whole contents of the file is read into memory during the Create call. This means that the stream is no longer needed after the Create call.

Errors

If the named file does not exist, then an exception may be raised. If the file does not contain a valid TMOFileHeader structure, then an EMOFileError exception is raised.

See also

TMOFile.Destroy

Removes the TMOFile instance from memory


TMOFile.Destroy

Removes the TMOFile instance from memory

Declaration

Source position: gettext.pp line 63

public destructor TMOFile.Destroy; override;

Description

Destroy cleans the internal structures with the contents of the .mo. After this the TMOFile instance is removed from memory.

See also

TMOFile.Create

Create a new instance of the TMOFile class.


TMOFile.Translate

Translate a string

Declaration

Source position: line 0

function TMOFile.Translate(

  AOrig: PChar;

  ALen: Integer;

  AHash: LongWord

):;

function TMOFile.Translate(

  AOrig: ;

  AHash: LongWord

):;

function TMOFile.Translate(

  AOrig:

):;

Arguments

AOrig | String to translate.
ALen | Length of the original string.
AHash | Hash value of the original string.

Function result

Translated string.

Arguments

AOrig | String to translate.
AHash | Hash value of the original string.

Arguments

AOrig

String to translate.

Description

Translate translates the string AOrig. The string should be in the .mo file as-is. The string can be given as a plain string, as a PChar (with length ALen). If the hash value (AHash) of the string is not given, it is calculated.

If the string is in the .mo file, the translated string is returned. If the string is not in the file, an empty string is returned.

Errors

None.


TMOFileHeader

Structure found at the head of a .mo file.

Declaration

Source position: gettext.pp line 29

type TMOFileHeader = packed record
magic: LongWord; | Magic constant, should equal MOFileHeaderMagic.
revision: LongWord; | File revision
nstrings: LongWord; | Number of string pairs in the file
OrigTabOffset: LongWord; | Offset of the original strings description table.
TransTabOffset: LongWord; | Offset of the translated strings description table.
HashTabSize: LongWord; | Size of hashing table.
HashTabOffset: LongWord; | Offset of hashing table.
end;

Description

This structure describes the structure of a .mo file with string localizations.


EIBDatabaseError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Firebird/Interbase database error

Declaration

Source position: ibconnection.pp line 23

type EIBDatabaseError = class(EDatabaseError)

public

  GDSErrorCode: LongInt;

Firebird/Interbase GDS error code.

end;

Inheritance

EIBDatabaseError | Firebird/Interbase database error
|
EDatabaseError | Base class for all database-related errors
|
Exception
|
TObject

Description

Firebird/Interbase database error, a descendant of EDatabaseError.

See also

TSQLConnection.EDatabaseError


EIBDatabaseError
EDatabaseError
Exception
 | HelpContext
 | Message
TObject


EIBDatabaseError
EDatabaseError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EIBDatabaseError

EDatabaseError

Exception

TObject


EIBDatabaseError.GDSErrorCode

Firebird/Interbase GDS error code.

Declaration

Source position: ibconnection.pp line 25

public EIBDatabaseError.GDSErrorCode: LongInt;

Description

Firebird/Interbase-specific error code, the GDS error code. From a Firebird perspective: Firebird throws 2 error codes for an exception. The high-level one is the SQLCODE, which is a negative 3-digit code. The lower-level one is the ISC code (or GDSCODE) which has 9 digits. Related ISC error types are grouped under the same SQLCODE. In some cases, each successive gdscode error gives you further information about the error condition. Note: SQLCODE is a deprecated SQL standard; its successor is SQLSTATE.


TIBConnection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TIBConnection: Firebird/Interbase specific TSQLConnection

Declaration

Source position: ibconnection.pp line 49

type TIBConnection = class(TSQLConnection)
public
constructor Create(); override; | Creates a TIBConnection object
procedure CreateDB; override; | Creates a database on disk
procedure DropDB; override; | Deletes a database from disk
property BlobSegmentSize: Word; [rw] | Write this amount of bytes per BLOB segment
function GetDBDialect; | Retrieves database dialect
published
property DatabaseName; | Name of the database to connect to
property Dialect: Integer; [rws] | Database dialect
property KeepConnection; | Keep open connection after first query
property LoginPrompt; | Switch for showing custom login prompt
property Params; | Firebird/Interbase specific parameters
property OnLogin; | Event triggered when a login prompt needs to be shown.
end;

Inheritance

TIBConnection

TIBConnection: Firebird/Interbase specific TSQLConnection
|

TSQLConnection
?

TObject

Description

TIBConnection is a descendant of TSQLConnection and represents a connection to a Firebird/Interbase server.

It is designed to work with Interbase 6, Firebird 1 and newer database servers.

TIBConnection by default requires the Firebird/Interbase client library (e.g. gds32.dll, libfbclient.so, fbclient.dll,fbembed.dll) and its dependencies to be installed on the system. The bitness between library and your application must match: e.g. use 32 bit fbclient when developing a 32 bit application on 64 bit Linux.

On Windows, in accordance with the regular Windows way of loading DLLs, the library can also be in the executable directory. In fact, this directory is searched first, and might be a good option for distributing software to end users as it eliminates problems with incompatible DLL versions.

TIBConnection is based on FPC Interbase/Firebird code (ibase60.inc) that tries to load the client library. If you want to use Firebird embedded, make sure the embedded library is searched/loaded first. There are several ways to do this:

  • Include ibase60 in your uses clause, set UseEmbeddedFirebird to true
  • On Windows, with FPC newer than 2.5.1, put fbembed.dll in your application directory
  • On Windows, put the fbembed.dll in your application directory and rename it to fbclient.dll

Pre 2.5.1 versions of FPC did not try to load the fbembed library by default. See FPC bug 17664 for more details.

An indication of which DLLs need to be installed on Windows (Firebird 2.5, differs between versions:

  • fbclient.dll (or fbembed.dll)
  • firebird.msg
  • ib_util.dll
  • icudt30.dll
  • icuin30.dll
  • icuuc30.dll
  • msvcp80.dll
  • msvcr80.dll

Please see your database documentation for details.

See also

TSQLConnection


TIBConnection
 |  | BlobSegmentSize
pl | ro | DatabaseName
pl |  | Dialect
pl | ro | KeepConnection
pl | ro | LoginPrompt
pl | ro | Params


pl | ro | DatabaseName (TIBConnection)
pl |  | Dialect (TIBConnection)
pl | ro | KeepConnection (TIBConnection)
pl | ro | LoginPrompt (TIBConnection)
pl | ro |


TIBConnection
 | Create
 | CreateDB
 | DropDB
 | GetDBDialect


Create (TIBConnection)

CreateDB (TIBConnection)

DropDB (TIBConnection)

GetDBDialect (TIBConnection)


TIBConnection

pl

ro

OnLogin


TIBConnection.BlobSegmentSize

Write this amount of bytes per BLOB segment

Declaration

Source position: ibconnection.pp line 104

public property TIBConnection.BlobSegmentSize: Word
  read FBlobSegmentSize
  write FBlobSegmentSize;

Description

Deprecated since FPC 2.7.1 revision 19659

When sending BLOBs to the database, the code writes them in segments.

Before FPC 2.7.1 revision 19659, these segments were 80 bytes and could be changed using BlobSegmentSize. Please set BlobSegmentSize to 65535 for better write performance.

In newer FPC versions, the BlobSegmentSize property is ignored and segments of 65535 bytes are always used.


TIBConnection.Create

Creates a TIBConnection object

Declaration

Source position: ibconnection.pp line 100

public constructor TIBConnection.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the connection; use nil when not using a widgetset.


TIBConnection.CreateDB

Creates a database on disk

Declaration

Source position: ibconnection.pp line 101

public procedure TIBConnection.CreateDB; override;

Description

Instructs the Interbase or Firebird database server to create a new database.

If set, the Params (specifically, PAGE_SIZE) and CharSet properties influence the database creation.

If creating a database using a client/server environment, the TIBConnection code will connect to the database server before trying to create the database. Therefore make sure the connection properties are already correctly set, e.g. TSQLConnection.HostName, TSQLConnection.UserName, TSQLConnection.Password.

If creating a database using Firebird embedded, make sure the embedded library is loaded, the HostName property is empty, and set the TSQLConnection.UserName to e.g. 'SYSDBA'. See TIBConnection: Firebird/Interbase specific TSQLConnection for details on loading the embedded database library.

See also

Params

DropDB

TIBConnection

TIBConnection: Firebird/Interbase specific TSQLConnection


TIBConnection.DatabaseName

Name of the database to connect to

Declaration

Source position: ibconnection.pp line 107

published property TIBConnection.DatabaseName;

Description

Name of the Interbase/Firebird database to connect to.

This can be either the path to the database or an alias name. Please see your database documentation for details.

In a client/server environment, the name indicates the location of the database on the server's filesystem, so if you have a Linux Firebird server, you might have something like /var/lib/firebird/2.5/data/employee.fdb

If using an embedded Firebird database, the name is a relative path relative to the fbembed library.


TIBConnection.Dialect

Database dialect

Declaration

Source position: ibconnection.pp line 108

published property TIBConnection.Dialect: Integer
  read GetDialect
  write FDialect
  stored IsDialectStored
  default DEFDIALECT;

Description

Firebird/Interbase servers since Interbase 6 have a dialect setting for backwards compatibility. It can be 1, 2 or 3, the default is 3.

Note: the dialect for new Interbase/Firebird databases is 3; dialects 1 and 2 are only used in legacy environments. In practice, you can ignore this setting for newly created databases.


TIBConnection.DropDB

Deletes a database from disk

Declaration

Source position: ibconnection.pp line 102

public procedure TIBConnection.DropDB; override;

Description

DropDB instructs the Interbase/Firebird database server to delete the database that is specified in the TIBConnection.

In a client/server environment, the TIBConnection code will connect to the database server before telling it to drop the database. Therefore make sure the connection properties are already correctly set, e.g. HostName, UserName, Password.

When using Firebird embedded, make sure the embedded connection library is loaded, the HostName property is empty, and set the UserName to e.g. 'SYSDBA'. See TIBConnection: Firebird/Interbase specific TSQLConnection for more details on loading the embedded library.

See also

CreateDB

HostName

UserName

Password


TIBConnection.GetDBDialect

Retrieves database dialect

Declaration

Source position: ibconnection.pp line 105

public function TIBConnection.GetDBDialect: Integer;

Function result

The dialect as a number

Description

Gets the Interbase/Firebird database dialect. You should take account of dialect when sending queries to the database.

Note: the dialect for new Interbase/Firebird databases is 3; dialects 1 and 2 are only used in legacy environments. See your database documentation for more details.

See also

Dialect


TIBConnection.KeepConnection

Keep open connection after first query

Declaration

Source position: ibconnection.pp line 109

published property TIBConnection.KeepConnection;

Description

Determines whether to keep the connection open once it is established and the first query has been executed.


TIBConnection.LoginPrompt

Switch for showing custom login prompt

Declaration

Source position: ibconnection.pp line 110

published property TIBConnection.LoginPrompt;

Description

If true, the OnLogin event will fire, allowing you to handle supplying of credentials yourself.

See also

OnLogin


TIBConnection.OnLogin

Event triggered when a login prompt needs to be shown.

Declaration

Source position: ibconnection.pp line 112

published property TIBConnection.OnLogin;

Description

OnLogin is triggered when the connection needs a login prompt when connecting: it is triggered when the LoginPrompt property is True, after the BeforeConnect event, but before the connection is actually established.

See also

BeforeConnect

LoginPrompt

Open

TSQLConnection.OnLogin


TIBConnection.Params

Firebird/Interbase specific parameters

Declaration

Source position: ibconnection.pp line 111

published property TIBConnection.Params;

Description

Params is a TStringList of name=value combinations that set database-specific parameters.

The following parameter is supported:

  • PAGE_SIZE: size of database pages (an integer), e.g. 16384.

See your database documentation for more details.

See also

TSQLConnection.Params


TIBConnectionDef

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Describes TIBConnection class

Declaration

Source position: ibconnection.pp line 117

type TIBConnectionDef = class(TConnectionDef)
class function TypeName; override; | Firebird/Interbase child of SQLConnectionDef.TypeName
class function ConnectionClass; override; | Firebird/Interbase child of SQLConnectionDef.ConnectionClass
class function Description; override; | Description for the Firebird/Interbase child of SQLConnectionDef.ConnectionClass
end;

Inheritance

TIBConnectionDef

Describes TIBConnection class
|

TConnectionDef
?

TObject

Description

Child of SQLConnectionDef; used to register an Interbase/Firebird connection, so that it is available in "connection factory" scenarios where database drivers/connections are loaded at runtime and it is unknown at compile time whether the required database libraries are present on the end user's system.

See also

SQLConnectionDef


TIBConnectionDef


TIBConnectionDef
 | TypeName
 | ConnectionClass
 | Description


ConnectionClass (TIBConnectionDef)

Description (TIBConnectionDef)

TypeName (TIBConnectionDef)


TIBConnectionDef.ConnectionClass

Firebird/Interbase child of SQLConnectionDef.ConnectionClass

Declaration

Source position: ibconnection.pp line 119

class function TIBConnectionDef.ConnectionClass: TSQLConnectionClass; override;

Function result

Class of connection

See also

SQLConnectionDef.ConnectionClass

TIBConnection

TIBConnection: Firebird/Interbase specific TSQLConnection


TIBConnectionDef.Description

Description for the Firebird/Interbase child of SQLConnectionDef.ConnectionClass

Declaration

Source position: ibconnection.pp line 120

class function TIBConnectionDef.Description: ; override;

Function result

Description

Description

The description identifies this ConnectionDef object as a Firebird/Interbase connection.

See also

SQLConnectionDef.Description

TIBConnection

TIBConnection: Firebird/Interbase specific TSQLConnection


TIBConnectionDef.TypeName

Firebird/Interbase child of SQLConnectionDef.TypeName

Declaration

Source position: ibconnection.pp line 118

class function TIBConnectionDef.TypeName: ; override;

Function result

Descriptive name

See also

SQLConnectionDef.TypeName

TIBConnection

TIBConnection: Firebird/Interbase specific TSQLConnection


TIBCursor

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Firebird/Interbase cursor

Declaration

Source position: ibconnection.pp line 30

type TIBCursor = class(TSQLCursor)

end;

Inheritance

TIBCursor

Firebird/Interbase cursor
|

TSQLCursor
?

TObject

Description

A cursor that keeps track of where you are in a Firebird/Interbase dataset. It is a descendent of TSQLCursor.

See also

TSQLCursor

TIBConnection

TIBConnection: Firebird/Interbase specific TSQLConnection


TIBCursor


TIBTrans

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Firebird/Interbase transaction

Declaration

Source position: ibconnection.pp line 40

type TIBTrans = class(TSQLHandle)

end;

Inheritance

TIBTrans

Firebird/Interbase transaction
|

TSQLHandle
?

TObject

Description

Firebird/Interbase database transaction object. Descendant of TSQLHandle.

See also

TSQLHandle

TIBConnection

TIBConnection: Firebird/Interbase specific TSQLConnection


TIBTrans


EIDEAError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception for IDEA Stream errors.

Declaration

Source position: idea.pp line 72

type EIDEAError = class(EStreamError) ;

Inheritance

EIDEAError

Exception for IDEA Stream errors.
|

EStreamError
|

Exception
|

TObject

Description

EIDEAError is used to signal errors in the IDEA encryption decryption streams.


EIDEAError
EStreamError
Exception
 | HelpContext
 | Message
TObject


EIDEAError
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EIDEAError

EStreamError

Exception

TObject


TIDEADeCryptStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

IDEA Decryption stream.

Declaration

Source position: idea.pp line 104

type TIDEADeCryptStream = class(TIDEAStream)
public
constructor Create(); overload; | Constructor to create a new TIDEADecryptStream instance
function Read(); override; | Reads data from the stream, decrypting it as needed
function Seek(); override; | Set position on the stream
end;

Inheritance

TIDEADeCryptStream | IDEA Decryption stream.
|
TIDEAStream | Ancestor stream for IDEA encryption/decryption streams.
|
TOwnerStream
|
TStream
|
TObject

Description

TIDEADecryptStream is a stream which decrypts anything that is read from it using the IDEA mechanism. It reads the encrypted data from a source stream and decrypts it using the CipherIDEA algorithm. It is a read-only stream: it is not possible to write data to this stream.

When creating a TIDEADecryptStream instance, an IDEA decryption key should be passed to the constructor, as well as the stream from which encrypted data should be read written.

The encrypted data can be created with a TIDEAEncryptStream encryption stream.

See also

TIDEAEncryptStream | IDEA encryption stream.
TIDEAStream.Create | Creates a new instance of the TIDEAStream class
CipherIDEA | Encrypt or decrypt a buffer.


TIDEADeCryptStream
TIDEAStream
 | ro | Key
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


ro | Key (TIDEAStream)
 | Position (TStream)
 | Size (TStream)
ro |


TIDEADeCryptStream
 | Create
 | Read
 | Seek
TIDEAStream
 | Create
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TIDEAStream)

Create (TIDEADeCryptStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

Read (TIDEADeCryptStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TIDEADeCryptStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TIDEADeCryptStream

TIDEAStream

TOwnerStream

TStream

TObject


TIDEADeCryptStream.Create

Constructor to create a new TIDEADecryptStream instance

Declaration

Source position: idea.pp line 106

public constructor TIDEADeCryptStream.Create(

  const AKey: ;

  Dest: TStream

); overload;

Arguments

AKey | String to use as the encryption key
Dest | Source stream with encrypted data

Description

Create creates a new TIDEADecryptStream instance using the the string AKey to compute the encryption key, which is then passed on to the inherited constructor TIDEAStream.Create. It is an easy-access function which introduces no new functionality.

The string is truncated at the maximum length of the TIdeaCryptKey structure, so it makes no sense to provide a string with length longer than this structure.

See also

TIdeaCryptKey | Type for holding an encyption/decryption IDEA key.
TIDEAStream.Create | Creates a new instance of the TIDEAStream class
TIDEAEnCryptStream.Create | Constructor to create a new TIDEAEncryptStream instance


TIDEADeCryptStream.Read

Reads data from the stream, decrypting it as needed

Declaration

Source position: idea.pp line 107

public function TIDEADeCryptStream.Read(

  var Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Buffer to place the descrypted data
Count | Number of bytes that should be read from the stream.

Function result

Number of bytes actually read.

Description

Read attempts to read Count bytes from the stream, placing them in Buffer the bytes are read from the source stream and decrypted as they are read. (bytes are read from the source stream in blocks of 8 bytes. The function returns the number of bytes actually read.

Errors

If an error occurs when reading data from the source stream, an exception may be raised.

See also

Write | Write data to the stream
Seek | Set position on the stream
TIDEAEncryptStream | IDEA encryption stream.


TIDEADeCryptStream.Seek

Set position on the stream

Declaration

Source position: idea.pp line 108

public function TIDEADeCryptStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Offset to apply to the position in the stream
Origin | Origin from where Offset should be counted.

Function result

New position in the stream

Description

Seek will only work on a forward seek. It emulates a forward seek by reading and discarding bytes from the input stream. The TIDEADecryptStream stream tries to provide seek capabilities for the following limited number of cases:

Origin=soFromBeginning
If Offset is larger than the current position, then the remaining bytes are skipped by reading them from the stream and discarding them.
Origin=soFromCurrent
If Offset is zero, the current position is returned. If it is positive, then Offset bytes are skipped by reading them from the stream and discarding them.

Errors

An EIDEAError exception is raised if the stream does not allow the requested seek operation.

See also

Read

Reads data from the stream, decrypting it as needed


TIDEAEncryptStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

IDEA encryption stream.

Declaration

Source position: idea.pp line 93

type TIDEAEncryptStream = class(TIDEAStream)
public
constructor Create(); overload; | Constructor to create a new TIDEAEncryptStream instance
destructor Destroy; override; | Flush data buffers and free the stream instance.
function Write(); override; | Write bytes to the stream to be encrypted
function Seek(); override; | Set stream position
procedure Flush; | Write remaining bytes from the stream
end;

Inheritance

TIDEAEncryptStream | IDEA encryption stream.
|
TIDEAStream | Ancestor stream for IDEA encryption/decryption streams.
|
TOwnerStream
|
TStream
|
TObject

Description

TIDEAEncryptStream is a stream which encrypts anything that is written to it using the IDEA mechanism, and then writes the encrypted data to the destination stream using the CipherIDEA algorithm. It is a write-only stream: it is not possible to read data from this stream.

When creating a TIDEAEncryptStream instance, an IDEA encryption key should be passed to the constructor, as well as the stream to which encrypted data should be written.

The resulting encrypted data can be read again with a TIDEADecryptStream decryption stream.

See also

TIDEADecryptStream | IDEA Decryption stream.
TIDEAStream.Create | Creates a new instance of the TIDEAStream class
CipherIDEA | Encrypt or decrypt a buffer.


TIDEAEncryptStream
TIDEAStream
 | ro | Key
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


TIDEAEncryptStream
 | Create
 | Destroy
 | Write
 | Seek
 | Flush
TIDEAStream
 | Create
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TIDEAStream)

Create (TIDEAEncryptStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Destroy (TIDEAEncryptStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Flush (TIDEAEncryptStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (TIDEAEncryptStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (TIDEAEncryptStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TIDEAEncryptStream

TIDEAStream

TOwnerStream

TStream

TObject


TIDEAEncryptStream.Create

Constructor to create a new TIDEAEncryptStream instance

Declaration

Source position: idea.pp line 95

public constructor TIDEAEncryptStream.Create(

  const AKey: ;

  Dest: TStream

); overload;

Arguments

AKey | String to use as key data.
Dest | Destination stream for encrypted data

Description

Create creates a new TIDEAEncryptStream instance using the the string AKey to compute the encryption key, which is then passed on to the inherited constructor TIDEAStream.Create. It is an easy-access function which introduces no new functionality.

The string is truncated at the maximum length of the TIdeaCryptKey structure, so it makes no sense to provide a string with length longer than this structure.

See also

TIdeaCryptKey | Type for holding an encyption/decryption IDEA key.
TIDEAStream.Create | Creates a new instance of the TIDEAStream class
TIDEADeCryptStream.Create | Constructor to create a new TIDEADecryptStream instance


TIDEAEncryptStream.Destroy

Flush data buffers and free the stream instance.

Declaration

Source position: idea.pp line 96

public destructor TIDEAEncryptStream.Destroy; override;

Description

Destroy flushes any data still remaining in the internal encryption buffer, and then calls the inherited Destroy

By default, the destination stream is not freed when the encryption stream is freed.

Errors

None.

See also

TIDEAStream.Create

Creates a new instance of the TIDEAStream class


TIDEAEncryptStream.Flush

Write remaining bytes from the stream

Declaration

Source position: idea.pp line 99

public procedure TIDEAEncryptStream.Flush;

Description

Flush writes the current encryption buffer to the stream. Encryption always happens in blocks of 8 bytes, so if the buffer is not completely filled at the end of the writing operations, it must be flushed. It should never be called directly, unless at the end of all writing operations. It is called automatically when the stream is destroyed.

Errors

None.

See also

Write

Write bytes to the stream to be encrypted


TIDEAEncryptStream.Seek

Set stream position

Declaration

Source position: idea.pp line 98

public function TIDEAEncryptStream.Seek(

  Offset: LongInt;

  Origin: Word

):LongInt; override;

Arguments

Offset | Number of bytes to move stream pointer
Origin | Where to move stream pointer from

Function result

New location after seek operation

Description

Seek return the current position if called with 0 and soFromCurrent as arguments. With all other values, it will always raise an exception, since it is impossible to set the position on an encryption stream.

Errors

An EIDEAError will be raised unless called with 0 and soFromCurrent as arguments.

See also

Write | Write bytes to the stream to be encrypted
EIDEAError | Exception for IDEA Stream errors.


TIDEAEncryptStream.Write

Write bytes to the stream to be encrypted

Declaration

Source position: idea.pp line 97

public function TIDEAEncryptStream.Write(

  const Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Buffer containing data to be written
Count | Number of bytes to write.

Function result

Number of bytes actually written.

Description

Write writes Count bytes from Buffer to the stream, encrypting the bytes as they are written (encryption in blocks of 8 bytes).

Errors

If an error occurs writing to the destination stream, an error may occur.

See also

Read

Reads data from the stream, decrypting it as needed


TIDEAStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ancestor stream for IDEA encryption/decryption streams.

Declaration

Source position: idea.pp line 76

type TIDEAStream = class(TOwnerStream)
public
constructor Create(); overload; | Creates a new instance of the TIDEAStream class
property Key: TIDEAKey; [r] | Key used when encrypting/decrypting
end;

Inheritance

TIDEAStream

Ancestor stream for IDEA encryption/decryption streams.
|

TOwnerStream
|

TStream
|

TObject

Description

Do not create instances of TIDEAStream directly. It implements no useful functionality: it serves as a common ancestor of the TIDEAEncryptStream and TIDEADeCryptStream, and simply provides some fields that these descendent classes use when encrypting/decrypting. One of these classes should be created, depending on whether one wishes to encrypt or to decrypt.

See also

TIDEAEncryptStream | IDEA encryption stream.
TIDEADeCryptStream | IDEA Decryption stream.


TIDEAStream
 | ro | Key
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


TIDEAStream
 | Create
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

Create (TIDEAStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TIDEAStream

TOwnerStream

TStream

TObject


TIDEAStream.Create

Creates a new instance of the TIDEAStream class

Declaration

Source position: idea.pp line 87

public constructor TIDEAStream.Create(

  AKey: TIDEAKey;

  Dest: TStream

); overload;

Arguments

AKey | Key to use for encryption/decryption
Dest | Stream to write encrypted data to/read encrypted data from

Description

Create stores the encryption/decryption key and then calls the inherited Create to store the Dest stream.

Errors

None.

See also

TIDEAEncryptStream | IDEA encryption stream.
TIDEADeCryptStream | IDEA Decryption stream.


TIDEAStream.Key

Key used when encrypting/decrypting

Declaration

Source position: idea.pp line 88

public property TIDEAStream.Key: TIDEAKey
  read FKey;

Description

Key is the key as it was passed to the constructor of the stream. It cannot be changed while data is read or written. It is the key as it is used when encrypting/decrypting.

See also

CipherIdea

Encrypt or decrypt a buffer.


EIniCol

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception used for error reporting.

Declaration

Source position: inicol.pp line 76

type EIniCol = class(Exception) ;

Inheritance

EIniCol

Exception used for error reporting.
|

Exception
|

TObject

Description

EIniCol is used to report error conditions in the load and save methods of TIniCollection.


EIniCol
Exception
 | HelpContext
 | Message
TObject


EIniCol
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EIniCol

Exception

TObject


TIniCollection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection which can write itself to an .ini file

Declaration

Source position: inicol.pp line 25

type TIniCollection = class(TCollection)
public
procedure Load; | Loads the collection from the default filename.
procedure Save; | Save the collection to the default filename.
procedure SaveToIni(); virtual; | Save the collection to a TCustomIniFile descendent
procedure SaveToFile(); | Save collection to a file in .ini file format
procedure LoadFromIni(); virtual; | Load collection from a file in .ini file format.
procedure LoadFromFile(); | Load collection from file.
property Prefix: ; [r] | Prefix used in global section
property SectionPrefix: ; [r] | Prefix string for section names
property FileName: ; [rw] | Filename of the collection
property GlobalSection: ; [rw] | Name of the global section
end;

Inheritance

TIniCollection

Collection which can write itself to an .ini file
|

TCollection
|

TPersistent
|

TObject

Description

TIniCollection is a collection descendent which has the capability to write itself to an .ini file. It introduces some load and save mechanisms, which can be used to write all items in the collection to disk. The items should be descendents of the type TIniCollectionItem.

All methods work using a TCustomInifile class, making it possible to save to alternate file formats, or even databases.

An instance of TIniCollection should never be used directly. Instead, a descendent should be used, which sets the FPrefix and FSectionPrefix protected variables.

See also

TIniCollection.LoadFromFile | Load collection from file.
TIniCollection.LoadFromIni | Load collection from a file in .ini file format.
TIniCollection.SaveToIni | Save the collection to a TCustomIniFile descendent
TIniCollection.SaveToFile | Save collection to a file in .ini file format


TIniCollection
 | ro | Prefix
 | ro | SectionPrefix
 |  | FileName
 |  | GlobalSection
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
 | FileName (TIniCollection)
 | GlobalSection (TIniCollection)
ro | ItemClass (TCollection)
 | Items (TCollection)
ro | Prefix (TIniCollection)
 | PropName (TCollection)
ro | SectionPrefix (TIniCollection)
ro | UpdateCount (TCollection)


TIniCollection
 | Load
 | Save
 | SaveToIni
 | SaveToFile
 | LoadFromIni
 | LoadFromFile
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetPropName (TCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

Load (TIniCollection)

LoadFromFile (TIniCollection)

LoadFromIni (TIniCollection)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

Save (TIniCollection)

SaveToFile (TIniCollection)

SaveToIni (TIniCollection)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TIniCollection

TCollection

TPersistent

TObject


TIniCollection.FileName

Filename of the collection

Declaration

Source position: inicol.pp line 41

public property TIniCollection.FileName:
  read FFileName
  write FFileName;

Description

FileName is the filename as used in the last LoadFromFile or SaveToFile operation. It is used in the Load or Save calls.

See also

Save | Save the collection to the default filename.
LoadFromFile | Load collection from file.
SaveToFile | Save collection to a file in .ini file format
Load | Loads the collection from the default filename.


TIniCollection.GlobalSection

Name of the global section

Declaration

Source position: inicol.pp line 42

public property TIniCollection.GlobalSection:
  read FGlobalSection
  write FGlobalSection;

Description

GlobalSection contains the value of the Section argument in the LoadFromIni or SaveToIni calls. It's used in the Load or Save calls.

See also

Save | Save the collection to the default filename.
LoadFromFile | Load collection from file.
SaveToFile | Save collection to a file in .ini file format
Load | Loads the collection from the default filename.


TIniCollection.Load

Loads the collection from the default filename.

Declaration

Source position: inicol.pp line 33

public procedure TIniCollection.Load;

Description

Load loads the collection from the file as specified in the FileName property. It calls the LoadFromFile method to do this.

Errors

If the collection was not loaded or saved to file before this call, an EIniCol exception will be raised.

See also

TIniCollection.LoadFromFile | Load collection from file.
TIniCollection.LoadFromIni | Load collection from a file in .ini file format.
TIniCollection.Save | Save the collection to the default filename.
FileName | Filename of the collection


TIniCollection.LoadFromFile

Load collection from file.

Declaration

Source position: inicol.pp line 38

public procedure TIniCollection.LoadFromFile(

  AFileName: ;

  Section:

);

Arguments

AFileName | Filename to load collection from
Section | Section to use as global section

Description

LoadFromFile creates a TMemIniFile instance using AFileName as the filename. It calls LoadFromIni using this instance and Section as the parameters.

See also

TIniCollection.LoadFromIni | Load collection from a file in .ini file format.
TIniCollection.Load | Loads the collection from the default filename.
TIniCollection.SaveToIni | Save the collection to a TCustomIniFile descendent
TIniCollection.SaveToFile | Save collection to a file in .ini file format


TIniCollection.LoadFromIni

Load collection from a file in .ini file format.

Declaration

Source position: inicol.pp line 37

public procedure TIniCollection.LoadFromIni(

  Ini: TCustomIniFile;

  Section:

); virtual;

Arguments

Ini | Ini object to load data from.
Section | Name of the global section.

Description

LoadFromIni will load the collection from the Ini instance. It first clears the collection, and reads the number of items from the global section with the name as passed through the Section argument. After this, an item is created and added to the collection, and its data is read by calling the TIniCollectionItem.LoadFromIni method, passing the appropriate section name as found in the global section.

The description of the global section can be found in the TIniCollection.SaveToIni method description.

See also

TIniCollection.LoadFromFile | Load collection from file.
TIniCollectionItem.LoadFromIni | Method called when the item must be loaded
TIniCollection.SaveToIni | Save the collection to a TCustomIniFile descendent


TIniCollection.Prefix

Prefix used in global section

Declaration

Source position: inicol.pp line 39

public property TIniCollection.Prefix:
  read FPrefix;

Description

Prefix is used when writing the section names of the items in the collection to the global section, or when reading the names from the global section. If the prefix is set to Item then the global section might look something like this:

[MyCollection]
Count=2
Item1=FirstItem
Item2=SecondItem

A descendent of TIniCollection should set the value of this property, it cannot be empty.

See also

TIniCollection.SectionPrefix | Prefix string for section names
TIniCollection.GlobalSection | Name of the global section


TIniCollection.Save

Save the collection to the default filename.

Declaration

Source position: inicol.pp line 34

public procedure TIniCollection.Save;

Description

Save writes the collection to the file as specified in the FileName property, using GlobalSection as the section. It calls the SaveToFile method to do this.

Errors

If the collection was not loaded or saved to file before this call, an EIniCol exception will be raised.

See also

TIniCollection.SaveToFile | Save collection to a file in .ini file format
TIniCollection.SaveToIni | Save the collection to a TCustomIniFile descendent
TIniCollection.Load | Loads the collection from the default filename.
FileName | Filename of the collection


TIniCollection.SaveToFile

Save collection to a file in .ini file format

Declaration

Source position: inicol.pp line 36

public procedure TIniCollection.SaveToFile(

  AFileName: ;

  Section:

);

Arguments

AFileName | File to save collection to.
Section | Section name for global section.

Description

SaveToFile will create a TMemIniFile instance with the AFileName argument as a filename. This instance is passed on to the SaveToIni method, together with the Section argument, to do the actual saving.

Errors

An exception may be raised if the path in AFileName does not exist.

See also

TIniCollection.SaveToIni | Save the collection to a TCustomIniFile descendent
TIniCollection.LoadFromFile | Load collection from file.


TIniCollection.SaveToIni

Save the collection to a TCustomIniFile descendent

Declaration

Source position: inicol.pp line 35

public procedure TIniCollection.SaveToIni(

  Ini: TCustomIniFile;

  Section:

); virtual;

Arguments

Ini | Inifile class to use when writing data.
Section | Section to which to write the global data

Description

SaveToIni does the actual writing. It writes the number of elements in the global section (as specified by the Section argument), as well as the section name for each item in the list. The item names are written using the Prefix property for the key. After this it calls the SaveToIni method of all TIniCollectionItem instances.

This means that the global section of the .ini file will look something like this:

[globalsection]
Count=3
Prefix1=SectionPrefixFirstItemName
Prefix2=SectionPrefixSecondItemName
Prefix3=SectionPrefixThirdItemName

This construct allows to re-use an ini file for multiple collections.

After this method is called, the GlobalSection property contains the value of Section, it will be used in the Save method.

See also

TIniCollectionItem.SaveToIni

Method called when the item must be saved


TIniCollection.SectionPrefix

Prefix string for section names

Declaration

Source position: inicol.pp line 40

public property TIniCollection.SectionPrefix:
  read FSectionPrefix;

Description

SectionPrefix is a string that is prepended to the section name as returned by the TIniCollectionItem.SectionName property to return the exact section name. It can be empty.

See also

TIniCollection.Section

TIniCollection.GlobalSection

Name of the global section


TIniCollectionItem

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection item with support for loading/saving from/to ini file

Declaration

Source position: inicol.pp line 13

type TIniCollectionItem = class(TCollectionItem)
public
procedure SaveToIni(); virtual; abstract; | Method called when the item must be saved
procedure LoadFromIni(); virtual; abstract; | Method called when the item must be loaded
procedure SaveToFile(); | Save item to a file
procedure LoadFromFile(); | Load item from a file
property SectionName: ; [rw] | Default section name
end;

Inheritance

TIniCollectionItem

Collection item with support for loading/saving from/to ini file
|

TCollectionItem
|

TPersistent
|

TObject

Description

TIniCollectionItem is a #rtl.classes.tcollectionitem descendent which has some extra methods for saving/loading the item to or from an .ini file.

To use this class, a descendent should be made, and the SaveToIni and LoadFromIni methods should be overridden. They should implement the actual loading and saving. The loading and saving is always initiated by the methods in TIniCollection, TIniCollection.LoadFromIni and TIniCollection.SaveToIni respectively.

See also

TIniCollection | Collection which can write itself to an .ini file
TIniCollectionItem.SaveToIni | Method called when the item must be saved
TIniCollectionItem.LoadFromIni | Method called when the item must be loaded
TIniCollection.LoadFromIni | Load collection from a file in .ini file format.
TIniCollection.SaveToIni | Save the collection to a TCustomIniFile descendent


TIniCollectionItem
 |  | SectionName
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


ro | ID (TCollectionItem)
 | Index (TCollectionItem)
 | SectionName (TIniCollectionItem)
ro | UpdateCount (TCollectionItem)


TIniCollectionItem
 | SaveToIni
 | LoadFromIni
 | SaveToFile
 | LoadFromFile
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

Changed (TCollectionItem)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TCollectionItem)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Destroy (TObject)

Destroy (TCollectionItem)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetDisplayName (TCollectionItem)

GetHashCode (TObject)

GetIndex (TCollectionItem)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TCollectionItem)

GetOwner (TPersistent)

GetOwner (TCollectionItem)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

LoadFromFile (TIniCollectionItem)

LoadFromIni (TIniCollectionItem)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SaveToFile (TIniCollectionItem)

SaveToIni (TIniCollectionItem)

SetCollection (TCollectionItem)

SetDisplayName (TCollectionItem)

SetIndex (TCollectionItem)


TIniCollectionItem

TCollectionItem

TPersistent

TObject


TIniCollectionItem.LoadFromFile

Load item from a file

Declaration

Source position: inicol.pp line 21

public procedure TIniCollectionItem.LoadFromFile(

  FileName: ;

  Section:

);

Arguments

FileName | Filename from which to load item
Section | Section from which to load

Description

LoadFromFile creates an instance of TMemIniFile and calls LoadFromIni to load the item from the indicated file in .ini format from the section Section.

Errors

None.

See also

SaveToFile | Save item to a file
LoadFromIni | Method called when the item must be loaded


TIniCollectionItem.LoadFromIni

Method called when the item must be loaded

Declaration

Source position: inicol.pp line 19

public procedure TIniCollectionItem.LoadFromIni(

  Ini: TCustomIniFile;

  Section:

); virtual; abstract;

Arguments

Ini | TCustomIniFile instance from which the item should be loaded
Section | Section from which data should be loaded.

Description

LoadFromIni is called by TIniCollection.LoadFromIni when it saves this item. Descendent classes should override this method to load the data they need to load. All read methods of the TCustomIniFile instance passed in Ini can be used, as long as the reading happens in the section passed in Section.

Errors

No checking is done to see whether the values are actually read from the correct section.

See also

TIniCollection.LoadFromIni | Load collection from a file in .ini file format.
SaveToIni | Method called when the item must be saved
LoadFromFile | Load item from a file
SaveToFile | Save item to a file


TIniCollectionItem.SaveToFile

Save item to a file

Declaration

Source position: inicol.pp line 20

public procedure TIniCollectionItem.SaveToFile(

  FileName: ;

  Section:

);

Arguments

FileName | Name of file to which the item should be saved.
Section | Section under which the item should be saved.

Description

SaveToFile creates an instance of TIniFile with the indicated FileName calls SaveToIni to save the item to the indicated file in .ini format under the section Section

Errors

An exception can occur if the file is not writeable.

See also

SaveToIni | Method called when the item must be saved
LoadFromFile | Load item from a file


TIniCollectionItem.SaveToIni

Method called when the item must be saved

Declaration

Source position: inicol.pp line 18

public procedure TIniCollectionItem.SaveToIni(

  Ini: TCustomIniFile;

  Section:

); virtual; abstract;

Arguments

Ini | TCustomIniFile instance to which the item should be saved
Section | Section under which data should be saved.

Description

SaveToIni is called by TIniCollection.SaveToIni when it saves this item. Descendent classes should override this method to save the data they need to save. All write methods of the TCustomIniFile instance passed in Ini can be used, as long as the writing happens in the section passed in Section.

Errors

No checking is done to see whether the values are actually written to the correct section.

See also

TIniCollection.SaveToIni | Save the collection to a TCustomIniFile descendent
LoadFromIni | Method called when the item must be loaded
SaveToFile | Save item to a file
LoadFromFile | Load item from a file


TIniCollectionItem.SectionName

Default section name

Declaration

Source position: inicol.pp line 22

public property TIniCollectionItem.SectionName:
  read GetSectionName
  write SetSectionName;

Description

SectionName is the section name under which the item will be saved or from which it should be read. The read/write functions should be overridden in descendents to determine a unique section name within the .ini file.

See also

SaveToFile | Save item to a file
LoadFromIni | Method called when the item must be loaded


TNamedIniCollection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection of named collection items

Declaration

Source position: inicol.pp line 64

type TNamedIniCollection = class(TIniCollection)
public
function IndexOfUserData(); | Search for an item based on it's UserData property
function IndexOfName(); | Search for an item, based on its name, and return its position
function FindByName(); | Return the item based on its name
function FindByUserData(); | Return the item based on its UserData
property NamedItems: TNamedIniCollectionItem; default; [rw] | Indexed access to the TNamedIniCollectionItem items
end;

Inheritance

TNamedIniCollection | Collection of named collection items
|
TIniCollection | Collection which can write itself to an .ini file
|
TCollection
|
TPersistent
|
TObject

Description

TNamedIniCollection is the collection to go with the TNamedIniCollectionItem item class. it provides some functions to look for items based on the UserData or based on the Name.

See also

TNamedIniCollectionItem | TIniCollectionItem with a name property
IndexOfUserData | Search for an item based on it's UserData property
IndexOfName | Search for an item, based on its name, and return its position


TNamedIniCollection
 |  | NamedItems
TIniCollection
 | ro | Prefix
 | ro | SectionPrefix
 |  | FileName
 |  | GlobalSection
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
 | FileName (TIniCollection)
 | GlobalSection (TIniCollection)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | NamedItems (TNamedIniCollection)
ro | Prefix (TIniCollection)
 | PropName (TCollection)
ro | SectionPrefix (TIniCollection)
ro | UpdateCount (TCollection)


TNamedIniCollection
 | IndexOfUserData
 | IndexOfName
 | FindByName
 | FindByUserData
TIniCollection
 | Load
 | Save
 | SaveToIni
 | SaveToFile
 | LoadFromIni
 | LoadFromFile
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

FindByName (TNamedIniCollection)

FindByUserData (TNamedIniCollection)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetPropName (TCollection)

IndexOfName (TNamedIniCollection)

IndexOfUserData (TNamedIniCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

Load (TIniCollection)

LoadFromFile (TIniCollection)

LoadFromIni (TIniCollection)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

Save (TIniCollection)

SaveToFile (TIniCollection)

SaveToIni (TIniCollection)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TNamedIniCollection

TIniCollection

TCollection

TPersistent

TObject


TNamedIniCollection.FindByName

Return the item based on its name

Declaration

Source position: inicol.pp line 71

public function TNamedIniCollection.FindByName(

  const AName:

):TNamedIniCollectionItem;

Arguments

AName

Name to look for

Function result

Named item, or Nil if none was found

Description

FindByName returns the collection item whose name matches AName (case insensitive match). It calls IndexOfName and returns the item at the found position. If no item is found, Nil is returned.

Errors

If no item is found, Nil is returned.

See also

IndexOfName | Search for an item, based on its name, and return its position
FindByUserData | Return the item based on its UserData


TNamedIniCollection.FindByUserData

Return the item based on its UserData

Declaration

Source position: inicol.pp line 72

public function TNamedIniCollection.FindByUserData(

  UserData: TObject

):TNamedIniCollectionItem;

Arguments

UserData

Userdata to look for

Function result

Found item, or Nil if none was found.

Description

FindByName returns the collection item whose UserData property value matches the UserData parameter. If no item is found, Nil is returned.

Errors

If no item is found, Nil is returned.


TNamedIniCollection.IndexOfName

Search for an item, based on its name, and return its position

Declaration

Source position: inicol.pp line 70

public function TNamedIniCollection.IndexOfName(

  const AName:

):Integer;

Arguments

AName

Name to look for (case insensitive)

Function result

Index of found item or -1 if none was found

Description

IndexOfName searches the list of items and returns the index of the item which has name equal to AName (case insentitive). If no such item exists, -1 is returned.

Note that the (linear) search starts at the last element and works it's way back to the first.

Errors

If no item exists, -1 is returned.

See also

IndexOfUserData | Search for an item based on it's UserData property
TNamedIniCollectionItem.Name | Name of the item


TNamedIniCollection.IndexOfUserData

Search for an item based on it's UserData property

Declaration

Source position: inicol.pp line 69

public function TNamedIniCollection.IndexOfUserData(

  UserData: TObject

):Integer;

Arguments

UserData

UserData to search for

Function result

Index of found item, or -1 if none was found

Description

IndexOfUserData searches the list of items and returns the index of the item which has UserData in its UserData property. If no such item exists, -1 is returned.

Note that the (linear) search starts at the last element and works it's way back to the first.

Errors

If no item exists, -1 is returned.

See also

IndexOfName | Search for an item, based on its name, and return its position
TNamedIniCollectionItem.UserData | User-defined data


TNamedIniCollection.NamedItems

Indexed access to the TNamedIniCollectionItem items

Declaration

Source position: inicol.pp line 73

public property TNamedIniCollection.NamedItems: TNamedIniCollectionItem
  read GetNamedItem
  write SetNamedItem;
  default;

Description

NamedItem is the default property of the TNamedIniCollection collection. It allows indexed access to the TNamedIniCollectionItem items. The index is zero based.

See also

TNamedIniCollectionItem

TIniCollectionItem with a name property


TNamedIniCollectionItem

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TIniCollectionItem with a name property

Declaration

Source position: inicol.pp line 47

type TNamedIniCollectionItem = class(TIniCollectionItem)
public
property UserData: TObject; [rw] | User-defined data
published
property Name: ; [rw] | Name of the item
end;

Inheritance

TNamedIniCollectionItem | TIniCollectionItem with a name property
|
TIniCollectionItem | Collection item with support for loading/saving from/to ini file
|
TCollectionItem
|
TPersistent
|
TObject

Description

TNamedIniCollectionItem is a TIniCollectionItem descent with a published name property. The name is used as the section name when saving the item to the ini file.

See also

TIniCollectionItem

Collection item with support for loading/saving from/to ini file


TNamedIniCollectionItem
 |  | UserData
pl |  | Name
TIniCollectionItem
 |  | SectionName
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


 | ro | ID (TCollectionItem)
 |  | Index (TCollectionItem)
pl |  | Name (TNamedIniCollectionItem)
 |  | SectionName (TIniCollectionItem)
 | ro | UpdateCount (TCollectionItem)


TNamedIniCollectionItem
TIniCollectionItem
 | SaveToIni
 | LoadFromIni
 | SaveToFile
 | LoadFromFile
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TNamedIniCollectionItem

TIniCollectionItem

TCollectionItem

TPersistent

TObject


TNamedIniCollectionItem.Name

Name of the item

Declaration

Source position: inicol.pp line 60

published property TNamedIniCollectionItem.Name:
  read FName
  write SetName;

Description

Name is the name of this item. It is also used as the section name when writing the collection item to the .ini file.

See also

TNamedIniCollectionItem.UserData

User-defined data


TNamedIniCollectionItem.UserData

User-defined data

Declaration

Source position: inicol.pp line 58

public property TNamedIniCollectionItem.UserData: TObject
  read FUserData
  write FUserData;

Description

UserData can be used to associate an arbitrary object with the item - much like the Objects property of a TStrings.


TCustomIniFile

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Abstract ini file object

Declaration

Source position: inifiles.pp line 120

type TCustomIniFile = class
public
constructor Create(); virtual; | Instantiate a new instance of TCustomIniFile.
destructor Destroy; override; | Remove the TCustomIniFile instance from memory
function SectionExists(); virtual; | Check if a section exists.
function ReadString(); virtual; abstract; | Read a string valued key
procedure WriteString(); virtual; abstract; | Write a string value
function ReadInteger(); virtual; | Read an integer value from the file
procedure WriteInteger(); virtual; | Write an integer value
function ReadBool(); virtual; |
procedure WriteBool(); virtual; | Write boolean value
function ReadDate(); virtual; | Read a date value
function ReadDateTime(); virtual; | Read a Date/Time value
function ReadFloat(); virtual; | Read a floating point value
function ReadTime(); virtual; | Read a time value
function ReadBinaryStream(); virtual; | Read binary data
procedure WriteDate(); virtual; | Write date value
procedure WriteDateTime(); virtual; | Write date/time value
procedure WriteFloat(); virtual; | Write a floating-point value
procedure WriteTime(); virtual; | Write time value
procedure WriteBinaryStream(); virtual; | Write binary data
procedure ReadSection(); virtual; abstract; | Read the key names in a section
procedure ReadSections(); virtual; abstract; | Read the list of sections
procedure ReadSectionValues(); virtual; abstract; | Read names and values of a section
procedure EraseSection(); virtual; abstract; | Clear a section
procedure DeleteKey(); virtual; abstract; | Delete a key from a section
procedure UpdateFile; virtual; abstract; | Update the file on disk
function ValueExists(); virtual; | Check if a value exists
property FileName: ; [r] | Name of the .ini file
property EscapeLineFeeds: Boolean; [r] | Should linefeeds be escaped ?
property CaseSensitive: Boolean; [rw] | Are key and section names case sensitive
property StripQuotes: Boolean; [rw] | Should quotes be stripped from string values
end;

Inheritance

TCustomIniFile

Abstract ini file object
|

TObject

Description

TCustomIniFile implements all calls for manipulating a .ini. It does not implement any of this behaviour, the behaviour must be implemented in a descendent class like TIniFile or TMemIniFile.

Since TCustomIniFile is an abstract class, it should never be created directly. Instead, one of the TIniFile or TMemIniFile classes should be created.

See also

TIniFile | Ini file implementation
TMemIniFile | Inifile cached in memory


TCustomIniFile
 | ro | FileName
 | ro | EscapeLineFeeds
 |  | CaseSensitive
 |  | StripQuotes


ro | EscapeLineFeeds (TCustomIniFile)
ro |


TCustomIniFile
 | Create
 | Destroy
 | SectionExists
 | ReadString
 | WriteString
 | ReadInteger
 | WriteInteger
 | ReadBool
 | WriteBool
 | ReadDate
 | ReadDateTime
 | ReadFloat
 | ReadTime
 | ReadBinaryStream
 | WriteDate
 | WriteDateTime
 | WriteFloat
 | WriteTime
 | WriteBinaryStream
 | ReadSection
 | ReadSections
 | ReadSectionValues
 | EraseSection
 | DeleteKey
 | UpdateFile
 | ValueExists


Create (TCustomIniFile)

DeleteKey (TCustomIniFile)

Destroy (TCustomIniFile)

EraseSection (TCustomIniFile)

ReadBinaryStream (TCustomIniFile)

ReadBool (TCustomIniFile)

ReadDate (TCustomIniFile)

ReadDateTime (TCustomIniFile)

ReadFloat (TCustomIniFile)

ReadInteger (TCustomIniFile)

ReadSection (TCustomIniFile)

ReadSections (TCustomIniFile)

ReadSectionValues (TCustomIniFile)

ReadString (TCustomIniFile)

ReadTime (TCustomIniFile)

SectionExists (TCustomIniFile)

UpdateFile (TCustomIniFile)

ValueExists (TCustomIniFile)

WriteBinaryStream (TCustomIniFile)

WriteBool (TCustomIniFile)

WriteDate (TCustomIniFile)

WriteDateTime (TCustomIniFile)

WriteFloat (TCustomIniFile)

WriteInteger (TCustomIniFile)

WriteString (TCustomIniFile)

WriteTime (TCustomIniFile)


TCustomIniFile


TCustomIniFile.CaseSensitive

Are key and section names case sensitive

Declaration

Source position: inifiles.pp line 156

public property TCustomIniFile.CaseSensitive: Boolean
  read FCaseSensitive
  write FCaseSensitive;

Description

CaseSensitive determines whether searches for sections and keys are performed case-sensitive or not. By default, they are not case sensitive.

See also

EscapeLineFeeds

Should linefeeds be escaped ?


TCustomIniFile.Create

Instantiate a new instance of TCustomIniFile.

Declaration

Source position: inifiles.pp line 128

public constructor TCustomIniFile.Create(

  const AFileName: ;

  AEscapeLineFeeds: Boolean = False

); virtual;

Arguments

AFileName | Filename to read
AEscapeLineFeeds | Should escaping of linefeeds be enabled ?

Description

Create creates a new instance of TCustomIniFile and loads it with the data from AFileName, if this file exists. If the AEscapeLineFeeds parameter is True, then lines which have their end-of-line markers escaped with a backslash, will be concatenated. This means that the following 2 lines

Description=This is a \
line with a long text

is equivalent to

Description=This is a line with a long text

By default, not escaping of linefeeds is performed (for Delphi compatibility)

Errors

If the file cannot be read, an exception may be raised.

See also

Destroy

Remove the TCustomIniFile instance from memory


TCustomIniFile.DeleteKey

Delete a key from a section

Declaration

Source position: inifiles.pp line 151

public procedure TCustomIniFile.DeleteKey(

  const Section: ;

  const Ident:

); virtual; abstract;

Arguments

Section | Section from which to delete key
Ident | Name of key to delete

Description

DeleteKey deletes the key Ident from section Section. If the key or section didn't exist prior to the DeleteKey call, nothing happens.

See also

EraseSection

Clear a section


TCustomIniFile.Destroy

Remove the TCustomIniFile instance from memory

Declaration

Source position: inifiles.pp line 129

public destructor TCustomIniFile.Destroy; override;

Description

Destroy cleans up all internal structures and then calls the inherited Destroy.

See also

TCustomIniFile

Abstract ini file object


TCustomIniFile.EraseSection

Clear a section

Declaration

Source position: inifiles.pp line 150

public procedure TCustomIniFile.EraseSection(

  const Section:

); virtual; abstract;

Arguments

Section

Name of section to erase

Description

EraseSection deletes all values from the section named Section and removes the section from the ini file. If the section didn't exist prior to a call to EraseSection, nothing happens.

See also

SectionExists | Check if a section exists.
ReadSections | Read the list of sections
DeleteKey | Delete a key from a section


TCustomIniFile.EscapeLineFeeds

Should linefeeds be escaped ?

Declaration

Source position: inifiles.pp line 155

public property TCustomIniFile.EscapeLineFeeds: Boolean
  read FEscapeLineFeeds;

Description

EscapeLineFeeds determines whether escaping of linefeeds is enabled: For a description of this feature, see Create, as the value of this property must be specified when the TCustomIniFile instance is created.

By default, EscapeLineFeeds is False.

See also

Create | Instantiate a new instance of TCustomIniFile.
CaseSensitive | Are key and section names case sensitive


TCustomIniFile.FileName

Name of the .ini file

Declaration

Source position: inifiles.pp line 154

public property TCustomIniFile.FileName:
  read FFileName;

Description

FileName is the name of the ini file on disk. It should be specified when the TCustomIniFile instance is created. Contrary to the Delphi implementation, if no path component is present in the filename, the filename is not searched in the windows directory.

See also

Create

Instantiate a new instance of TCustomIniFile.


TCustomIniFile.ReadBinaryStream

Read binary data

Declaration

Source position: inifiles.pp line 141

public function TCustomIniFile.ReadBinaryStream(

  const Section: ;

  const Name: ;

  Value: TStream

):Integer; virtual;

Arguments

Section | Section to read Name from
Name | Name of key to retrieve value from
Value | Stream to write data to.

Function result

Number of bytes written to Value

Description

ReadBinaryStream reads the key Name in section Section, and returns the value in the stream Value. If the specified key or section do not exist, then the contents of Value are left untouched. The stream is not cleared prior to adding data to it.

The data is interpreted as a series of 2-byte hexadecimal values, each representing a byte in the data stream, i.e, it should always be an even number of hexadecimal characters.

See also

WriteBinaryStream | Write binary data
ReadInteger | Read an integer value from the file
ReadBool |
ReadDate | Read a date value
ReadDateTime | Read a Date/Time value
ReadTime | Read a time value
ReadFloat | Read a floating point value
ReadString | Read a string valued key


TCustomIniFile.ReadBool

Declaration

Source position: inifiles.pp line 135

public function TCustomIniFile.ReadBool(

  const Section: ;

  const Ident: ;

  Default: Boolean

):Boolean; virtual;

Arguments

Section | Section to read Ident from
Ident | Name of key to retrieve value from
Default | Default value to return when the key Ident does not exist.

Function result

Value of Ident as a boolean

Description

ReadString reads the key Ident in section Section, and returns the value as a boolean (valid values are 0 and 1). If the specified key or section do not exist, then the value in Default is returned. If the key exists, but contains an invalid integer value, False is also returned.

See also

WriteBool | Write boolean value
ReadInteger | Read an integer value from the file
ReadString | Read a string valued key
ReadDate | Read a date value
ReadDateTime | Read a Date/Time value
ReadTime | Read a time value
ReadFloat | Read a floating point value
ReadBinaryStream | Read binary data


TCustomIniFile.ReadDate

Read a date value

Declaration

Source position: inifiles.pp line 137

public function TCustomIniFile.ReadDate(

  const Section: ;

  const Ident: ;

  Default: TDateTime

):TDateTime; virtual;

Arguments

Section | Section to read Ident from
Ident | Name of key to retrieve value from
Default | Default value to return when the key Ident does not exist.

Function result

Value of Ident as a TDateTime

Description

ReadDate reads the key Ident in section Section, and returns the value as a date (TDateTime). If the specified key or section do not exist, then the value in Default is returned. If the key exists, but contains an invalid date value, Default is also returned. The international settings of the SysUtils are taken into account when deciding if the read value is a correct date.

See also

WriteDate | Write date value
ReadInteger | Read an integer value from the file
ReadBool |
ReadString | Read a string valued key
ReadDateTime | Read a Date/Time value
ReadTime | Read a time value
ReadFloat | Read a floating point value
ReadBinaryStream | Read binary data


TCustomIniFile.ReadDateTime

Read a Date/Time value

Declaration

Source position: inifiles.pp line 138

public function TCustomIniFile.ReadDateTime(

  const Section: ;

  const Ident: ;

  Default: TDateTime

):TDateTime; virtual;

Arguments

Section | Section to read Ident from
Ident | Name of key to retrieve value from
Default | Default value to return when the key Ident does not exist.

Function result

Value of Ident as a TDateTime

Description

ReadDateTime reads the key Ident in section Section, and returns the value as a date/time (TDateTime). If the specified key or section do not exist, then the value in Default is returned. If the key exists, but contains an invalid date/time value, Default is also returned. The international settings of the SysUtils are taken into account when deciding if the read value is a correct date/time.

See also

WriteDateTime | Write date/time value
ReadInteger | Read an integer value from the file
ReadBool |
ReadDate | Read a date value
ReadString | Read a string valued key
ReadTime | Read a time value
ReadFloat | Read a floating point value
ReadBinaryStream | Read binary data


TCustomIniFile.ReadFloat

Read a floating point value

Declaration

Source position: inifiles.pp line 139

public function TCustomIniFile.ReadFloat(

  const Section: ;

  const Ident: ;

  Default: Double

):Double; virtual;

Arguments

Section | Section to read Ident from
Ident | Name of key to retrieve value from
Default | Default value to return when the key Ident does not exist.

Function result

Value of Ident as a floating point value

Description

ReadFloat reads the key Ident in section Section, and returns the value as a float (Double). If the specified key or section do not exist, then the value in Default is returned. If the key exists, but contains an invalid float value, Default is also returned. The international settings of the SysUtils are taken into account when deciding if the read value is a correct float.

See also

WriteFloat | Write a floating-point value
ReadInteger | Read an integer value from the file
ReadBool |
ReadDate | Read a date value
ReadDateTime | Read a Date/Time value
ReadTime | Read a time value
ReadString | Read a string valued key
ReadBinaryStream | Read binary data


TCustomIniFile.ReadInteger

Read an integer value from the file

Declaration

Source position: inifiles.pp line 133

public function TCustomIniFile.ReadInteger(

  const Section: ;

  const Ident: ;

  Default: LongInt

):LongInt; virtual;

Arguments

Section | Section to read Ident from
Ident | Name of key to retrieve value from
Default | Default value to return when the key Ident does not exist.

Function result

Value of Ident as an integer.

Description

ReadInteger reads the key Ident in section Section, and returns the value as an integer. If the specified key or section do not exist, then the value in Default is returned. If the key exists, but contains an invalid integer value, Default is also returned.

See also

WriteInteger | Write an integer value
ReadString | Read a string valued key
ReadBool |
ReadDate | Read a date value
ReadDateTime | Read a Date/Time value
ReadTime | Read a time value
ReadFloat | Read a floating point value
ReadBinaryStream | Read binary data


TCustomIniFile.ReadSection

Read the key names in a section

Declaration

Source position: inifiles.pp line 147

public procedure TCustomIniFile.ReadSection(

  const Section: ;

  Strings: TStrings

); virtual; abstract;

Arguments

Section | Section for which to read key names
Strings | Stringlist to store key names in

Description

ReadSection will return the names of the keys in section Section in Strings, one string per key. If a non-existing section is specified, the list is cleared. To return the values of the keys as well, the ReadSectionValues method should be used.

See also

ReadSections | Read the list of sections
SectionExists | Check if a section exists.
ReadSectionValues | Read names and values of a section


TCustomIniFile.ReadSections

Read the list of sections

Declaration

Source position: inifiles.pp line 148

public procedure TCustomIniFile.ReadSections(

  Strings: TStrings

); virtual; abstract;

Arguments

Strings

Stringlist in which to return section names

Description

ReadSections returns the names of existing sections in Strings. It also returns names of empty sections.

See also

SectionExists | Check if a section exists.
ReadSectionValues | Read names and values of a section
ReadSection | Read the key names in a section


TCustomIniFile.ReadSectionValues

Read names and values of a section

Declaration

Source position: inifiles.pp line 149

public procedure TCustomIniFile.ReadSectionValues(

  const Section: ;

  Strings: TStrings

); virtual; abstract;

Arguments

Section | Section for which to read key names and values
Strings | Stringlist to store key/value pairs in

Description

ReadSectionValues returns the keys and their values in the section Section in Strings. They are returned as Key=Value strings, one per key, so the Values property of the stringlist can be used to read the values. To retrieve just the names of the available keys, ReadSection can be used.

See also

SectionExists | Check if a section exists.
ReadSections | Read the list of sections
ReadSection | Read the key names in a section


TCustomIniFile.ReadString

Read a string valued key

Declaration

Source position: inifiles.pp line 131

public function TCustomIniFile.ReadString(

  const Section: ;

  const Ident: ;

  const Default:

):; virtual; abstract;

Arguments

Section | Section to read Ident from
Ident | Name of key to retrieve value from
Default | Default value to return when the key Ident does not exist.

Function result

Value of Ident as a string.

Description

ReadString reads the key Ident in section Section, and returns the value as a string. If the specified key or section do not exist, then the value in Default is returned. Note that if the key exists, but is empty, an empty string will be returned.

See also

WriteString | Write a string value
ReadInteger | Read an integer value from the file
ReadBool |
ReadDate | Read a date value
ReadDateTime | Read a Date/Time value
ReadTime | Read a time value
ReadFloat | Read a floating point value
ReadBinaryStream | Read binary data


TCustomIniFile.ReadTime

Read a time value

Declaration

Source position: inifiles.pp line 140

public function TCustomIniFile.ReadTime(

  const Section: ;

  const Ident: ;

  Default: TDateTime

):TDateTime; virtual;

Arguments

Section | Section to read Ident from
Ident | Name of key to retrieve value from
Default | Default value to return when the key Ident does not exist.

Function result

Value of Ident as a TDateTime

Description

ReadTime reads the key Ident in section Section, and returns the value as a time (TDateTime). If the specified key or section do not exist, then the value in Default is returned. If the key exists, but contains an invalid time value, Default is also returned. The international settings of the SysUtils are taken into account when deciding if the read value is a correct time.

See also

WriteTime | Write time value
ReadInteger | Read an integer value from the file
ReadBool |
ReadDate | Read a date value
ReadDateTime | Read a Date/Time value
ReadString | Read a string valued key
ReadFloat | Read a floating point value
ReadBinaryStream | Read binary data


TCustomIniFile.SectionExists

Check if a section exists.

Declaration

Source position: inifiles.pp line 130

public function TCustomIniFile.SectionExists(

  const Section:

):Boolean; virtual;

Arguments

Section

Name of the section

Function result

True if a section named Section exists and is non-empty.

Description

SectionExists returns True if a section with name Section exists, and contains keys. (comments are not considered keys)

See also

TCustomIniFile.ValueExists

Check if a value exists


TCustomIniFile.StripQuotes

Should quotes be stripped from string values

Declaration

Source position: inifiles.pp line 157

public property TCustomIniFile.StripQuotes: Boolean
  read FStripQuotes
  write FStripQuotes;

Description

StripQuotes determines whether quotes around string values are stripped from the value when reading the values from file. By default, quotes are not stripped (this is Delphi and Windows compatible).


TCustomIniFile.UpdateFile

Update the file on disk

Declaration

Source position: inifiles.pp line 152

public procedure TCustomIniFile.UpdateFile; virtual; abstract;

Description

UpdateFile writes the in-memory image of the ini-file to disk. To speed up operation of the inifile class, the whole ini-file is read into memory when the class is created, and all operations are performed in-memory. If CacheUpdates is set to True, any changes to the inifile are only in memory, until they are committed to disk with a call to UpdateFile. If CacheUpdates is set to False, then all operations which cause a change in the .ini file will immediatly be committed to disk with a call to UpdateFile. Since the whole file is written to disk, this may have serious impact on performance.

See also

CacheUpdates

Should changes be kept in memory


TCustomIniFile.ValueExists

Check if a value exists

Declaration

Source position: inifiles.pp line 153

public function TCustomIniFile.ValueExists(

  const Section: ;

  const Ident:

):Boolean; virtual;

Arguments

Section | Section in which to look for Ident
Ident | Key name to look for.

Function result

True if Ident exists in section Section

Description

ValueExists checks whether the key Ident exists in section Section. It returns True if a key was found, or False if not. The key may be empty.

See also

SectionExists

Check if a section exists.


TCustomIniFile.WriteBinaryStream

Write binary data

Declaration

Source position: inifiles.pp line 146

public procedure TCustomIniFile.WriteBinaryStream(

  const Section: ;

  const Name: ;

  Value: TStream

); virtual;

Arguments

Section | Section to write key value to
Name | Key name with which to write value
Value | Binary data to write

Description

WriteBinaryStream writes the binary data in Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist.

The binary data is encoded using a 2-byte hexadecimal value per byte in the data stream. The data stream must be seekable, so it's size can be determined. The data stream is not repositioned, it must be at the correct position.

See also

ReadBinaryStream | Read binary data
WriteInteger | Write an integer value
WriteBool | Write boolean value
WriteDate | Write date value
WriteDateTime | Write date/time value
WriteTime | Write time value
WriteFloat | Write a floating-point value
WriteString | Write a string value


TCustomIniFile.WriteBool

Write boolean value

Declaration

Source position: inifiles.pp line 136

public procedure TCustomIniFile.WriteBool(

  const Section: ;

  const Ident: ;

  Value: Boolean

); virtual;

Arguments

Section | Section to write key value to
Ident | Key name with which to write value
Value | Boolean value to write

Description

WriteBool writes the boolean Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist.

See also

ReadBool |
WriteInteger | Write an integer value
WriteString | Write a string value
WriteDate | Write date value
WriteDateTime | Write date/time value
WriteTime | Write time value
WriteFloat | Write a floating-point value
WriteBinaryStream | Write binary data


TCustomIniFile.WriteDate

Write date value

Declaration

Source position: inifiles.pp line 142

public procedure TCustomIniFile.WriteDate(

  const Section: ;

  const Ident: ;

  Value: TDateTime

); virtual;

Arguments

Section | Section to write key value to
Ident | Key name with which to write value
Value | Date value to write

Description

WriteDate writes the date Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist. The date is written using the internationalization settings in the SysUtils unit.

See also

ReadDate | Read a date value
WriteInteger | Write an integer value
WriteBool | Write boolean value
WriteString | Write a string value
WriteDateTime | Write date/time value
WriteTime | Write time value
WriteFloat | Write a floating-point value
WriteBinaryStream | Write binary data


TCustomIniFile.WriteDateTime

Write date/time value

Declaration

Source position: inifiles.pp line 143

public procedure TCustomIniFile.WriteDateTime(

  const Section: ;

  const Ident: ;

  Value: TDateTime

); virtual;

Arguments

Section | Section to write key value to
Ident | Key name with which to write value
Value | Date/Time value to write

Description

WriteDateTime writes the date/time Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist. The date/time is written using the internationalization settings in the SysUtils unit.

See also

ReadDateTime | Read a Date/Time value
WriteInteger | Write an integer value
WriteBool | Write boolean value
WriteDate | Write date value
WriteString | Write a string value
WriteTime | Write time value
WriteFloat | Write a floating-point value
WriteBinaryStream | Write binary data


TCustomIniFile.WriteFloat

Write a floating-point value

Declaration

Source position: inifiles.pp line 144

public procedure TCustomIniFile.WriteFloat(

  const Section: ;

  const Ident: ;

  Value: Double

); virtual;

Arguments

Section | Section to write key value to
Ident | Key name with which to write value
Value | Float value to write

Description

WriteFloat writes the time Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist. The floating point value is written using the internationalization settings in the SysUtils unit.

See also

ReadFloat | Read a floating point value
WriteInteger | Write an integer value
WriteBool | Write boolean value
WriteDate | Write date value
WriteDateTime | Write date/time value
WriteTime | Write time value
WriteString | Write a string value
WriteBinaryStream | Write binary data


TCustomIniFile.WriteInteger

Write an integer value

Declaration

Source position: inifiles.pp line 134

public procedure TCustomIniFile.WriteInteger(

  const Section: ;

  const Ident: ;

  Value: LongInt

); virtual;

Arguments

Section | Section to write key value to
Ident | Key name with which to write value
Value | Integer value to write

Description

WriteInteger writes the integer Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist.

See also

ReadInteger | Read an integer value from the file
WriteString | Write a string value
WriteBool | Write boolean value
WriteDate | Write date value
WriteDateTime | Write date/time value
WriteTime | Write time value
WriteFloat | Write a floating-point value
WriteBinaryStream | Write binary data


TCustomIniFile.WriteString

Write a string value

Declaration

Source position: inifiles.pp line 132

public procedure TCustomIniFile.WriteString(

  const Section: ;

  const Ident: ;

  const Value:

); virtual; abstract;

Arguments

Section | Section to write key value to
Ident | Key name with which to write value
Value | String value to write

Description

WriteString writes the string Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist.

See also

ReadString | Read a string valued key
WriteInteger | Write an integer value
WriteBool | Write boolean value
WriteDate | Write date value
WriteDateTime | Write date/time value
WriteTime | Write time value
WriteFloat | Write a floating-point value
WriteBinaryStream | Write binary data


TCustomIniFile.WriteTime

Write time value

Declaration

Source position: inifiles.pp line 145

public procedure TCustomIniFile.WriteTime(

  const Section: ;

  const Ident: ;

  Value: TDateTime

); virtual;

Arguments

Section | Section to write key value to
Ident | Key name with which to write value
Value | Time value to write

Description

WriteTime writes the time Value with the name Ident to the section Section, overwriting any previous value that may exist there. The section will be created if it does not exist. The time is written using the internationalization settings in the SysUtils unit.

See also

ReadTime | Read a time value
WriteInteger | Write an integer value
WriteBool | Write boolean value
WriteDate | Write date value
WriteDateTime | Write date/time value
WriteString | Write a string value
WriteFloat | Write a floating-point value
WriteBinaryStream | Write binary data


THashedStringList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

String list with support for has values

Declaration

Source position: inifiles.pp line 61

type THashedStringList = class(TStringList)
public
constructor Create; | Instantiates a new instance of THashedStringList
destructor Destroy; override; | Clean up instance
function IndexOf(); override; | Returns the index of a string in the list of strings
function IndexOfName(); override; | Return the index of a name in the list of name=value pairs
end;

Inheritance

THashedStringList

String list with support for has values
|

TStringList
|

TStrings
|

TPersistent
|

TObject

Description

THashedStringList is a TStringList descendent which creates has values for the strings and names (in the case of a name-value pair) stored in it. The IndexOf and IndexOfName functions make use of these hash values to quicklier locate a value.

See also

IndexOf | Returns the index of a string in the list of strings
IndexOfName | Return the index of a name in the list of name=value pairs


THashedStringList
TStringList
 |  | Duplicates
 |  | Sorted
 |  | CaseSensitive
 |  | OwnsObjects
TStrings
 | ro | UpdateCount
 |  | TextLineBreakStyle
 |  | Delimiter
 |  | DelimitedText
 |  | StrictDelimiter
 |  | QuoteChar
 |  | NameValueSeparator
 |  | ValueFromIndex
 |  | Capacity
 |  | CommaText
 | ro | Count
 | ro | Names
 |  | Objects
 |  | Values
 |  | Strings
 |  | Text
 |  | StringsAdapter
TPersistent
TObject


ro | Count (TStrings)
 | DelimitedText (TStrings)
 | Delimiter (TStrings)
 | Duplicates (TStringList)
ro | Names (TStrings)
 | NameValueSeparator (TStrings)
 | Objects (TStrings)
 | OwnsObjects (TStringList)
 | QuoteChar (TStrings)
 | Sorted (TStringList)
 | StrictDelimiter (TStrings)
 | Strings (TStrings)
 | StringsAdapter (TStrings)
 | Text (TStrings)
 | TextLineBreakStyle (TStrings)
ro | UpdateCount (TStrings)


THashedStringList
 | Create
 | Destroy
 | IndexOf
 | IndexOfName
TStringList
 | ExchangeItems
 | Grow
 | InternalClear
 | QuickSort
 | SetSorted
 | SetCaseSensitive
 | Changed
 | Changing
 | Get
 | GetCapacity
 | GetCount
 | GetObject
 | Put
 | PutObject
 | SetCapacity
 | SetUpdateState
 | InsertItem
 | DoCompareText
 | Destroy
 | Add
 | Clear
 | Delete
 | Exchange
 | Find
 | IndexOf
 | Insert
 | Sort
 | CustomSort
TStrings
 | GetCommaText
 | GetName
 | GetValue
 | GetLBS
 | SetLBS
 | ReadData
 | SetCommaText
 | SetStringsAdapter
 | SetValue
 | SetDelimiter
 | SetQuoteChar
 | SetNameValueSeparator
 | WriteData
 | DefineProperties
 | Error
 | Get
 | GetCapacity
 | GetCount
 | GetObject
 | GetTextStr
 | Put
 | PutObject
 | SetCapacity
 | SetTextStr
 | SetUpdateState
 | DoCompareText
 | GetDelimitedText
 | SetDelimitedText
 | GetValueFromIndex
 | SetValueFromIndex
 | CheckSpecialChars
 | Destroy
 | Add
 | AddObject
 | Append
 | AddStrings
 | Assign
 | BeginUpdate
 | Clear
 | Delete
 | EndUpdate
 | Equals
 | Exchange
 | GetEnumerator
 | GetText
 | IndexOf
 | IndexOfName
 | IndexOfObject
 | Insert
 | InsertObject
 | LoadFromFile
 | LoadFromStream
 | Move
 | SaveToFile
 | SaveToStream
 | SetText
 | GetNameValue
 | ExtractName
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TStrings)

Add (TStringList)

AddObject (TStrings)

AddStrings (TStrings)

AfterConstruction (TObject)

Append (TStrings)

Assign (TPersistent)

Assign (TStrings)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TStrings)

Changed (TStringList)

Changing (TStringList)

CheckSpecialChars (TStrings)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TStrings)

Clear (TStringList)

Create (TObject)

Create (THashedStringList)

CustomSort (TStringList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TStrings)

Delete (TStrings)

Delete (TStringList)

Destroy (TObject)

Destroy (TStrings)

Destroy (TStringList)

Destroy (THashedStringList)

Dispatch (TObject)

DispatchStr (TObject)

DoCompareText (TStrings)

DoCompareText (TStringList)

EndUpdate (TStrings)

Equals (TObject)

Equals (TStrings)

Error (TStrings)

Exchange (TStrings)

Exchange (TStringList)

ExchangeItems (TStringList)

ExtractName (TStrings)

FieldAddress (TObject)

Find (TStringList)

Free (TObject)

FreeInstance (TObject)

Get (TStrings)

Get (TStringList)

GetCapacity (TStrings)

GetCapacity (TStringList)

GetCommaText (TStrings)

GetCount (TStrings)

GetCount (TStringList)

GetDelimitedText (TStrings)

GetEnumerator (TStrings)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetLBS (TStrings)

GetName (TStrings)

GetNamePath (TPersistent)

GetNameValue (TStrings)

GetObject (TStrings)

GetObject (TStringList)

GetOwner (TPersistent)

GetText (TStrings)

GetTextStr (TStrings)

GetValue (TStrings)

GetValueFromIndex (TStrings)

Grow (TStringList)

IndexOf (TStrings)

IndexOf (TStringList)

IndexOf (THashedStringList)

IndexOfName (TStrings)

IndexOfName (THashedStringList)

IndexOfObject (TStrings)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TStrings)

Insert (TStringList)

InsertItem (TStringList)

InsertObject (TStrings)

InstanceSize (TObject)

InternalClear (TStringList)

LoadFromFile (TStrings)

LoadFromStream (TStrings)

MethodAddress (TObject)

MethodName (TObject)

Move (TStrings)

newinstance (TObject)

Put (TStrings)

Put (TStringList)

PutObject (TStrings)

PutObject (TStringList)

QuickSort (TStringList)

ReadData (TStrings)

SafeCallException (TObject)

SaveToFile (TStrings)

SaveToStream (TStrings)

SetCapacity (TStrings)

SetCapacity (TStringList)

SetCaseSensitive (TStringList)

SetCommaText (TStrings)

SetDelimitedText (TStrings)

SetDelimiter (TStrings)

SetLBS (TStrings)

SetNameValueSeparator (TStrings)

SetQuoteChar (TStrings)

SetSorted (TStringList)

SetStringsAdapter (TStrings)

SetText (TStrings)

SetTextStr (TStrings)

SetUpdateState (TStrings)

SetUpdateState (TStringList)

SetValue (TStrings)

SetValueFromIndex (TStrings)

Sort (TStringList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

WriteData (TStrings)


THashedStringList
TStringList
 | OnChange
 | OnChanging
TStrings
TPersistent
TObject


OnChange (TStringList)

OnChanging (TStringList)


THashedStringList.Create

Instantiates a new instance of THashedStringList

Declaration

Source position: inifiles.pp line 72

public constructor THashedStringList.Create;

Description

Create calls the inherited Create, and then instantiates the hash tables.

Errors

If no enough memory is available, an exception may be raised.

See also

THashedStringList.Destroy

Clean up instance


THashedStringList.Destroy

Clean up instance

Declaration

Source position: inifiles.pp line 73

public destructor THashedStringList.Destroy; override;

Description

Destroy cleans up the hash tables and then calls the inherited Destroy.

See also

THashedStringList.Create

Instantiates a new instance of THashedStringList


THashedStringList.IndexOf

Returns the index of a string in the list of strings

Declaration

Source position: inifiles.pp line 74

public function THashedStringList.IndexOf(

  const S:

):Integer; override;

Arguments

S

String to locate in the list

Function result

Index of S or -1 if S is not in the list.

Description

IndexOf overrides the #rtl.classes.TStringList.IndexOf method and uses the hash values to look for the location of S.

See also

#rtl.classes.TStringList.IndexOf

THashedStringList.IndexOfName

Return the index of a name in the list of name=value pairs


THashedStringList.IndexOfName

Return the index of a name in the list of name=value pairs

Declaration

Source position: inifiles.pp line 75

public function THashedStringList.IndexOfName(

  const Name:

):Integer; override;

Arguments

Name

Name to look for

Function result

Index of name Name or -1 if no name=value pair exists with Name.

Description

IndexOfName overrides the #rtl.classes.TStrings.IndexOfName method and uses the hash values of the names to look for the location of Name.

See also

#rtl.classes.TStrings.IndexOfName

THashedStringList.IndexOf

Returns the index of a string in the list of strings


TIniFile

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ini file implementation

Declaration

Source position: inifiles.pp line 162

type TIniFile = class(TCustomIniFile)
procedure Create(); | Create a new instance of TIniFile
public
destructor Destroy; override; | Remove the TIniFile instance from memory
function ReadString(); override; | Read a string
procedure WriteString(); override; | Write string to file
procedure ReadSection(); override; | Read the key names in a section
procedure ReadSectionRaw(); | Read raw section
procedure ReadSections(); override; | Read section names
procedure ReadSectionValues(); override; |
procedure EraseSection(); override; |
procedure DeleteKey(); override; | Delete key
procedure UpdateFile; override; | Update the file on disk
property Stream: TStream; [r] | Stream from which ini file was read
property CacheUpdates: Boolean; [rw] | Should changes be kept in memory
end;

Inheritance

TIniFile | Ini file implementation
|
TCustomIniFile | Abstract ini file object
|
TObject

Description

TIniFile is an implementation of TCustomIniFile which does the same as TMemIniFile, namely it reads the whole file into memory. Unlike TMemIniFile it does not cache updates in memory, but immediatly writes any changes to disk.

TIniFile introduces no new methods, it just implements the abstract methods introduced in TCustomIniFile

See also

TCustomIniFile | Abstract ini file object
TMemIniFile | Inifile cached in memory


TIniFile
 | ro | Stream
 |  | CacheUpdates
TCustomIniFile
 | ro | FileName
 | ro | EscapeLineFeeds
 |  | CaseSensitive
 |  | StripQuotes


ro | EscapeLineFeeds (TCustomIniFile)
ro | FileName (TCustomIniFile)
ro |


TIniFile
 | Create
 | Destroy
 | ReadString
 | WriteString
 | ReadSection
 | ReadSectionRaw
 | ReadSections
 | ReadSectionValues
 | EraseSection
 | DeleteKey
 | UpdateFile
TCustomIniFile
 | Create
 | Destroy
 | SectionExists
 | ReadString
 | WriteString
 | ReadInteger
 | WriteInteger
 | ReadBool
 | WriteBool
 | ReadDate
 | ReadDateTime
 | ReadFloat
 | ReadTime
 | ReadBinaryStream
 | WriteDate
 | WriteDateTime
 | WriteFloat
 | WriteTime
 | WriteBinaryStream
 | ReadSection
 | ReadSections
 | ReadSectionValues
 | EraseSection
 | DeleteKey
 | UpdateFile
 | ValueExists


Create (TCustomIniFile)

Create (TIniFile)

DeleteKey (TCustomIniFile)

DeleteKey (TIniFile)

Destroy (TCustomIniFile)

Destroy (TIniFile)

EraseSection (TCustomIniFile)

EraseSection (TIniFile)

ReadBinaryStream (TCustomIniFile)

ReadBool (TCustomIniFile)

ReadDate (TCustomIniFile)

ReadDateTime (TCustomIniFile)

ReadFloat (TCustomIniFile)

ReadInteger (TCustomIniFile)

ReadSection (TCustomIniFile)

ReadSection (TIniFile)

ReadSectionRaw (TIniFile)

ReadSections (TCustomIniFile)

ReadSections (TIniFile)

ReadSectionValues (TCustomIniFile)

ReadSectionValues (TIniFile)

ReadString (TCustomIniFile)

ReadString (TIniFile)

ReadTime (TCustomIniFile)

SectionExists (TCustomIniFile)

UpdateFile (TCustomIniFile)

UpdateFile (TIniFile)

ValueExists (TCustomIniFile)

WriteBinaryStream (TCustomIniFile)

WriteBool (TCustomIniFile)

WriteDate (TCustomIniFile)

WriteDateTime (TCustomIniFile)

WriteFloat (TCustomIniFile)

WriteInteger (TCustomIniFile)

WriteString (TCustomIniFile)

WriteString (TIniFile)

WriteTime (TCustomIniFile)


TIniFile

TCustomIniFile


TIniFile.CacheUpdates

Should changes be kept in memory

Declaration

Source position: inifiles.pp line 188

public property TIniFile.CacheUpdates: Boolean
  read FCacheUpdates
  write SetCacheUpdates;

Description

CacheUpdates determines how to deal with changes to the ini-file data: if set to True then changes are kept in memory till the file is written to disk with a call to UpdateFile. If it is set to False then each call that changes the data of the ini-file will result in a call to UpdateFile. This is the default behaviour, but it may aversely affect performance.

See also

UpdateFile

Update the file on disk


TIniFile.Create

Create a new instance of TIniFile

Declaration

Source position: line 0

constructor TIniFile.Create(

  const AFileName: ;

  AEscapeLineFeeds: Boolean = False

); override;

constructor TIniFile.Create(

  AStream: TStream;

  AEscapeLineFeeds: Boolean = False

);

Arguments

AFileName | Filename to read from
AEscapeLineFeeds | Should escaping of linefeeds be enabled ?

Arguments

AStream | Stream to read ini data from
AEscapeLineFeeds | Should escaping of linefeeds be enabled ?

Description

Create creates a new instance of TIniFile and initializes the class by reading the file from disk if the filename AFileName is specified, or from stream in case AStream is specified. It also sets most variables to their initial values, i.e. AEscapeLineFeeds is saved prior to reading the file, and Cacheupdates is set to False.

See also

TCustomIniFile | Abstract ini file object
TMemIniFile | Inifile cached in memory


TIniFile.DeleteKey

Delete key

Declaration

Source position: inifiles.pp line 185

public procedure TIniFile.DeleteKey(

  const Section: ;

  const Ident:

); override;

Arguments

Section | Section in which to delete key
Ident | Name of key to delete

Description

DeleteKey deletes the Ident from the section Section. This operation is performed on the in-memory copy of the ini file. if CacheUpdates is False, then the file is immediatly updated on disk.

See also

CacheUpdates

Should changes be kept in memory


TIniFile.Destroy

Remove the TIniFile instance from memory

Declaration

Source position: inifiles.pp line 177

public destructor TIniFile.Destroy; override;

Description

Destroy writes any pending changes to disk, and cleans up the TIniFile structures, and then calls the inherited Destroy, effectively removing the instance from memory.

Errors

If an error happens when the file is written to disk, an exception will be raised.

See also

UpdateFile | Update the file on disk
CacheUpdates | Should changes be kept in memory


TIniFile.EraseSection

Declaration

Source position: inifiles.pp line 184

public procedure TIniFile.EraseSection(

  const Section:

); override;

Arguments

Section

Section to erase

Description

Erasesection deletes the section Section from memory, if CacheUpdates is False, then the file is immediatly updated on disk. This method is the implementation of the abstract TCustomIniFile.EraseSection method.

See also

TCustomIniFile.EraseSection | Clear a section
TIniFile.ReadSection | Read the key names in a section
TIniFile.ReadSections | Read section names


TIniFile.ReadSection

Read the key names in a section

Declaration

Source position: inifiles.pp line 180

public procedure TIniFile.ReadSection(

  const Section: ;

  Strings: TStrings

); override;

Arguments

Section | Section to read names from
Strings | Stringlist to store names in

Description

ReadSection reads the key names from Section into Strings, taking the in-memory copy of the ini file. This is the implementation for the abstract TCustomIniFile.ReadSection

See also

TCustomIniFile.ReadSection | Read the key names in a section
TIniFile.ReadSectionRaw | Read raw section


TIniFile.ReadSectionRaw

Read raw section

Declaration

Source position: inifiles.pp line 181

public procedure TIniFile.ReadSectionRaw(

  const Section: ;

  Strings: TStrings

);

Arguments

Section | Section name to read
Strings | Strings to store section contents in

Description

ReadSectionRaw returns the contents of the section Section as it is: this includes the comments in the section. (these are also stored in memory)

See also

TIniFile.ReadSection | Read the key names in a section
TCustomIniFile.ReadSection | Read the key names in a section


TIniFile.ReadSections

Read section names

Declaration

Source position: inifiles.pp line 182

public procedure TIniFile.ReadSections(

  Strings: TStrings

); override;

Arguments

Strings

Stringlist to store section names in

Description

ReadSections is the implementation of TCustomIniFile.ReadSections. It operates on the in-memory copy of the inifile, and places all section names in Strings.

See also

TIniFile.ReadSection | Read the key names in a section
TCustomIniFile.ReadSections | Read the list of sections
TIniFile.ReadSectionValues |


TIniFile.ReadSectionValues

Declaration

Source position: inifiles.pp line 183

public procedure TIniFile.ReadSectionValues(

  const Section: ;

  Strings: TStrings

); override;

Arguments

Section | Section to read key name/values from
Strings | Stringlist to store key/value pairs in.

Description

ReadSectionValues is the implementation of TCustomIniFile.ReadSectionValues. It operates on the in-memory copy of the inifile, and places all key names from Section together with their values in Strings.

See also

TIniFile.ReadSection | Read the key names in a section
TCustomIniFile.ReadSectionValues | Read names and values of a section
TIniFile.ReadSections | Read section names


TIniFile.ReadString

Read a string

Declaration

Source position: inifiles.pp line 178

public function TIniFile.ReadString(

  const Section: ;

  const Ident: ;

  const Default:

):; override;

Arguments

Section | Section to search key value in
Ident | Key name
Default | Default value if none is found.

Function result

Value of the string or Default if none found.

Description

ReadString implements the TCustomIniFile.ReadString abstract method by looking at the in-memory copy of the ini file and returning the string found there.

See also

TCustomIniFile.ReadString

Read a string valued key


TIniFile.Stream

Stream from which ini file was read

Declaration

Source position: inifiles.pp line 187

public property TIniFile.Stream: TStream
  read FStream;

Description

Stream is the stream which was used to create the IniFile. The UpdateFile method will use this stream to write changes to.

See also

Create | Create a new instance of TIniFile
UpdateFile | Update the file on disk


TIniFile.UpdateFile

Update the file on disk

Declaration

Source position: inifiles.pp line 186

public procedure TIniFile.UpdateFile; override;

Description

UpdateFile writes the in-memory data for the ini file to disk. The whole file is written. If the ini file was instantiated from a stream, then the stream is updated. Note that the stream must be seekable for this to work correctly. The ini file is marked as 'clean' after a call to UpdateFile (i.e. not in need of writing to disk).

Errors

If an error occurs when writing to stream or disk, an exception may be raised.

See also

CacheUpdates

Should changes be kept in memory


TIniFile.WriteString

Write string to file

Declaration

Source position: inifiles.pp line 179

public procedure TIniFile.WriteString(

  const Section: ;

  const Ident: ;

  const Value:

); override;

Arguments

Section | Section to write key value in
Ident | Key name to use
Value | String value to write

Description

WriteString implements the TCustomIniFile.WriteString abstract method by writing the string to the in-memory copy of the ini file. If CacheUpdates property is False, then the whole file is immediatly written to disk as well.

Errors

If an error happens when the file is written to disk, an exception will be raised.


TIniFileKey

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Object representing a key=value pair in the ini file.

Declaration

Source position: inifiles.pp line 78

type TIniFileKey = class
public
constructor Create(); | Create a new instance of TIniFileKey
property Ident: ; [rw] | Key name
property Value: ; [rw] | Key value
end;

Inheritance

TIniFileKey

Object representing a key=value pair in the ini file.
|

TObject

Description

TIniFileKey is used to keep the key/value pairs in the ini file in memory. It is an internal structure, used internally by the TIniFile class.

See also

TIniFile

Ini file implementation


TIniFileKey
 | Ident
 | Value


Ident (TIniFileKey)

Value (TIniFileKey)


TIniFileKey

Create


Create (TIniFileKey)


TIniFileKey


TIniFileKey.Create

Create a new instance of TIniFileKey

Declaration

Source position: inifiles.pp line 83

public constructor TIniFileKey.Create(

  const AIdent: ;

  const AValue:

);

Arguments

AIdent | Key name
AValue | Key value

Description

Create instantiates a new instance of TIniFileKey on the heap. It fills Ident with AIdent and Value with AValue.

See also

Ident | Key name
Value | Key value


TIniFileKey.Ident

Key name

Declaration

Source position: inifiles.pp line 84

public property TIniFileKey.Ident:
  read FIdent
  write FIdent;

Description

Ident is the key value part of the key/value pair.

See also

Value

Key value


TIniFileKey.Value

Key value

Declaration

Source position: inifiles.pp line 85

public property TIniFileKey.Value:
  read FValue
  write FValue;

Description

Value is the value part of the key/value pair.

See also

Ident

Key name


TIniFileKeyList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Key list object

Declaration

Source position: inifiles.pp line 88

type TIniFileKeyList = class(TList)
public
destructor Destroy; override; | Free the instance
procedure Clear; override; | Clear the list
property Items: TIniFileKey; default; [r] | Indexed access to TIniFileKey items in the list
end;

Inheritance

TIniFileKeyList

Key list object
|

TList
|

TObject

Description

TIniFileKeyList maintains a list of TIniFileKey instances on behalf of the TIniFileSection class. It stores they keys of one section of the .ini files.

See also

TIniFileKey | Object representing a key=value pair in the ini file.
TIniFileSection | Ini file section object


TIniFileKeyList
 | ro | Items
TList
 |  | Capacity
 |  | Count
 |  | Items
 | ro | List
TObject


ro | Items (TIniFileKeyList)
ro |


TIniFileKeyList
 | Destroy
 | Clear
TList
 | CopyMove
 | MergeMove
 | DoCopy
 | DoSrcUnique
 | DoAnd
 | DoDestUnique
 | DoOr
 | DoXOr
 | Get
 | Grow
 | Put
 | Notify
 | SetCapacity
 | GetCapacity
 | SetCount
 | GetCount
 | GetList
 | Create
 | Destroy
 | AddList
 | Add
 | Clear
 | Delete
 | Error
 | Exchange
 | Expand
 | Extract
 | First
 | GetEnumerator
 | IndexOf
 | Insert
 | Last
 | Move
 | Assign
 | Remove
 | Pack
 | Sort
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TList)

AddList (TList)

AfterConstruction (TObject)

Assign (TList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TList)

Clear (TIniFileKeyList)

CopyMove (TList)

Create (TObject)

Create (TList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TList)

Destroy (TObject)

Destroy (TList)

Destroy (TIniFileKeyList)

Dispatch (TObject)

DispatchStr (TObject)

DoAnd (TList)

DoCopy (TList)

DoDestUnique (TList)

DoOr (TList)

DoSrcUnique (TList)

DoXOr (TList)

Equals (TObject)

Error (TList)

Exchange (TList)

Expand (TList)

Extract (TList)

FieldAddress (TObject)

First (TList)

Free (TObject)

FreeInstance (TObject)

Get (TList)

GetCapacity (TList)

GetCount (TList)

GetEnumerator (TList)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetList (TList)

Grow (TList)

IndexOf (TList)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TList)

InstanceSize (TObject)

Last (TList)

MergeMove (TList)

MethodAddress (TObject)

MethodName (TObject)

Move (TList)

newinstance (TObject)

Notify (TList)

Pack (TList)

Put (TList)

Remove (TList)

SafeCallException (TObject)

SetCapacity (TList)

SetCount (TList)

Sort (TList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TIniFileKeyList

TList

TObject


TIniFileKeyList.Clear

Clear the list

Declaration

Source position: inifiles.pp line 94

public procedure TIniFileKeyList.Clear; override;

Description

Clear removes all TIniFileKey instances from the list, and frees the instances.

See also

TIniFileKey

Object representing a key=value pair in the ini file.


TIniFileKeyList.Destroy

Free the instance

Declaration

Source position: inifiles.pp line 93

public destructor TIniFileKeyList.Destroy; override;

Description

Destroy clears up the list using Clear and then calls the inherited destroy.

See also

Clear

Clear the list


TIniFileKeyList.Items

Indexed access to TIniFileKey items in the list

Declaration

Source position: inifiles.pp line 95

public property TIniFileKeyList.Items: TIniFileKey
  read GetItem;
  default;

Description

Items provides indexed access to the TIniFileKey items in the list. The index is zero-based and runs from 0 to Count-1.

See also

TIniFileKey

Object representing a key=value pair in the ini file.


TIniFileSection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ini file section object

Declaration

Source position: inifiles.pp line 98

type TIniFileSection = class
public
function Empty; | Is the section empty
constructor Create(); | Create a new section object
destructor Destroy; override; | Free the section object from memory
property Name: ; [r] | Name of the section
property KeyList: TIniFileKeyList; [r] | List of key/value pairs in this section
end;

Inheritance

TIniFileSection

Ini file section object
|

TObject

Description

TIniFileSection is a class which represents a section in the .ini, and is used internally by the TIniFile class (one instance of TIniFileSection is created for each section in the file by the TIniFileSectionList list). The name of the section is stored in the Name property, and the key/value pairs in this section are available in the KeyList property.

See also

TIniFileKeyList | Key list object
TIniFile | Ini file implementation
TIniFileSectionList | Section objects list


TIniFileSection
 | ro | Name
 | ro | KeyList


ro | KeyList (TIniFileSection)
ro |


TIniFileSection
 | Empty
 | Create
 | Destroy


Create (TIniFileSection)

Destroy (TIniFileSection)

Empty (TIniFileSection)


TIniFileSection


TIniFileSection.Create

Create a new section object

Declaration

Source position: inifiles.pp line 104

public constructor TIniFileSection.Create(

  const AName:

);

Arguments

AName

Name for the section

Description

Create instantiates a new TIniFileSection class, and sets the name to AName. It allocates a TIniFileKeyList instance to keep all the key/value pairs for this section.

See also

TIniFileKeyList

Key list object


TIniFileSection.Destroy

Free the section object from memory

Declaration

Source position: inifiles.pp line 105

public destructor TIniFileSection.Destroy; override;

Description

Destroy cleans up the key list, and then calls the inherited Destroy, removing the TIniFileSection instance from memory.

See also

Create | Create a new section object
TIniFileKeyList | Key list object


TIniFileSection.Empty

Is the section empty

Declaration

Source position: inifiles.pp line 103

public function TIniFileSection.Empty: Boolean;

Function result

True if the section is empty

Description

Empty returns True if the section contains no key values (even if they are empty). It may contain comments.


TIniFileSection.KeyList

List of key/value pairs in this section

Declaration

Source position: inifiles.pp line 107

public property TIniFileSection.KeyList: TIniFileKeyList
  read FKeyList;

Description

KeyList is the TIniFileKeyList instance that is used by the TIniFileSection to keep the key/value pairs of the section.

See also

TIniFileSection.Name | Name of the section
TIniFileKeyList | Key list object


TIniFileSection.Name

Name of the section

Declaration

Source position: inifiles.pp line 106

public property TIniFileSection.Name:
  read FName;

Description

Name is the name of the section in the file.

See also

TIniFileSection.KeyList

List of key/value pairs in this section


TIniFileSectionList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Section objects list

Declaration

Source position: inifiles.pp line 110

type TIniFileSectionList = class(TList)
public
destructor Destroy; override; | Free the object from memory
procedure Clear; override; | Clear the list
property Items: TIniFileSection; default; [r] | Indexed access to all the section objects in the list
end;

Inheritance

TIniFileSectionList

Section objects list
|

TList
|

TObject

Description

TIniFileSectionList maintains a list of TIniFileSection instances, one for each section in an .ini file. TIniFileSectionList is used internally by the TIniFile class to represent the sections in the file.

See also

TIniFileSection | Ini file section object
TIniFile | Ini file implementation


TIniFileSectionList
 | ro | Items
TList
 |  | Capacity
 |  | Count
 |  | Items
 | ro | List
TObject


ro | Items (TIniFileSectionList)
ro |


TIniFileSectionList
 | Destroy
 | Clear
TList
 | CopyMove
 | MergeMove
 | DoCopy
 | DoSrcUnique
 | DoAnd
 | DoDestUnique
 | DoOr
 | DoXOr
 | Get
 | Grow
 | Put
 | Notify
 | SetCapacity
 | GetCapacity
 | SetCount
 | GetCount
 | GetList
 | Create
 | Destroy
 | AddList
 | Add
 | Clear
 | Delete
 | Error
 | Exchange
 | Expand
 | Extract
 | First
 | GetEnumerator
 | IndexOf
 | Insert
 | Last
 | Move
 | Assign
 | Remove
 | Pack
 | Sort
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TList)

AddList (TList)

AfterConstruction (TObject)

Assign (TList)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TList)

Clear (TIniFileSectionList)

CopyMove (TList)

Create (TObject)

Create (TList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TList)

Destroy (TObject)

Destroy (TList)

Destroy (TIniFileSectionList)

Dispatch (TObject)

DispatchStr (TObject)

DoAnd (TList)

DoCopy (TList)

DoDestUnique (TList)

DoOr (TList)

DoSrcUnique (TList)

DoXOr (TList)

Equals (TObject)

Error (TList)

Exchange (TList)

Expand (TList)

Extract (TList)

FieldAddress (TObject)

First (TList)

Free (TObject)

FreeInstance (TObject)

Get (TList)

GetCapacity (TList)

GetCount (TList)

GetEnumerator (TList)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetList (TList)

Grow (TList)

IndexOf (TList)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TList)

InstanceSize (TObject)

Last (TList)

MergeMove (TList)

MethodAddress (TObject)

MethodName (TObject)

Move (TList)

newinstance (TObject)

Notify (TList)

Pack (TList)

Put (TList)

Remove (TList)

SafeCallException (TObject)

SetCapacity (TList)

SetCount (TList)

Sort (TList)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TIniFileSectionList

TList

TObject


TIniFileSectionList.Clear

Clear the list

Declaration

Source position: inifiles.pp line 116

public procedure TIniFileSectionList.Clear; override;

Description

Clear removes all TIniFileSection items from the list, and frees the items it removes from the list.

See also

TIniFileSection | Ini file section object
TIniFileSectionList.Items | Indexed access to all the section objects in the list


TIniFileSectionList.Destroy

Free the object from memory

Declaration

Source position: inifiles.pp line 115

public destructor TIniFileSectionList.Destroy; override;

Description

Destroy calls Clear to clear the section list and the calls the inherited Destroy

See also

Clear

Clear the list


TIniFileSectionList.Items

Indexed access to all the section objects in the list

Declaration

Source position: inifiles.pp line 117

public property TIniFileSectionList.Items: TIniFileSection
  read GetItem;
  default;

Description

Items provides indexed access to all the section objects in the list. Index should run from 0 to Count-1.

See also

TIniFileSection | Ini file section object
TIniFileSectionList.Clear | Clear the list


TMemIniFile

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Inifile cached in memory

Declaration

Source position: inifiles.pp line 191

type TMemIniFile = class(TIniFile)
public
constructor Create(); override; | Create a new instance of TMemIniFile
procedure Clear; | Clear the data
procedure GetStrings(); | Get contents of ini file as stringlist
procedure Rename(); | Rename the ini file
procedure SetStrings(); | Set data from a stringlist
end;

Inheritance

TMemIniFile | Inifile cached in memory
|
TIniFile | Ini file implementation
|
TCustomIniFile | Abstract ini file object
|
TObject

Description

TMemIniFile is a simple descendent of TIniFile which introduces some extra methods to be compatible to the Delphi implementation of TMemIniFile. The FPC implementation of TIniFile is implemented as a TMemIniFile, except that TIniFile does not cache its updates, and TMemIniFile does.

See also

TIniFile | Ini file implementation
TCustomIniFile | Abstract ini file object
CacheUpdates | Should changes be kept in memory


TMemIniFile
TIniFile
 | ro | Stream
 |  | CacheUpdates
TCustomIniFile
 | ro | FileName
 | ro | EscapeLineFeeds
 |  | CaseSensitive
 |  | StripQuotes


TMemIniFile
 | Create
 | Clear
 | GetStrings
 | Rename
 | SetStrings
TIniFile
 | Create
 | Destroy
 | ReadString
 | WriteString
 | ReadSection
 | ReadSectionRaw
 | ReadSections
 | ReadSectionValues
 | EraseSection
 | DeleteKey
 | UpdateFile
TCustomIniFile
 | Create
 | Destroy
 | SectionExists
 | ReadString
 | WriteString
 | ReadInteger
 | WriteInteger
 | ReadBool
 | WriteBool
 | ReadDate
 | ReadDateTime
 | ReadFloat
 | ReadTime
 | ReadBinaryStream
 | WriteDate
 | WriteDateTime
 | WriteFloat
 | WriteTime
 | WriteBinaryStream
 | ReadSection
 | ReadSections
 | ReadSectionValues
 | EraseSection
 | DeleteKey
 | UpdateFile
 | ValueExists


Clear (TMemIniFile)

Create (TCustomIniFile)

Create (TIniFile)

Create (TMemIniFile)

DeleteKey (TCustomIniFile)

DeleteKey (TIniFile)

Destroy (TCustomIniFile)

Destroy (TIniFile)

EraseSection (TCustomIniFile)

EraseSection (TIniFile)

GetStrings (TMemIniFile)

ReadBinaryStream (TCustomIniFile)

ReadBool (TCustomIniFile)

ReadDate (TCustomIniFile)

ReadDateTime (TCustomIniFile)

ReadFloat (TCustomIniFile)

ReadInteger (TCustomIniFile)

ReadSection (TCustomIniFile)

ReadSection (TIniFile)

ReadSectionRaw (TIniFile)

ReadSections (TCustomIniFile)

ReadSections (TIniFile)

ReadSectionValues (TCustomIniFile)

ReadSectionValues (TIniFile)

ReadString (TCustomIniFile)

ReadString (TIniFile)

ReadTime (TCustomIniFile)

Rename (TMemIniFile)

SectionExists (TCustomIniFile)

SetStrings (TMemIniFile)

UpdateFile (TCustomIniFile)

UpdateFile (TIniFile)

ValueExists (TCustomIniFile)

WriteBinaryStream (TCustomIniFile)

WriteBool (TCustomIniFile)

WriteDate (TCustomIniFile)

WriteDateTime (TCustomIniFile)

WriteFloat (TCustomIniFile)

WriteInteger (TCustomIniFile)

WriteString (TCustomIniFile)

WriteString (TIniFile)

WriteTime (TCustomIniFile)


TMemIniFile

TIniFile

TCustomIniFile


TMemIniFile.Clear

Clear the data

Declaration

Source position: inifiles.pp line 194

public procedure TMemIniFile.Clear;

Description

Clear removes all sections and key/value pairs from memory. If CacheUpdates is set to False then the file on disk will immediatly be emptied.

See also

SetStrings | Set data from a stringlist
GetStrings | Get contents of ini file as stringlist


TMemIniFile.Create

Create a new instance of TMemIniFile

Declaration

Source position: inifiles.pp line 193

public constructor TMemIniFile.Create(

  const AFileName: ;

  AEscapeLineFeeds: Boolean = False

); override;

Arguments

AFileName | Name of file to read data from
AEscapeLineFeeds | Should linefeed escaping be turned on

Description

Create simply calls the inherited Create, and sets the CacheUpdates to True so updates will be kept in memory till they are explicitly written to disk.

See also

TIniFile.Create | Create a new instance of TIniFile
CacheUpdates | Should changes be kept in memory


TMemIniFile.GetStrings

Get contents of ini file as stringlist

Declaration

Source position: inifiles.pp line 195

public procedure TMemIniFile.GetStrings(

  List: TStrings

);

Arguments

List

Stringlist in which to copy the data

Description

GetStrings returns the whole contents of the ini file in a single stringlist, List. This includes comments and empty sections.

The GetStrings call can be used to get data for a call to SetStrings, which can be used to copy data between 2 in-memory ini files.

See also

SetStrings | Set data from a stringlist
Clear | Clear the data


TMemIniFile.Rename

Rename the ini file

Declaration

Source position: inifiles.pp line 196

public procedure TMemIniFile.Rename(

  const AFileName: ;

  Reload: Boolean

);

Arguments

AFileName | New filename
Reload | Load memory data from new file ?

Description

Rename will rename the ini file with the new name AFileName. If Reload is True then the in-memory contents will be cleared and replaced with the contents found in AFileName, if it exists. If Reload is False, the next call to UpdateFile will replace the contents of AFileName with the in-memory data.

See also

UpdateFile

Update the file on disk


TMemIniFile.SetStrings

Set data from a stringlist

Declaration

Source position: inifiles.pp line 197

public procedure TMemIniFile.SetStrings(

  List: TStrings

);

Arguments

List

Stringlist to get data from

Description

SetStrings sets the in-memory data from the List stringlist. The data is first cleared.

The SetStrings call can be used to set the data of the ini file to a list of strings obtained with GetStrings. The two calls combined can be used to copy data between 2 in-memory ini files.

See also

GetStrings | Get contents of ini file as stringlist
Clear | Clear the data


EIOStreamError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Error thrown in case of an invalid operation on a TIOStream.

Declaration

Source position: iostream.pp line 23

type EIOStreamError = class(EStreamError) ;

Inheritance

EIOStreamError

Error thrown in case of an invalid operation on a TIOStream.
|

EStreamError
|

Exception
|

TObject


EIOStreamError
EStreamError
Exception
 | HelpContext
 | Message
TObject


EIOStreamError
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EIOStreamError

EStreamError

Exception

TObject


TIOStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Stream which handles standard input/output and stderr.

Declaration

Source position: iostream.pp line 27

type TIOStream = class(THandleStream)
public
constructor Create(); | Construct a new instance of TIOStream
function Read(); override; | Read data from the stream.
function Write(); override; | Write data to the stream
function Seek(); override; | Set the stream position
end;

Inheritance

TIOStream

Stream which handles standard input/output and stderr.
|

THandleStream
|

TStream
|

TObject

Description

TIOStream can be used to create a stream which reads from or writes to the standard input, output or stderr file descriptors. It is a descendent of THandleStream. The type of stream that is created is determined by the TIOSType argument to the constructor. The handle of the standard input, output or stderr file descriptors is determined automatically.

The TIOStream keeps an internal Position, and attempts to provide minimal Seek behaviour based on this position.

See also

TIOSType

Type of stream to create

THandleStream


TIOStream
THandleStream
 | ro | Handle
TStream
 |  | Position
 |  | Size
TObject


TIOStream
 | Create
 | Read
 | Write
 | Seek
THandleStream
 | SetSize
 | Create
 | Read
 | Write
 | Seek
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (THandleStream)

Create (TIOStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

Read (THandleStream)

Read (TIOStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (THandleStream)

Seek (TIOStream)

SetPosition (TStream)

SetSize (TStream)

SetSize (THandleStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (THandleStream)

Write (TIOStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TIOStream

THandleStream

TStream

TObject


TIOStream.Create

Construct a new instance of TIOStream

Declaration

Source position: iostream.pp line 37

public constructor TIOStream.Create(

  aIOSType: TIOSType

);

Arguments

aIOSType

Type of stream to create

Description

Create creates a new instance of TIOStream, which can subsequently be used

Errors

No checking is performed to see whether the requested file descriptor is actually open for reading/writing. In that case, subsequent calls to Read or Write or seek will fail.

See also

TIOStream.Read | Read data from the stream.
TIOStream.Write | Write data to the stream


TIOStream.Read

Read data from the stream.

Declaration

Source position: iostream.pp line 38

public function TIOStream.Read(

  var Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Memory buffer for the read data
Count | Number of bytes to read

Function result

The number of bytes actually read

Description

Read checks first whether the type of the stream allows reading (type is iosInput). If not, it raises a EIOStreamError exception. If the stream can be read, it calls the inherited Read to actually read the data.

Errors

An EIOStreamError exception is raised if the stream does not allow reading.

See also

TIOSType | Type of stream to create
TIOStream.Write | Write data to the stream


TIOStream.Seek

Set the stream position

Declaration

Source position: iostream.pp line 40

public function TIOStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Byte offset to position the stream on
Origin | Where to start the byte offset

Function result

New position of the stream.

Description

Seek overrides the standard Seek implementation. Normally, standard input, output and stderr are not seekable. The TIOStream stream tries to provide seek capabilities for the following limited number of cases:

Origin=soFromBeginning
If Offset is larger than the current position, then the remaining bytes are skipped by reading them from the stream and discarding them, if the stream is of type iosInput.
Origin=soFromCurrent
If Offset is zero, the current position is returned. If it is positive, then Offset bytes are skipped by reading them from the stream and discarding them, if the stream is of type iosInput.

All other cases will result in a EIOStreamError exception.

Errors

An EIOStreamError exception is raised if the stream does not allow the requested seek operation.

See also

EIOStreamError

Error thrown in case of an invalid operation on a TIOStream.


TIOStream.Write

Write data to the stream

Declaration

Source position: iostream.pp line 39

public function TIOStream.Write(

  const Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Memory buffer containing the data to be written.
Count | Number of bytes to write.

Function result

Number of bytes actually written.

Description

Write checks first whether the type of the stream allows writing (type is iosOutput or iosError). If not, it raises a EIOStreamError exception. If the stream can be written to, it calls the inherited Write to actually read the data.

Errors

An EIOStreamError exception is raised if the stream does not allow writing.

See also

TIOSType | Type of stream to create
TIOStream.Read | Read data from the stream.


TTarArchive

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to examine and read tar archives

Declaration

Source position: libtar.pp line 158

type TTarArchive = class
procedure Create(); | Create a new instance of the archive
public
destructor Destroy; override; | Destroy TTarArchive instance
procedure Reset; | Reset archive
function FindNext(); | Find next archive entry
public
procedure ReadFile(); | Read a file from the archive
public
procedure GetFilePos(); | Return current archive position
procedure SetFilePos(); | Set position in archive
end;

Inheritance

TTarArchive

Class to examine and read tar archives
|

TObject

Description

TTarArchive is the class used to read and examine .tar archives. It can be constructed from a stream or from a filename. Creating an instance will not perform any operation on the stream yet.

See also

TTarWriter | Class to write tar archives
FindNext | Find next archive entry


TTarArchive


TTarArchive
 | Create
 | Destroy
 | Reset
 | FindNext
 | ReadFile
 | GetFilePos
 | SetFilePos


Create (TTarArchive)

Destroy (TTarArchive)

FindNext (TTarArchive)

GetFilePos (TTarArchive)

ReadFile (TTarArchive)

Reset (TTarArchive)

SetFilePos (TTarArchive)


TTarArchive.Create

Create a new instance of the archive

Declaration

Source position: line 0

constructor TTarArchive.Create(

  Stream: TStream

); overload;

constructor TTarArchive.Create(

  Filename: ;

  FileMode: Word = fmOpenRead or fmShareDenyWrite

); overload;

Arguments

Stream

Stream to read archive from

Arguments

Filename | Filename to open and read archive from
FileMode | Filemode to open file with.

Description

Create can be used to create a new instance of TTarArchive using either a Stream TStream descendent or using a name of a file to open: FileName. In case of the filename, an open mode can be specified.

Errors

In case a filename is specified and the file cannot be opened, an exception will occur.

See also

FindNext

Find next archive entry


TTarArchive.Destroy

Destroy TTarArchive instance

Declaration

Source position: libtar.pp line 167

public destructor TTarArchive.Destroy; override;

Description

Destroy closes the archive stream (if it created a stream) and cleans up the TTarArchive instance.

See also

TTarArchive.Create

Create a new instance of the archive


TTarArchive.FindNext

Find next archive entry

Declaration

Source position: libtar.pp line 169

public function TTarArchive.FindNext(

  var DirRec: TTarDirRec

):Boolean;

Arguments

DirRec

Information about the archive

Function result

True if the next entry was found.

Description

FindNext positions the file pointer on the next archive entry, and returns all information about the entry in DirRec. It returns True if the operation was succeful, or False if not (for instance, when the end of the archive was reached).

Errors

In case there are no more entries, False is returned.

See also

TTarArchive.ReadFile

Read a file from the archive


TTarArchive.GetFilePos

Return current archive position

Declaration

Source position: libtar.pp line 175

public procedure TTarArchive.GetFilePos(

  var Current: Int64;

  var Size: Int64

);

Arguments

Current | Current position in archive
Size | Archive size

Description

GetFilePos returns the position in the tar archive in Current and the complete archive size in Size.

See also

TTarArchive.SetFilePos | Set position in archive
TTarArchive.Reset | Reset archive


TTarArchive.ReadFile

Read a file from the archive

Declaration

Source position: line 0

procedure TTarArchive.ReadFile(

  Buffer: POINTER

); overload;

procedure TTarArchive.ReadFile(

  Stream: TStream

); overload;

procedure TTarArchive.ReadFile(

  Filename:

); overload;

function TTarArchive.ReadFile: ; overload;

Arguments

Buffer

Memory buffer to copy file contents to.

Arguments

Stream

Stream to copy file contents to.

Arguments

Filename

Filename for file in which to write file content.

Function result

File contents as string

Description

ReadFile can be used to read the current file in the archive. It can be called after the archive was succesfully positioned on an entry in the archive. The file can be read in various ways:

  • directly in a memory buffer. No checks are performed to see whether the buffer points to enough memory.
  • It can be copied to a Stream.
  • It can be copied to a file with name FileName.
  • The file content can be copied to a string

Errors

An exception may occur if the buffer is not large enough, or when the file specified in filename cannot be opened.


TTarArchive.Reset

Reset archive

Declaration

Source position: libtar.pp line 168

public procedure TTarArchive.Reset;

Description

Reset sets the archive file position on the beginning of the archive.

See also

TTarArchive.Create

Create a new instance of the archive


TTarArchive.SetFilePos

Set position in archive

Declaration

Source position: libtar.pp line 176

public procedure TTarArchive.SetFilePos(

  NewPos: Int64

);

Arguments

NewPos

New position in the archive

Description

SetFilePos can be used to set the absolute position in the tar archive.

See also

TTarArchive.Reset | Reset archive
TTarArchive.GetFilePos | Return current archive position


TTarWriter

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to write tar archives

Declaration

Source position: libtar.pp line 180

type TTarWriter = class
procedure Create(); | Create a new archive
public
destructor Destroy; override; | Close archive and clean up TTarWriter
procedure AddFile(); | Add a file to the archive
procedure AddStream(); | Add stream contents to archive.
procedure AddString(); | Add string as file data
procedure AddDir(); | Add directory to archive
procedure AddSymbolicLink(); | Add a symbolic link to the archive
procedure AddLink(); | Add hard link to archive
procedure AddVolumeHeader(); | Add volume header entry
procedure Finalize; | Finalize the archive
property Permissions: TTarPermissions; [rw] | Archive entry permissions
property UID: Integer; [rw] | Archive entry user ID
property GID: Integer; [rw] | Archive entry group ID
property UserName: AnsiString; [rw] | Archive entry user name
property GroupName: AnsiString; [rw] | Archive entry group name
property Mode: TTarModes; [rw] | Archive entry mode
property Magic: AnsiString; [rw] | Archive entry Magic constant
end;

Inheritance

TTarWriter

Class to write tar archives
|

TObject

Description

TTarWriter can be used to create .tar archives. It can be created using a filename, in which case the archive will be written to the filename, or it can be created using a stream, in which case the archive will be written to the stream - for instance a compression stream.

See also

TTarArchive

Class to examine and read tar archives


TTarWriter
 | Permissions
 | UID
 | GID
 | UserName
 | GroupName
 | Mode
 | Magic


GID (TTarWriter)

GroupName (TTarWriter)

Magic (TTarWriter)

Mode (TTarWriter)

Permissions (TTarWriter)

UID (TTarWriter)

UserName (TTarWriter)


TTarWriter
 | Create
 | Destroy
 | AddFile
 | AddStream
 | AddString
 | AddDir
 | AddSymbolicLink
 | AddLink
 | AddVolumeHeader
 | Finalize


AddDir (TTarWriter)

AddFile (TTarWriter)

AddLink (TTarWriter)

AddStream (TTarWriter)

AddString (TTarWriter)

AddSymbolicLink (TTarWriter)

AddVolumeHeader (TTarWriter)

Create (TTarWriter)

Destroy (TTarWriter)

Finalize (TTarWriter)


TTarWriter


TTarWriter.AddDir

Add directory to archive

Declaration

Source position: libtar.pp line 201

public procedure TTarWriter.AddDir(

  Dirname: AnsiString;

  DateGmt: TDateTime;

  MaxDirSize: Int64 = 0

);

Arguments

Dirname | Directory name to add
DateGmt | Directory timestamp
MaxDirSize | Max directory size

Description

AddDir adds a directory entry to the archive. The entry is written with name DirName, maximum directory size MaxDirSize (0 means unlimited) and timestamp DateGmt.

Note that this call only adds an entry for a directory to the archive: if DirName is an existing directory, it does not write all files in the directory to the archive.

The directory entry is written with the current owner data and permissions.

See also

TTarWriter.AddFile | Add a file to the archive
TTarWriter.AddStream | Add stream contents to archive.
TTarWriter.AddLink | Add hard link to archive
TTarWriter.AddSymbolicLink | Add a symbolic link to the archive
TTarWriter.AddString | Add string as file data
TTarWriter.AddVolumeHeader | Add volume header entry


TTarWriter.AddFile

Add a file to the archive

Declaration

Source position: libtar.pp line 198

public procedure TTarWriter.AddFile(

  Filename: ;

  TarFilename: AnsiString = ''

);

Arguments

Filename | File to add to the archive
TarFilename | Alternative filename, stored in archive

Description

AddFile adds a file to the archive: the contents is read from FileName. Optionally, an alternative filename can be specified in TarFileName. This name should contain only forward slash path separators. If it is not specified, the name will be computed from FileName.

The archive entry is written with the current owner data and permissions.

Errors

If FileName cannot be opened, an exception will be raised.

See also

TTarWriter.AddStream | Add stream contents to archive.
TTarWriter.AddString | Add string as file data
TTarWriter.AddLink | Add hard link to archive
TTarWriter.AddSymbolicLink | Add a symbolic link to the archive
TTarWriter.AddDir | Add directory to archive
TTarWriter.AddVolumeHeader | Add volume header entry


TTarWriter.AddLink

Add hard link to archive

Declaration

Source position: libtar.pp line 203

public procedure TTarWriter.AddLink(

  Filename: AnsiString;

  Linkname: AnsiString;

  DateGmt: TDateTime

);

Arguments

Filename | Entry filename
Linkname | Target of hard link
DateGmt | Timestamp of entry

Description

AddLink adds a hard link entry to the archive. The entry has name FileName, timestamp DateGmt and points to LinkName.

The link entry is written with the current owner data and permissions.

See also

TTarWriter.AddFile | Add a file to the archive
TTarWriter.AddStream | Add stream contents to archive.
TTarWriter.AddSymbolicLink | Add a symbolic link to the archive
TTarWriter.AddDir | Add directory to archive
TTarWriter.AddString | Add string as file data
TTarWriter.AddVolumeHeader | Add volume header entry


TTarWriter.AddStream

Add stream contents to archive.

Declaration

Source position: libtar.pp line 199

public procedure TTarWriter.AddStream(

  Stream: TStream;

  TarFilename: AnsiString;

  FileDateGmt: TDateTime

);

Arguments

Stream | Stream data to be added to archive
TarFilename | Archive entry name
FileDateGmt | Archive entry timestamp

Description

AddStream will add the contents of Stream to the archive. The Stream will not be reset: only the contents of the stream from the current position will be written to the archive. The entry will be written with file name TarFileName. This name should contain only forward slash path separators. The entry will be written with timestamp FileDateGmt.

The archive entry is written with the current owner data and permissions.

See also

TTarWriter.AddFile | Add a file to the archive
TTarWriter.AddString | Add string as file data
TTarWriter.AddLink | Add hard link to archive
TTarWriter.AddSymbolicLink | Add a symbolic link to the archive
TTarWriter.AddDir | Add directory to archive
TTarWriter.AddVolumeHeader | Add volume header entry


TTarWriter.AddString

Add string as file data

Declaration

Source position: libtar.pp line 200

public procedure TTarWriter.AddString(

  Contents: Ansistring;

  TarFilename: AnsiString;

  FileDateGmt: TDateTime

);

Arguments

Contents | Data for file entry
TarFilename | Name for filename
FileDateGmt | Timestamp for filename.

Description

AddString adds the string Contents as the data of an entry with file name TarFileName. This name should contain only forward slash path separators. The entry will be written with timestamp FileDateGmt.

The archive entry is written with the current owner data and permissions.

See also

TTarWriter.AddFile | Add a file to the archive
TTarWriter.AddStream | Add stream contents to archive.
TTarWriter.AddLink | Add hard link to archive
TTarWriter.AddSymbolicLink | Add a symbolic link to the archive
TTarWriter.AddDir | Add directory to archive
TTarWriter.AddVolumeHeader | Add volume header entry


TTarWriter.AddSymbolicLink

Add a symbolic link to the archive

Declaration

Source position: libtar.pp line 202

public procedure TTarWriter.AddSymbolicLink(

  Filename: AnsiString;

  Linkname: AnsiString;

  DateGmt: TDateTime

);

Arguments

Filename | Filename for entry
Linkname | Target of symbolic link
DateGmt | Timestamp of entry

Description

AddSymbolicLink adds a symbolic link entry to the archive, with name FileName, pointing to LinkName. The entry is written with timestamp DateGmt.

The link entry is written with the current owner data and permissions.

See also

TTarWriter.AddFile | Add a file to the archive
TTarWriter.AddStream | Add stream contents to archive.
TTarWriter.AddLink | Add hard link to archive
TTarWriter.AddDir | Add directory to archive
TTarWriter.AddString | Add string as file data
TTarWriter.AddVolumeHeader | Add volume header entry


TTarWriter.AddVolumeHeader

Add volume header entry

Declaration

Source position: libtar.pp line 204

public procedure TTarWriter.AddVolumeHeader(

  VolumeId: AnsiString;

  DateGmt: TDateTime

);

Arguments

VolumeId | Volume name to write
DateGmt | Timestamp of archive entry

Description

AddVolumeHeader adds a volume header entry to the archive. The entry is written with name VolumeID and timestamp DateGmt.

The volume header entry is written with the current owner data and permissions.

See also

TTarWriter.AddFile | Add a file to the archive
TTarWriter.AddStream | Add stream contents to archive.
TTarWriter.AddSymbolicLink | Add a symbolic link to the archive
TTarWriter.AddDir | Add directory to archive
TTarWriter.AddString | Add string as file data
TTarWriter.AddLink | Add hard link to archive


TTarWriter.Create

Create a new archive

Declaration

Source position: line 0

constructor TTarWriter.Create(

  TargetStream: TStream

); overload;

constructor TTarWriter.Create(

  TargetFilename: ;

  Mode: Integer = fmCreate

); overload;

Arguments

TargetStream

Stream to write archive to.

Arguments

TargetFilename | Filename to write archive to.
Mode | Mode to open target file with. File must be writable

Description

Create creates a new TTarWriter instance. This will start a new .tar archive. The archive will be written to the TargetStream stream or to a file with name TargetFileName, which will be opened with filemode Mode.

Errors

In case TargetFileName cannot be opened, an exception will be raised.

See also

TTarWriter.Destroy

Close archive and clean up TTarWriter


TTarWriter.Destroy

Close archive and clean up TTarWriter

Declaration

Source position: libtar.pp line 197

public destructor TTarWriter.Destroy; override;

Description

Destroy will close the archive (i.e. it writes the end-of-archive marker, if it was not yet written), and then frees the TTarWriter instance.

See also

TTarWriter.Finalize

Finalize the archive


TTarWriter.Finalize

Finalize the archive

Declaration

Source position: libtar.pp line 205

public procedure TTarWriter.Finalize;

Description

Finalize writes the end-of-archive marker to the archive. No more entries can be added after Finalize was called.

If the TTarWriter instance is destroyed, it will automatically call finalize if finalize was not yet called.

See also

TTarWriter.Destroy

Close archive and clean up TTarWriter


TTarWriter.GID

Archive entry group ID

Declaration

Source position: libtar.pp line 208

public property TTarWriter.GID: Integer
  read FGID
  write FGID;

Description

GID is used for the GID field of the archive entries.

See also

TTarDirRec

Tar Directory entry


TTarWriter.GroupName

Archive entry group name

Declaration

Source position: libtar.pp line 210

public property TTarWriter.GroupName: AnsiString
  read FGroupName
  write FGroupName;

Description

GroupName is used for the GroupName field of the archive entries.

See also

TTarDirRec

Tar Directory entry


TTarWriter.Magic

Archive entry Magic constant

Declaration

Source position: libtar.pp line 212

public property TTarWriter.Magic: AnsiString
  read FMagic
  write FMagic;

Description

Magic is used for the Magic field of the archive entries.

See also

TTarDirRec

Tar Directory entry


TTarWriter.Mode

Archive entry mode

Declaration

Source position: libtar.pp line 211

public property TTarWriter.Mode: TTarModes
  read FMode
  write FMode;

Description

Mode is used for the Mode field of the archive entries.

See also

TTarDirRec

Tar Directory entry


TTarWriter.Permissions

Archive entry permissions

Declaration

Source position: libtar.pp line 206

public property TTarWriter.Permissions: TTarPermissions
  read FPermissions
  write FPermissions;

Description

Permissions is used for the permissions field of the archive entries.

See also

TTarDirRec

Tar Directory entry


TTarWriter.UID

Archive entry user ID

Declaration

Source position: libtar.pp line 207

public property TTarWriter.UID: Integer
  read FUID
  write FUID;

Description

UID is used for the UID field of the archive entries.

See also

TTarDirRec

Tar Directory entry


TTarWriter.UserName

Archive entry user name

Declaration

Source position: libtar.pp line 209

public property TTarWriter.UserName: AnsiString
  read FUserName
  write FUserName;

Description

UserName is used for the UserName field of the archive entries.

See also

TTarDirRec

Tar Directory entry


EMSSQLDatabaseError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Sybase/MS SQL Server specific error

Declaration

Source position: mssqlconn.pp line 127

type EMSSQLDatabaseError = class(EDatabaseError)

public

  DBErrorCode: Integer;

Sybase/MS SQL Server error code

end;

Inheritance

EMSSQLDatabaseError | Sybase/MS SQL Server specific error
|
EDatabaseError | Base class for all database-related errors
|
Exception
|
TObject


EMSSQLDatabaseError
EDatabaseError
Exception
 | HelpContext
 | Message
TObject


EMSSQLDatabaseError
EDatabaseError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EMSSQLDatabaseError

EDatabaseError

Exception

TObject


EMSSQLDatabaseError.DBErrorCode

Sybase/MS SQL Server error code

Declaration

Source position: mssqlconn.pp line 129

public EMSSQLDatabaseError.DBErrorCode: Integer;

Description

Error code as generated by the database server.


TMSSQLConnection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Microsoft SQL Server database connector

Declaration

Source position: mssqlconn.pp line 51

type TMSSQLConnection = class(TSQLConnection)

public

  constructor Create(); override;

published

  property Password;

  property Transaction;

  property UserName;

  property CharSet;

  property HostName;

Host and optionally port or instance

  property Connected;

  property Role;

  property DatabaseName;

  property KeepConnection;

  property LoginPrompt;

  property Params;

  property OnLogin;

end;

Inheritance

TMSSQLConnection

Microsoft SQL Server database connector
|

TSQLConnection
?

TObject

Description

Connector to Microsoft SQL Server databases.

Requirements:

MS SQL Server Client Library is required (ntwdblib.dll)

- or -

FreeTDS (dblib.dll)

Older FreeTDS libraries may require freetds.conf: (http://www.freetds.org/userguide/freetdsconf.htm)

[global]

tds version = 7.1

client charset = UTF-8

port = 1433 or instance = ... (optional)

dump file = freetds.log (optional)

text size = 2147483647 (optional)

Known problems:

- CHAR/VARCHAR data truncated to column length when encoding to UTF-8 (use NCHAR/NVARCHAR instead or CAST char/varchar to nchar/nvarchar)

- Multiple result sets (MARS) are not supported (for example when SP returns more than 1 result set only 1st is processed)

- DB-Library error 10038 "Results Pending": set TSQLQuery.PacketRecords=-1 to fetch all pending rows

- BLOB data (IMAGE/TEXT columns) larger than 16MB are truncated to 16MB: (set TMSSQLConnection.Params: 'TEXTSIZE=2147483647' or execute 'SET TEXTSIZE 2147483647')


TMSSQLConnection
pl | ro | Password
pl | ro | Transaction
pl | ro | UserName
pl | ro | CharSet
pl | ro | HostName
pl | ro | Connected
pl | ro | Role
pl | ro | DatabaseName
pl | ro | KeepConnection
pl | ro | LoginPrompt
pl | ro | Params


pl | ro | CharSet (TMSSQLConnection)
pl | ro | Connected (TMSSQLConnection)
pl | ro | DatabaseName (TMSSQLConnection)
pl | ro | HostName (TMSSQLConnection)
pl | ro | KeepConnection (TMSSQLConnection)
pl | ro | LoginPrompt (TMSSQLConnection)
pl | ro | Params (TMSSQLConnection)
pl | ro | Password (TMSSQLConnection)
pl | ro | Role (TMSSQLConnection)
pl | ro | Transaction (TMSSQLConnection)
pl | ro |


TMSSQLConnection

Create


Create (TMSSQLConnection)


TMSSQLConnection

pl

ro

OnLogin


TMSSQLConnection.CharSet

Declaration

Source position: mssqlconn.pp line 106

published property TMSSQLConnection.CharSet;

Description

Character Set - if you use Microsoft DB-Lib and set to 'UTF-8' then char/varchar fields will be UTF8Encoded/Decoded.

If you use FreeTDS DB-Lib, then you must compile with iconv support (requires libiconv2.dll) or cast char/varchar to nchar/nvarchar in SELECTs.


TMSSQLConnection.Connected

Declaration

Source position: mssqlconn.pp line 109

published property TMSSQLConnection.Connected;


TMSSQLConnection.Create

Declaration

Source position: mssqlconn.pp line 99

public constructor TMSSQLConnection.Create(

  AOwner: TComponent

); override;


TMSSQLConnection.DatabaseName

Declaration

Source position: mssqlconn.pp line 111

published property TMSSQLConnection.DatabaseName;

Description

TMSSQLConnection specific: the master database should always exist on a server.


TMSSQLConnection.HostName

Host and optionally port or instance

Declaration

Source position: mssqlconn.pp line 107

published property TMSSQLConnection.HostName;

Description

TMSSQLConnection specific: you can specify an instance or a port after the host name itself.

Instance should be specified with a backslash e.g.: 127.0.0.0.1\SQLEXPRESS. Port should be specified with a colon, e.g. BIGBADSERVER:1433

See http://www.freetds.org/userguide/portoverride.htm


TMSSQLConnection.KeepConnection

Declaration

Source position: mssqlconn.pp line 112

published property TMSSQLConnection.KeepConnection;


TMSSQLConnection.LoginPrompt

Declaration

Source position: mssqlconn.pp line 113

published property TMSSQLConnection.LoginPrompt;


TMSSQLConnection.OnLogin

Declaration

Source position: mssqlconn.pp line 115

published property TMSSQLConnection.OnLogin;


TMSSQLConnection.Params

Declaration

Source position: mssqlconn.pp line 114

published property TMSSQLConnection.Params;

Description

TMSSQLConnection specific:

set "AutoCommit=true" if you don't want to explicitly commit/rollback transactions

set "TextSize=16777216 - to set maximum size of blob/text/image data returned. Otherwise, these large fields may be cut off when retrieving/setting data.


TMSSQLConnection.Password

Declaration

Source position: mssqlconn.pp line 103

published property TMSSQLConnection.Password;

Description

TMSSQLConnection specific: if you don't enter a UserName and Password, the connector will try to use Trusted Authentication/SSPI (on Windows only).


TMSSQLConnection.Role

Declaration

Source position: mssqlconn.pp line 110

published property TMSSQLConnection.Role;


TMSSQLConnection.Transaction

Declaration

Source position: mssqlconn.pp line 104

published property TMSSQLConnection.Transaction;


TMSSQLConnection.UserName

Declaration

Source position: mssqlconn.pp line 105

published property TMSSQLConnection.UserName;

Description

TMSSQLConnection specific: if you don't enter a UserName and Password, the connector will try to use Trusted Authentication/SSPI (on Windows only).


TMSSQLConnectionDef

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Declaration

Source position: mssqlconn.pp line 134

type TMSSQLConnectionDef = class(TConnectionDef)

  class function TypeName; override;

  class function ConnectionClass; override;

  class function Description; override;

end;

Inheritance

TMSSQLConnectionDef
|

TConnectionDef
?

TObject


TMSSQLConnectionDef


TMSSQLConnectionDef
 | TypeName
 | ConnectionClass
 | Description


ConnectionClass (TMSSQLConnectionDef)

Description (TMSSQLConnectionDef)

TypeName (TMSSQLConnectionDef)


TMSSQLConnectionDef.ConnectionClass

Declaration

Source position: mssqlconn.pp line 136

class function TMSSQLConnectionDef.ConnectionClass: TSQLConnectionClass; override;


TMSSQLConnectionDef.Description

Declaration

Source position: mssqlconn.pp line 137

class function TMSSQLConnectionDef.Description: ; override;


TMSSQLConnectionDef.TypeName

Declaration

Source position: mssqlconn.pp line 135

class function TMSSQLConnectionDef.TypeName: ; override;


TSybaseConnection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Sybase ASE database connector

Declaration

Source position: mssqlconn.pp line 120

type TSybaseConnection = class(TMSSQLConnection)

public

  constructor Create(); override;

end;

Inheritance

TSybaseConnection | Sybase ASE database connector
|
TMSSQLConnection | Microsoft SQL Server database connector
|
TSQLConnection
?
TObject

Description

Connector to Sybase Adaptive Server Enterprise (ASE) database servers.

Requirements:

FreeTDS (dblib.dll)

Older FreeTDS libraries may require freetds.conf: (http://www.freetds.org/userguide/freetdsconf.htm)

[global]

tds version = 7.1

client charset = UTF-8

port = 5000 (optional)

dump file = freetds.log (optional)

text size = 2147483647 (optional)


TSybaseConnection
TMSSQLConnection
pl | ro | Password
pl | ro | Transaction
pl | ro | UserName
pl | ro | CharSet
pl | ro | HostName
pl | ro | Connected
pl | ro | Role
pl | ro | DatabaseName
pl | ro | KeepConnection
pl | ro | LoginPrompt
pl | ro | Params


TSybaseConnection
 | Create
TMSSQLConnection
 | Create


Create (TMSSQLConnection)

Create (TSybaseConnection)


TSybaseConnection

TMSSQLConnection

pl

ro

OnLogin


TSybaseConnection.Create

Declaration

Source position: mssqlconn.pp line 122

public constructor TSybaseConnection.Create(

  AOwner: TComponent

); override;


TSybaseConnectionDef

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Declaration

Source position: mssqlconn.pp line 142

type TSybaseConnectionDef = class(TConnectionDef)

  class function TypeName; override;

  class function ConnectionClass; override;

  class function Description; override;

end;

Inheritance

TSybaseConnectionDef
|

TConnectionDef
?

TObject


TSybaseConnectionDef


TSybaseConnectionDef
 | TypeName
 | ConnectionClass
 | Description


ConnectionClass (TSybaseConnectionDef)

Description (TSybaseConnectionDef)

TypeName (TSybaseConnectionDef)


TSybaseConnectionDef.ConnectionClass

Declaration

Source position: mssqlconn.pp line 144

class function TSybaseConnectionDef.ConnectionClass: TSQLConnectionClass; override;


TSybaseConnectionDef.Description

Declaration

Source position: mssqlconn.pp line 145

class function TSybaseConnectionDef.Description: ; override;


TSybaseConnectionDef.TypeName

Declaration

Source position: mssqlconn.pp line 143

class function TSybaseConnectionDef.TypeName: ; override;


EPipeCreation

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised when an error occurred during the creation of a pipe pair.

Declaration

Source position: pipes.pp line 27

type EPipeCreation = class(EPipeError) ;

Inheritance

EPipeCreation | Exception raised when an error occurred during the creation of a pipe pair.
|
EPipeError | Exception raised when an invalid operation is performed on a pipe stream.
|
EStreamError
|
Exception
|
TObject


EPipeCreation
EPipeError
EStreamError
Exception
 | HelpContext
 | Message
TObject


EPipeCreation
EPipeError
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EPipeCreation

EPipeError

EStreamError

Exception

TObject


EPipeError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised when an invalid operation is performed on a pipe stream.

Declaration

Source position: pipes.pp line 25

type EPipeError = class(EStreamError) ;

Inheritance

EPipeError

Exception raised when an invalid operation is performed on a pipe stream.
|

EStreamError
|

Exception
|

TObject


EPipeError
EStreamError
Exception
 | HelpContext
 | Message
TObject


EPipeError
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EPipeError

EStreamError

Exception

TObject


EPipeSeek

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised when an invalid seek operation is attempted on a pipe.

Declaration

Source position: pipes.pp line 26

type EPipeSeek = class(EPipeError) ;

Inheritance

EPipeSeek | Exception raised when an invalid seek operation is attempted on a pipe.
|
EPipeError | Exception raised when an invalid operation is performed on a pipe stream.
|
EStreamError
|
Exception
|
TObject


EPipeSeek
EPipeError
EStreamError
Exception
 | HelpContext
 | Message
TObject


EPipeSeek
EPipeError
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EPipeSeek

EPipeError

EStreamError

Exception

TObject


TInputPipeStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TStream descendent which wraps the read end of a pipe.

Declaration

Source position: pipes.pp line 31

type TInputPipeStream = class(THandleStream)
public
destructor Destroy; override;
function Write(); override; | Write data to the stream.
function Seek(); override; | Set the current position of the stream
function Read(); override; | Read data from the stream to a buffer.
property NumBytesAvailable: DWord; [r] | Number of bytes available for reading.
end;

Inheritance

TInputPipeStream

TStream descendent which wraps the read end of a pipe.
|

THandleStream
|

TStream
|

TObject

Description

TInputPipeStream is created by the CreatePipeStreams call to represent the reading end of a pipe. It is a TStream descendent which does not allow writing, and which mimics the seek operation.

See also

TStream
CreatePipeStreams | Create a pair of pipe stream.
TOutputPipeStream | TStream descendent which wraps the write end of a pipe.


TInputPipeStream
 | ro | NumBytesAvailable
THandleStream
 | ro | Handle
TStream
 |  | Position
 |  | Size
TObject


ro | Handle (THandleStream)
ro |


TInputPipeStream
 | Destroy
 | Write
 | Seek
 | Read
THandleStream
 | SetSize
 | Create
 | Read
 | Write
 | Seek
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (THandleStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TInputPipeStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

Read (THandleStream)

Read (TInputPipeStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (THandleStream)

Seek (TInputPipeStream)

SetPosition (TStream)

SetSize (TStream)

SetSize (THandleStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (THandleStream)

Write (TInputPipeStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TInputPipeStream

THandleStream

TStream

TObject


TInputPipeStream.Destroy

Declaration

Source position: pipes.pp line 39

public destructor TInputPipeStream.Destroy; override;


TInputPipeStream.NumBytesAvailable

Number of bytes available for reading.

Declaration

Source position: pipes.pp line 43

public property TInputPipeStream.NumBytesAvailable: DWord
  read GetNumBytesAvailable;

Description

NumBytesAvailable is the number of bytes available for reading. This is the number of bytes in the OS buffer for the pipe. It is not a number of bytes in an internal buffer.

If this number is nonzero, then reading NumBytesAvailable bytes from the stream will not block the process. Reading more than NumBytesAvailable bytes will block the process, while it waits for the requested number of bytes to become available.

See also

TInputPipeStream.Read

Read data from the stream to a buffer.


TInputPipeStream.Read

Read data from the stream to a buffer.

Declaration

Source position: pipes.pp line 42

public function TInputPipeStream.Read(

  var Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Memory buffer where to write the data read from the stream.
Count | Number of bytes to read from the stream.

Function result

Number of bytes actually read from the stream.

Description

Read calls the inherited read and adjusts the internal position pointer of the stream.

Errors

None.

See also

Write | Write data to the stream.
Seek | Set the current position of the stream


TInputPipeStream.Seek

Set the current position of the stream

Declaration

Source position: pipes.pp line 41

public function TInputPipeStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Offset, in bytes, starting at Origin
Origin | Where to start counting Offset bytes.

Function result

New position of the stream.

Description

Seek overrides the standard Seek implementation. Normally, pipe streams stderr are not seekable. The TInputPipeStream stream tries to provide seek capabilities for the following limited number of cases:

Origin=soFromBeginning
If Offset is larger than the current position, then the remaining bytes are skipped by reading them from the stream and discarding them.
Origin=soFromCurrent
If Offset is zero, the current position is returned. If it is positive, then Offset bytes are skipped by reading them from the stream and discarding them, if the stream is of type iosInput.

All other cases will result in a EPipeSeek exception.

Errors

An EPipeSeek exception is raised if the stream does not allow the requested seek operation.

See also

EPipeSeek

Exception raised when an invalid seek operation is attempted on a pipe.

Seek


TInputPipeStream.Write

Write data to the stream.

Declaration

Source position: pipes.pp line 40

public function TInputPipeStream.Write(

  const Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Memory buffer containing the data to be written.
Count | Number of bytes that must be written.

Function result

Number of bytes actually written.

Description

Write overrides the parent implementation of Write. On a TInputPipeStream will always raise an exception, as the pipe is read-only.

Errors

An EStreamError exception is raised when this function is called.

See also

Read | Read data from the stream to a buffer.
Seek | Set the current position of the stream


TOutputPipeStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TStream descendent which wraps the write end of a pipe.

Declaration

Source position: pipes.pp line 46

type TOutputPipeStream = class(THandleStream)
public
destructor Destroy; override;
function Seek(); override; | Sets the position in the stream
function Read(); override; | Read data from the stream.
end;

Inheritance

TOutputPipeStream

TStream descendent which wraps the write end of a pipe.
|

THandleStream
|

TStream
|

TObject

Description

TOutputPipeStream is created by the CreatePipeStreams call to represent the writing end of a pipe. It is a TStream descendent which does not allow reading.

See also

TStream
CreatePipeStreams | Create a pair of pipe stream.
TInputPipeStream | TStream descendent which wraps the read end of a pipe.


TOutputPipeStream
THandleStream
 | ro | Handle
TStream
 |  | Position
 |  | Size
TObject


TOutputPipeStream
 | Destroy
 | Seek
 | Read
THandleStream
 | SetSize
 | Create
 | Read
 | Write
 | Seek
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (THandleStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOutputPipeStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

Read (THandleStream)

Read (TOutputPipeStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

Seek (THandleStream)

Seek (TOutputPipeStream)

SetPosition (TStream)

SetSize (TStream)

SetSize (THandleStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

Write (THandleStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TOutputPipeStream

THandleStream

TStream

TObject


TOutputPipeStream.Destroy

Declaration

Source position: pipes.pp line 48

public destructor TOutputPipeStream.Destroy; override;


TOutputPipeStream.Read

Read data from the stream.

Declaration

Source position: pipes.pp line 50

public function TOutputPipeStream.Read(

  var Buffer;

  Count: LongInt

):LongInt; override;

Arguments

Buffer | Memory buffer where to write the data read from the stream.
Count | Number of bytes to read from the stream.

Function result

Number of bytes actually read from the stream.

Description

Read overrides the parent Read implementation. It always raises an exception, because a output pipe is write-only.

Errors

An EStreamError exception is raised when this function is called.

See also

Seek

Sets the position in the stream


TOutputPipeStream.Seek

Sets the position in the stream

Declaration

Source position: pipes.pp line 49

public function TOutputPipeStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override;

Arguments

Offset | Offset, in bytes, starting at Origin
Origin | Where to start counting Offset bytes.

Function result

New position of the stream.

Description

Seek is overridden in TOutputPipeStream. Calling this method will always raise an exception: an output pipe is not seekable.

Errors

An EPipeSeek exception is raised if this method is called.


TNonFreePooledMemManager

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Memory manager for fixed memory blocks which does not free any memory

Declaration

Source position: pooledmm.pp line 73

type TNonFreePooledMemManager = class
public
ClearOnCreate: Boolean; | Determines whether newly allocated memory should be cleared
property ItemSize: Integer; [r] | Size of an item in the list
procedure Clear; | Clears the memory
constructor Create(); | Creates a new instance of TNonFreePooledMemManager
destructor Destroy; override; | Removes the TNonFreePooledMemManager instance from memory
function NewItem; | Return a pointer to a new memory block
procedure EnumerateItems(); | Enumerate all items in the list
end;

Inheritance

TNonFreePooledMemManager

Memory manager for fixed memory blocks which does not free any memory
|

TObject

Description

TNonFreePooledMemManager keeps a list of fixed-size memory blocks in memory. Each block has the same size, making it suitable for storing a lot of records of the same type. It does not free the items stored in it, except when the list is cleared as a whole.

It allocates memory for the blocks in a exponential way, i.e. each time a new block of memory must be allocated, it's size is the double of the last block. The first block will contain 8 items.


TNonFreePooledMemManager

ro

ItemSize


TNonFreePooledMemManager
 | Clear
 | Create
 | Destroy
 | NewItem
 | EnumerateItems


Clear (TNonFreePooledMemManager)

Create (TNonFreePooledMemManager)

Destroy (TNonFreePooledMemManager)

EnumerateItems (TNonFreePooledMemManager)

NewItem (TNonFreePooledMemManager)


TNonFreePooledMemManager


TNonFreePooledMemManager.Clear

Clears the memory

Declaration

Source position: pooledmm.pp line 84

public procedure TNonFreePooledMemManager.Clear;

Description

Clear clears all blocks from memory, freeing the allocated memory blocks. None of the pointers returned by NewItem is valid after a call to Clear

See also

NewItem

Return a pointer to a new memory block


TNonFreePooledMemManager.ClearOnCreate

Determines whether newly allocated memory should be cleared

Declaration

Source position: pooledmm.pp line 82

public TNonFreePooledMemManager.ClearOnCreate: Boolean;

Description

ClearOnCreate is a public variable, it determines whether a newly allocated block of memory will be filled with zeroes (if set to True) or not (if set to False).

See also

TNonFreePooledMemManager.NewItem

Return a pointer to a new memory block


TNonFreePooledMemManager.Create

Creates a new instance of TNonFreePooledMemManager

Declaration

Source position: pooledmm.pp line 85

public constructor TNonFreePooledMemManager.Create(

  TheItemSize: Integer

);

Arguments

TheItemSize

Size of the items in the list

Description

Create creates a new instance of TNonFreePooledMemManager and sets the item size to TheItemSize.

Errors

If not enough memory is available, an exception may be raised.

See also

TNonFreePooledMemManager.ItemSize

Size of an item in the list


TNonFreePooledMemManager.Destroy

Removes the TNonFreePooledMemManager instance from memory

Declaration

Source position: pooledmm.pp line 86

public destructor TNonFreePooledMemManager.Destroy; override;

Description

Destroy clears the list, clears the internal structures, and then calls the inherited Destroy.

Destroy should never be called directly. Instead Free should be used, or FreeAndNil

See also

TNonFreePooledMemManager.Create | Creates a new instance of TNonFreePooledMemManager
TNonFreePooledMemManager.Clear | Clears the memory


TNonFreePooledMemManager.EnumerateItems

Enumerate all items in the list

Declaration

Source position: pooledmm.pp line 88

public procedure TNonFreePooledMemManager.EnumerateItems(

  const Method: TEnumItemsMethod

);

Arguments

Method

Callback to call

Description

EnumerateItems will enumerate over all items in the list, passing the items to Method. This can be used to execute certain operations on all items in the list. (for example, simply list them)


TNonFreePooledMemManager.ItemSize

Size of an item in the list

Declaration

Source position: pooledmm.pp line 83

public property TNonFreePooledMemManager.ItemSize: Integer
  read FItemSize;

Description

ItemSize is the size of a single block in the list. It's a fixed size determined when the list is created.

See also

TNonFreePooledMemManager.Create

Creates a new instance of TNonFreePooledMemManager


TNonFreePooledMemManager.NewItem

Return a pointer to a new memory block

Declaration

Source position: pooledmm.pp line 87

public function TNonFreePooledMemManager.NewItem: Pointer;

Function result

Pointer to a new memory block

Description

NewItem returns a pointer to an unused memory block of size ItemSize. It will allocate new memory on the heap if necessary.

Note that there is no way to mark the memory block as free, except by clearing the whole list.

Errors

If no more memory is available, an exception may be raised.

See also

TNonFreePooledMemManager.Clear

Clears the memory


TPooledMemManager

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Pooled memory manager

Declaration

Source position: pooledmm.pp line 40

type TPooledMemManager = class
public
property MinimumFreeCount: Integer; [rw] | Minimum count of free items in the list
property MaximumFreeCountRatio: Integer; [rw] | Maximum ratio of free items over total items
property Count: Integer; [r] | Number of items in the list
property FreeCount: Integer; [r] | Number of free items in the list
property AllocatedCount: Int64; [r] | Total number of allocated items in the list
property FreedCount: Int64; [r] | Total number of freed items in the list.
procedure Clear; | Clears the list
constructor Create; | Creates a new instance of the TPooledMemManager class
destructor Destroy; override; | Removes an instance of TPooledMemManager class from memory
end;

Inheritance

TPooledMemManager

Pooled memory manager
|

TObject

Description

TPooledMemManager is a class which maintains a linked list of blocks, represented by the TPooledMemManagerItem record. It should not be used directly, but should be descended from and the descendent should implement the actual memory manager.

See also

TPooledMemManagerItem

Item used in a linked list


TPooledMemManager
 |  | MinimumFreeCount
 |  | MaximumFreeCountRatio
 | ro | Count
 | ro | FreeCount
 | ro | AllocatedCount
 | ro | FreedCount


ro | AllocatedCount (TPooledMemManager)
ro | Count (TPooledMemManager)
ro | FreeCount (TPooledMemManager)
ro |


TPooledMemManager
 | Clear
 | Create
 | Destroy


Clear (TPooledMemManager)

Create (TPooledMemManager)

Destroy (TPooledMemManager)


TPooledMemManager


TPooledMemManager.AllocatedCount

Total number of allocated items in the list

Declaration

Source position: pooledmm.pp line 61

public property TPooledMemManager.AllocatedCount: Int64
  read FAllocatedCount;

Description

AllocatedCount is the total number of newly allocated items on the list.

See also

TPooledMemManager.Count | Number of items in the list
TPooledMemManager.FreeCount | Number of free items in the list
TPooledMemManager.FreedCount | Total number of freed items in the list.


TPooledMemManager.Clear

Clears the list

Declaration

Source position: pooledmm.pp line 63

public procedure TPooledMemManager.Clear;

Description

Clear clears the list, it disposes all items in the list.

See also

TPooledMemManager.FreedCount

Total number of freed items in the list.


TPooledMemManager.Count

Number of items in the list

Declaration

Source position: pooledmm.pp line 59

public property TPooledMemManager.Count: Integer
  read FCount;

Description

Count is the total number of items allocated from the list.

See also

TPooledMemManager.FreeCount | Number of free items in the list
TPooledMemManager.AllocatedCount | Total number of allocated items in the list
TPooledMemManager.FreedCount | Total number of freed items in the list.


TPooledMemManager.Create

Creates a new instance of the TPooledMemManager class

Declaration

Source position: pooledmm.pp line 64

public constructor TPooledMemManager.Create;

Description

Create initializes all necessary properties and then calls the inherited create.

See also

TPooledMemManager.Destroy

Removes an instance of TPooledMemManager class from memory


TPooledMemManager.Destroy

Removes an instance of TPooledMemManager class from memory

Declaration

Source position: pooledmm.pp line 65

public destructor TPooledMemManager.Destroy; override;

Description

Destroy calls Clear and then calls the inherited destroy.

Destroy should never be called directly. Instead Free should be used, or FreeAndNil

See also

TPooledMemManager.Create

Creates a new instance of the TPooledMemManager class


TPooledMemManager.FreeCount

Number of free items in the list

Declaration

Source position: pooledmm.pp line 60

public property TPooledMemManager.FreeCount: Integer
  read FFreeCount;

Description

FreeCount is the current total number of free items in the list.

See also

TPooledMemManager.Count | Number of items in the list
TPooledMemManager.AllocatedCount | Total number of allocated items in the list
TPooledMemManager.FreedCount | Total number of freed items in the list.


TPooledMemManager.FreedCount

Total number of freed items in the list.

Declaration

Source position: pooledmm.pp line 62

public property TPooledMemManager.FreedCount: Int64
  read FFreedCount;

Description

FreedCount is the total number of elements actually freed in the list.

See also

TPooledMemManager.Count | Number of items in the list
TPooledMemManager.FreeCount | Number of free items in the list
TPooledMemManager.AllocatedCount | Total number of allocated items in the list


TPooledMemManager.MaximumFreeCountRatio

Maximum ratio of free items over total items

Declaration

Source position: pooledmm.pp line 57

public property TPooledMemManager.MaximumFreeCountRatio: Integer
  read FMaxFreeRatio
  write SetMaxFreeRatio;

Description

MaximumFreeCountRatio is the maximum ratio (divided by 8) of free elements over the total amount of elements: When disposing an item in the list, if the number of free items is higher than this ratio, the item is freed.

The default value is 8.

See also

TPooledMemManager.MinimumFreeCount

Minimum count of free items in the list


TPooledMemManager.MinimumFreeCount

Minimum count of free items in the list

Declaration

Source position: pooledmm.pp line 56

public property TPooledMemManager.MinimumFreeCount: Integer
  read FMinFree
  write SetMinFree;

Description

MinimumFreeCount is the minimum number of free items in the linked list. When disposing an item in the list, the number of items is checked, and only if the required number of free items is present, the item is actually freed.

The default value is 100000

See also

TPooledMemManager.MaximumFreeCountRatio

Maximum ratio of free items over total items


TPooledMemManagerItem

Item used in a linked list

Declaration

Source position: pooledmm.pp line 34

type TPooledMemManagerItem = record

  Next: PPooledMemManagerItem;

Pointer to the next memory block

end;

Description

TPooledMemManagerItem is used internally by the TPooledMemManager class to maintain the free list block. It simply points to the next free block.

See also

PPooledMemManagerItem | Pointer to TPooledMemManagerItem
TPooledMemManager | Pooled memory manager


EProcess

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised when an error occurs in a TProcess routine.

Declaration

Source position: process.pp line 161

type EProcess = class(Exception) ;

Inheritance

EProcess

Exception raised when an error occurs in a TProcess routine.
|

Exception
|

TObject

See also

TProcess

Class to start and control other processes.


EProcess
Exception
 | HelpContext
 | Message
TObject


EProcess
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EProcess

Exception

TObject


TProcess

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to start and control other processes.

Declaration

Source position: process.pp line 50

type TProcess = class(TComponent)
public
constructor Create(); override; | Create a new instance of the TProcess class.
destructor Destroy; override; | Destroy this instance of TProcess
procedure Execute; virtual; | Execute the program with the given options
procedure CloseInput; virtual; | Close the input stream of the process
procedure CloseOutput; virtual; | Close the output stream of the process
procedure CloseStderr; virtual; | Close the error stream of the process
function Resume; virtual; | Resume execution of a suspended process
function Suspend; virtual; | Suspend a running process
function Terminate(); virtual; | Terminate a running process
function WaitOnExit; | Wait for the program to stop executing.
property WindowRect: Trect; [rw] | Positions for the main program window.
property Handle: THandle; [r] | Handle of the process
property ProcessHandle: THandle; [r] | Alias for Handle
property ThreadHandle: THandle; [r] | Main process thread handle
property ProcessID: Integer; [r] | ID of the process.
property ThreadID: Integer; [r] | ID of the main process thread
property Input: TOutputPipeStream; [r] | Stream connected to standard input of the process.
property Output: TInputPipeStream; [r] | Stream connected to standard output of the process.
property Stderr: TInputPipeStream; [r] | Stream connected to standard diagnostic output of the process.
property ExitStatus: Integer; [r] | Exit status of the process.
property InheritHandles: Boolean; [rw] | Should the created process inherit the open handles of the current process.
property OnForkEvent: TProcessForkEvent; [rw] | Event triggered after fork occurred on Linux
published
property Active: Boolean; [rw] | Start or stop the process.
property ApplicationName: ; [rw] | Name of the application to start (deprecated)
property CommandLine: ; [rw] | Command-line to execute (deprecated)
property Executable: ; [rw] | Executable name. Supersedes CommandLine and ApplicationName.
property Parameters: TStrings; [rw] | Command-line argumens. Supersedes CommandLine.
property ConsoleTitle: ; [rw] | Title of the console window
property CurrentDirectory: ; [rw] | Working directory of the process.
property Desktop: ; [rw] | Desktop on which to start the process.
property Environment: TStrings; [rw] | Environment variables for the new process
property Options: TProcessOptions; [rw] | Options to be used when starting the process.
property Priority: TProcessPriority; [rw] | Priority at which the process is running.
property StartupOptions: TStartupOptions; [rw] | Additional (Windows) startup options
property Running: Boolean; [r] | Determines wheter the process is still running.
property ShowWindow: TShowWindowOptions; [rw] | Determines how the process main window is shown (Windows only)
property WindowColumns: Cardinal; [rw] | Number of columns in console window (windows only)
property WindowHeight: Cardinal; [rw] | Height of the process main window
property WindowLeft: Cardinal; [rw] | X-coordinate of the initial window (Windows only)
property WindowRows: Cardinal; [rw] | Number of rows in console window (Windows only)
property WindowTop: Cardinal; [rw] | Y-coordinate of the initial window (Windows only)
property WindowWidth: Cardinal; [rw] | Height of the process main window (Windows only)
property FillAttribute: Cardinal; [rw] | Color attributes of the characters in the console window (Windows only)
property XTermProgram: ; [rw] | XTerm program to use (unix only)
end;

Inheritance

TProcess

Class to start and control other processes.
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TProcess is a component that can be used to start and control other processes (programs/binaries). It contains a lot of options that control how the process is started. Many of these are Win32 specific, and have no effect on other platforms, so they should be used with care.

The simplest way to use this component is to create an instance, set the CommandLine property to the full pathname of the program that should be executed, and call Execute. To determine whether the process is still running (i.e. has not stopped executing), the Running property can be checked.

More advanced techniques can be used with the Options settings.

See also

Create | Create a new instance of the TProcess class.
Execute | Execute the program with the given options
Running | Determines wheter the process is still running.
CommandLin | Command-line to execute (deprecated)
Options | Options to be used when starting the process.


TProcess
 |  | WindowRect
 | ro | Handle
 | ro | ProcessHandle
 | ro | ThreadHandle
 | ro | ProcessID
 | ro | ThreadID
 | ro | Input
 | ro | Output
 | ro | Stderr
 | ro | ExitStatus
 |  | InheritHandles
pl |  | Active
pl |  | ApplicationName
pl |  | CommandLine
pl |  | Executable
pl |  | Parameters
pl |  | ConsoleTitle
pl |  | CurrentDirectory
pl |  | Desktop
pl |  | Environment
pl |  | Options
pl |  | Priority
pl |  | StartupOptions
pl | ro | Running
pl |  | ShowWindow
pl |  | WindowColumns
pl |  | WindowHeight
pl |  | WindowLeft
pl |  | WindowRows
pl |  | WindowTop
pl |  | WindowWidth
pl |  | FillAttribute
pl |  | XTermProgram
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Active (TProcess)
pl |  | ApplicationName (TProcess)
pl |  | CommandLine (TProcess)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
pl |  | ConsoleTitle (TProcess)
pl |  | CurrentDirectory (TProcess)
 |  | DesignInfo (TComponent)
pl |  | Desktop (TProcess)
pl |  | Environment (TProcess)
pl |  | Executable (TProcess)
 | ro | ExitStatus (TProcess)
pl |  | FillAttribute (TProcess)
 | ro | Handle (TProcess)
 |  | InheritHandles (TProcess)
 | ro | Input (TProcess)
 |  | Name (TComponent)
pl |  | Options (TProcess)
 | ro | Output (TProcess)
 | ro | Owner (TComponent)
pl |  | Parameters (TProcess)
pl |  | Priority (TProcess)
 | ro | ProcessHandle (TProcess)
 | ro | ProcessID (TProcess)
pl | ro | Running (TProcess)
pl |  | ShowWindow (TProcess)
pl |  | StartupOptions (TProcess)
 | ro | Stderr (TProcess)
 |  | Tag (TComponent)
 | ro | ThreadHandle (TProcess)
 | ro | ThreadID (TProcess)
 |  | VCLComObject (TComponent)
pl |  | WindowColumns (TProcess)
pl |  | WindowHeight (TProcess)
pl |  | WindowLeft (TProcess)
 |  | WindowRect (TProcess)
pl |  | WindowRows (TProcess)
pl |  | WindowTop (TProcess)
pl |  | WindowWidth (TProcess)
pl |  |


TProcess
 | Create
 | Destroy
 | Execute
 | CloseInput
 | CloseOutput
 | CloseStderr
 | Resume
 | Suspend
 | Terminate
 | WaitOnExit
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CloseInput (TProcess)

CloseOutput (TProcess)

CloseStderr (TProcess)

Create (TObject)

Create (TComponent)

Create (TProcess)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TProcess)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

Execute (TProcess)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

Resume (TProcess)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

Suspend (TProcess)

Terminate (TProcess)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WaitOnExit (TProcess)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TProcess

OnForkEvent

TComponent

TPersistent

TObject


OnForkEvent (TProcess)


TProcess.Active

Start or stop the process.

Declaration

Source position: process.pp line 137

published property TProcess.Active: Boolean
  read GetRunning
  write SetActive;

Description

Active starts the process if it is set to True, or terminates the process if set to False. It's mostly intended for use in an IDE.

See also

TProcess.Execute | Execute the program with the given options
TProcess.Terminate | Terminate a running process


TProcess.ApplicationName

Name of the application to start (deprecated)

Declaration

Source position: process.pp line 138

published property TProcess.ApplicationName:
  read FApplicationName
  write SetApplicationName;

Description

ApplicationName is an alias for TProcess.CommandLine. It's mostly foruse in the Windows CreateProcess call. If CommandLine is not set, then ApplicationName will be used instead.

ApplicationName is deprecated. New code should use Executable instead, and leave ApplicationName empty.

See also

TProcess.CommandLine | Command-line to execute (deprecated)
TProcess.Executable | Executable name. Supersedes CommandLine and ApplicationName.
TProcess.Parameters | Command-line argumens. Supersedes CommandLine.


TProcess.CloseInput

Close the input stream of the process

Declaration

Source position: process.pp line 115

public procedure TProcess.CloseInput; virtual;

Description

CloseInput closes the input file descriptor of the process, that is, it closes the handle of the pipe to standard input of the process.

See also

Input | Stream connected to standard input of the process.
StdErr | Stream connected to standard diagnostic output of the process.
Output | Stream connected to standard output of the process.
CloseOutput | Close the output stream of the process
CloseStdErr | Close the error stream of the process


TProcess.CloseOutput

Close the output stream of the process

Declaration

Source position: process.pp line 116

public procedure TProcess.CloseOutput; virtual;

Description

CloseOutput closes the output file descriptor of the process, that is, it closes the handle of the pipe to standard output of the process.

See also

Output | Stream connected to standard output of the process.
Input | Stream connected to standard input of the process.
StdErr | Stream connected to standard diagnostic output of the process.
CloseInput | Close the input stream of the process
CloseStdErr | Close the error stream of the process


TProcess.CloseStderr

Close the error stream of the process

Declaration

Source position: process.pp line 117

public procedure TProcess.CloseStderr; virtual;

Description

CloseStdErr closes the standard error file descriptor of the process, that is, it closes the handle of the pipe to standard error output of the process.

See also

Output | Stream connected to standard output of the process.
Input | Stream connected to standard input of the process.
StdErr | Stream connected to standard diagnostic output of the process.
CloseInput | Close the input stream of the process
CloseStdErr | Close the error stream of the process


TProcess.CommandLine

Command-line to execute (deprecated)

Declaration

Source position: process.pp line 139

published property TProcess.CommandLine:
  read FCommandLine
  write SetCommandLine;

Description

CommandLine is deprecated. To avoid problems with command-line options with spaces in them and the quoting problems that this entails, it has been superseded by the properties TProcess.Executable and TProcess.Parameters , which should be used instead of CommandLine. New code should leave CommandLine empty.

CommandLine is the command-line to be executed: this is the name of the program to be executed, followed by any options it should be passed.

If the command to be executed or any of the arguments contains whitespace (space, tab character, linefeed character) it should be enclosed in single or double quotes.

If no absolute pathname is given for the command to be executed, it is searched for in the PATH environment variable. On Windows, the current directory always will be searched first. On other platforms, this is not so.

Note that either CommandLine or ApplicationName must be set prior to calling Execute.

See also

TProcess.ApplicationName | Name of the application to start (deprecated)
TProcess.Executable | Executable name. Supersedes CommandLine and ApplicationName.
TProcess.Parameters | Command-line argumens. Supersedes CommandLine.


TProcess.ConsoleTitle

Title of the console window

Declaration

Source position: process.pp line 142

published property TProcess.ConsoleTitle:
  read FConsoleTitle
  write FConsoleTitle;

Description

ConsoleTitle is used on Windows when executing a console application: it specifies the title caption of the console window. On other platforms, this property is currently ignored.

Changing this property after the process was started has no effect.

See also

TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)


TProcess.Create

Create a new instance of the TProcess class.

Declaration

Source position: process.pp line 112

public constructor TProcess.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the instance.

Description

Create creates a new instance of the TProcess class. After calling the inherited constructor, it simply sets some default values.


TProcess.CurrentDirectory

Working directory of the process.

Declaration

Source position: process.pp line 143

published property TProcess.CurrentDirectory:
  read FCurrentDirectory
  write FCurrentDirectory;

Description

CurrentDirectory specifies the working directory of the newly started process.

Changing this property after the process was started has no effect.

See also

TProcess.Environment

Environment variables for the new process


TProcess.Desktop

Desktop on which to start the process.

Declaration

Source position: process.pp line 144

published property TProcess.Desktop:
  read FDesktop
  write FDesktop;

Description

DeskTop is used on Windows to determine on which desktop the process' main window should be shown. Leaving this empty means the process is started on the same desktop as the currently running process.

Changing this property after the process was started has no effect.

On unix, this parameter is ignored.

See also

TProcess.Input | Stream connected to standard input of the process.
TProcess.Output | Stream connected to standard output of the process.
TProcess.StdErr | Stream connected to standard diagnostic output of the process.


TProcess.Destroy

Destroy this instance of TProcess

Declaration

Source position: process.pp line 113

public destructor TProcess.Destroy; override;

Description

Destroy cleans up this instance of TProcess. Prior to calling the inherited destructor, it cleans up any streams that may have been created. If a process was started and is still executed, it is not stopped, but the standard input/output/stderr streams are no longer available, because they have been destroyed.

Errors

None.

See also

Create

Create a new instance of the TProcess class.


TProcess.Environment

Environment variables for the new process

Declaration

Source position: process.pp line 145

published property TProcess.Environment: TStrings
  read FEnvironment
  write SetEnvironment;

Description

Environment contains the environment for the new process; it's a list of Name=Value pairs, one per line.

If it is empty, the environment of the current process is passed on to the new process.

See also

TProcess.Options

Options to be used when starting the process.


TProcess.Executable

Executable name. Supersedes CommandLine and ApplicationName.

Declaration

Source position: process.pp line 140

published property TProcess.Executable:
  read FExecutable
  write FExecutable;

Description

Executable is the name of the executable to start. It should not contain any command-line arguments. If no path is given, it will be searched in the PATH environment variable.

The extension must be given, none will be added by the component itself. It may be that the OS adds the extension, but this behaviour is not guaranteed.

Arguments should be passed in TProcess.Parameters.

Executable supersedes the TProcess.CommandLine and TProcess.ApplicationName properties, which have been deprecated. However, if either of CommandLine or ApplicationName is specified, they will be used instead of Executable.

See also

CommandLine | Command-line to execute (deprecated)
ApplicationName | Name of the application to start (deprecated)
Parameters | Command-line argumens. Supersedes CommandLine.


TProcess.Execute

Execute the program with the given options

Declaration

Source position: process.pp line 114

public procedure TProcess.Execute; virtual;

Description

Execute actually executes the program as specified in CommandLine, applying as much as of the specified options as supported on the current platform.

If the poWaitOnExit option is specified in Options, then the call will only return when the program has finished executing (or if an error occured). If this option is not given, the call returns immediatly, but the WaitOnExit call can be used to wait for it to close, or the Running call can be used to check whether it is still running.

The TProcess.Terminate call can be used to terminate the program if it is still running, or the Suspend call can be used to temporarily stop the program's execution.

The ExitStatus function can be used to check the program's exit status, after it has stopped executing.

Errors

On error a EProcess exception is raised.

See also

TProcess.Running | Determines wheter the process is still running.
TProcess.WaitOnExit | Wait for the program to stop executing.
TProcess.Terminate | Terminate a running process
TProcess.Suspend | Suspend a running process
TProcess.Resume | Resume execution of a suspended process
TProcess.ExitStatus | Exit status of the process.


TProcess.ExitStatus

Exit status of the process.

Declaration

Source position: process.pp line 131

public property TProcess.ExitStatus: Integer
  read GetExitStatus;

Description

ExitStatus contains the exit status as reported by the process when it stopped executing. The value of this property is only meaningful when the process is no longer running. If it is not running then the value is zero.

See also

TProcess.Running | Determines wheter the process is still running.
TProcess.Terminate | Terminate a running process


TProcess.FillAttribute

Color attributes of the characters in the console window (Windows only)

Declaration

Source position: process.pp line 157

published property TProcess.FillAttribute: Cardinal
  read FFillAttribute
  write FFillAttribute;

Description

FillAttribute is a WORD value which specifies the background and foreground colors of the console window.

See also

TProcess.WindowHeight | Height of the process main window
TProcess.WindowWidth | Height of the process main window (Windows only)
TProcess.WindowLeft | X-coordinate of the initial window (Windows only)
TProcess.WindowTop | Y-coordinate of the initial window (Windows only)
TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)
TProcess.StartupOptions | Additional (Windows) startup options


TProcess.Handle

Handle of the process

Declaration

Source position: process.pp line 123

public property TProcess.Handle: THandle
  read FProcessHandle;

Description

Handle identifies the process. In Unix systems, this is the process ID. On windows, this is the process handle. It can be used to signal the process.

The handle is only valid after TProcess.Execute has been called. It is not reset after the process stopped.

See also

TProcess.ThreadHandle | Main process thread handle
TProcess.ProcessID | ID of the process.
TProcess.ThreadID | ID of the main process thread


TProcess.InheritHandles

Should the created process inherit the open handles of the current process.

Declaration

Source position: process.pp line 132

public property TProcess.InheritHandles: Boolean
  read FInheritHandles
  write FInheritHandles;

Description

InheritHandles determines whether the created process inherits the open handles of the current process (value True) or not (False).

On Unix, setting this variable has no effect.

See also

TProcess.InPut | Stream connected to standard input of the process.
TProcess.Output | Stream connected to standard output of the process.
TProcess.StdErr | Stream connected to standard diagnostic output of the process.


TProcess.Input

Stream connected to standard input of the process.

Declaration

Source position: process.pp line 128

public property TProcess.Input: TOutputPipeStream
  read FInputStream;

Description

Input is a stream which is connected to the process' standard input file handle. Anything written to this stream can be read by the process.

The Input stream is only instantiated when the poUsePipes flag is used in Options.

Note that writing to the stream may cause the calling process to be suspended when the created process is not reading from it's input, or to cause errors when the process has terminated.

See also

TProcess.OutPut | Stream connected to standard output of the process.
TProcess.StdErr | Stream connected to standard diagnostic output of the process.
TProcess.Options | Options to be used when starting the process.
TProcessOption | Options to be used when a process is started.


TProcess.OnForkEvent

Event triggered after fork occurred on Linux

Declaration

Source position: process.pp line 134

public property TProcess.OnForkEvent: TProcessForkEvent
  read FForkEvent
  write FForkEvent;

Description

OnForkEvent is triggered after the fpForkcall in the child process. It can be used to e.g. close file descriptors and make changes to other resources before the fpexecv call. This event is not used on windows.

See also

Output | Stream connected to standard output of the process.
Input | Stream connected to standard input of the process.
StdErr | Stream connected to standard diagnostic output of the process.
CloseInput | Close the input stream of the process
CloseStdErr | Close the error stream of the process
TProcessForkEvent | Prototype for TProcess.OnForkEvent event handler


TProcess.Options

Options to be used when starting the process.

Declaration

Source position: process.pp line 146

published property TProcess.Options: TProcessOptions
  read FProcessOptions
  write SetProcessOptions;

Description

Options determine how the process is started. They should be set before the Execute call is made.

Option | Meaning
poRunSuspended | Start the process in suspended state.
poWaitOnExit | Wait for the process to terminate before returning.
poUsePipes | Use pipes to redirect standard input and output.
poStderrToOutPut | Redirect standard error to the standard output stream.
poNoConsole | Do not allow access to the console window for the process (Win32 only)
poNewConsole | Start a new console window for the process (Win32 only)
poDefaultErrorMode | Use default error handling.
poNewProcessGroup | Start the process in a new process group (Win32 only)
poDebugProcess | Allow debugging of the process (Win32 only)
poDebugOnlyThisProcess | Do not follow processes started by this process (Win32 only)

See also

TProcessOption | Options to be used when a process is started.
TProcessOptions | Set of TProcessOption.
TProcess.Priority | Priority at which the process is running.
TProcess.StartUpOptions | Additional (Windows) startup options


TProcess.Output

Stream connected to standard output of the process.

Declaration

Source position: process.pp line 129

public property TProcess.Output: TInputPipeStream
  read FOutputStream;

Description

Output is a stream which is connected to the process' standard output file handle. Anything written to standard output by the created process can be read from this stream.

The Output stream is only instantiated when the poUsePipes flag is used in Options.

The Output stream also contains any data written to standard diagnostic output (stderr) when the poStdErrToOutPut flag is used in Options.

Note that reading from the stream may cause the calling process to be suspended when the created process is not writing anything to standard output, or to cause errors when the process has terminated.

See also

TProcess.InPut | Stream connected to standard input of the process.
TProcess.StdErr | Stream connected to standard diagnostic output of the process.
TProcess.Options | Options to be used when starting the process.
TProcessOption | Options to be used when a process is started.


TProcess.Parameters

Command-line argumens. Supersedes CommandLine.

Declaration

Source position: process.pp line 141

published property TProcess.Parameters: TStrings
  read FParameters
  write SetParameters;

Description

Parameters contains the command-line arguments that should be passed to the program specified in Executable.

Commandline arguments should be specified one per item in Parameters: each item in Parameters will be passed as a separate command-line item. It is therefor not necessery to quote whitespace in the items. As a consequence, it is not allowed to specify multiple command-line parameters in 1 item in the stringlist. If a command needs 2 options -t and -s, the following is not correct:

With Parameters do
  begin
  add('-t -s');
  end;

Instead, the code should read:

With Parameters do
  begin
  add('-t');
  Add('-s');
  end;
Remark: Note that Parameters is ignored if either of CommandLine or ApplicationName is specified. It can only be used with Executable.
Remark: The idea of using Parameters is that they are passed unmodified to the operating system. On windows, a single command-line string must be constructed, and each parameter is are surrounded by double quote characters if it contains a space. The programmer may not quote parameters with spaces.

See also

Executable | Executable name. Supersedes CommandLine and ApplicationName.
CommandLine | Command-line to execute (deprecated)
ApplicationName | Name of the application to start (deprecated)


TProcess.Priority

Priority at which the process is running.

Declaration

Source position: process.pp line 147

published property TProcess.Priority: TProcessPriority
  read FProcessPriority
  write FProcessPriority;

Description

Priority determines the priority at which the process is running.

Priority | Meaning
ppHigh | The process runs at higher than normal priority.
ppIdle | The process only runs when the system is idle (i.e. has nothing else to do)
ppNormal | The process runs at normal priority.
ppRealTime | The process runs at real-time priority.

Note that not all priorities can be set by any user. Usually, only users witha dministrative rights (the root user on Unix) can set a higher process priority.

On unix, the process priority is mapped on Nice values as follows:

Priority | Nice value
ppHigh | 20
ppIdle | 20
ppNormal | 0
ppRealTime | -20

See also

TProcessPriority

type determining the priority of the newly started process.


TProcess.ProcessHandle

Alias for Handle

Declaration

Source position: process.pp line 124

public property TProcess.ProcessHandle: THandle
  read FProcessHandle;

Description

ProcessHandle equals Handle and is provided for completeness only.

See also

TProcess.Handle | Handle of the process
TProcess.ThreadHandle | Main process thread handle
TProcess.ProcessID | ID of the process.
TProcess.ThreadID | ID of the main process thread


TProcess.ProcessID

ID of the process.

Declaration

Source position: process.pp line 126

public property TProcess.ProcessID: Integer
  read FProcessID;

Description

ProcessID is the ID of the process. It is the same as the handle of the process on Unix systems, but on Windows it is different from the process Handle.

The ID is only valid after TProcess.Execute has been called. It is not reset after the process stopped.

See also

TProcess.Handle | Handle of the process
TProcess.ThreadHandle | Main process thread handle
TProcess.ThreadID | ID of the main process thread


TProcess.Resume

Resume execution of a suspended process

Declaration

Source position: process.pp line 118

public function TProcess.Resume: Integer; virtual;

Function result

0 on success, nonzero otherwise.

Description

Resume should be used to let a suspended process resume it's execution. It should be called in particular when the poRunSuspended flag is set in Options.

Errors

None.

See also

TProcess.Suspend | Suspend a running process
TProcess.Options | Options to be used when starting the process.
TProcess.Execute | Execute the program with the given options
TProcess.Terminate | Terminate a running process


TProcess.Running

Determines wheter the process is still running.

Declaration

Source position: process.pp line 149

published property TProcess.Running: Boolean
  read GetRunning;

Description

Running can be read to determine whether the process is still running.

See also

TProcess.Terminate | Terminate a running process
TProcess.Active | Start or stop the process.
TProcess.ExitStatus | Exit status of the process.


TProcess.ShowWindow

Determines how the process main window is shown (Windows only)

Declaration

Source position: process.pp line 150

published property TProcess.ShowWindow: TShowWindowOptions
  read FShowWindow
  write SetShowWindow;

Description

ShowWindow determines how the process' main window is shown. It is useful only on Windows.

Option | Meaning
swoNone | Allow system to position the window.
swoHIDE | The main window is hidden.
swoMaximize | The main window is maximized.
swoMinimize | The main window is minimized.
swoRestore | Restore the previous position.
swoShow | Show the main window.
swoShowDefault | When showing Show the main window on a default position
swoShowMaximized | The main window is shown maximized
swoShowMinimized | The main window is shown minimized
swoshowMinNOActive | The main window is shown minimized but not activated
swoShowNA | The main window is shown but not activated
swoShowNoActivate | The main window is shown but not activated
swoShowNormal | The main window is shown normally


TProcess.StartupOptions

Additional (Windows) startup options

Declaration

Source position: process.pp line 148

published property TProcess.StartupOptions: TStartupOptions
  read FStartupOptions
  write FStartupOptions;

Description

StartUpOptions contains additional startup options, used mostly on Windows system. They determine which other window layout properties are taken into account when starting the new process.

Priority | Meaning
suoUseShowWindow | Use the Show Window options specified in ShowWindow
suoUseSize | Use the specified window sizes
suoUsePosition | Use the specified window sizes.
suoUseCountChars | Use the specified console character width.
suoUseFillAttribute | Use the console fill attribute specified in FillAttribute.

See also

TProcess.ShowWindow | Determines how the process main window is shown (Windows only)
TProcess.WindowHeight | Height of the process main window
TProcess.WindowWidth | Height of the process main window (Windows only)
TProcess.WindowLeft | X-coordinate of the initial window (Windows only)
TProcess.WindowTop | Y-coordinate of the initial window (Windows only)
TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)
TProcess.FillAttribute | Color attributes of the characters in the console window (Windows only)


TProcess.Stderr

Stream connected to standard diagnostic output of the process.

Declaration

Source position: process.pp line 130

public property TProcess.Stderr: TInputPipeStream
  read FStderrStream;

Description

StdErr is a stream which is connected to the process' standard diagnostic output file handle (StdErr). Anything written to standard diagnostic output by the created process can be read from this stream.

The StdErr stream is only instantiated when the poUsePipes flag is used in Options.

The Output stream equals the Output when the poStdErrToOutPut flag is used in Options.

Note that reading from the stream may cause the calling process to be suspended when the created process is not writing anything to standard output, or to cause errors when the process has terminated.

See also

TProcess.InPut | Stream connected to standard input of the process.
TProcess.Output | Stream connected to standard output of the process.
TProcess.Options | Options to be used when starting the process.
TProcessOption | Options to be used when a process is started.


TProcess.Suspend

Suspend a running process

Declaration

Source position: process.pp line 119

public function TProcess.Suspend: Integer; virtual;

Function result

0 on success, nonzero otherwise.

Description

Suspend suspends a running process. If the call is successful, the process is suspended: it stops running, but can be made to execute again using the Resume call.

Suspend is fundamentally different from TProcess.Terminate which actually stops the process.

Errors

On error, a nonzero result is returned.

See also

TProcess.Options | Options to be used when starting the process.
TProcess.Resume | Resume execution of a suspended process
TProcess.Terminate | Terminate a running process
TProcess.Execute | Execute the program with the given options


TProcess.Terminate

Terminate a running process

Declaration

Source position: process.pp line 120

public function TProcess.Terminate(

  AExitCode: Integer

):Boolean; virtual;

Arguments

AExitCode

Exit status to report (Windows only)

Function result

0 on succes, nonzero for failure.

Description

Terminate stops the execution of the running program. It effectively stops the program.

On Windows, the program will report an exit code of AExitCode, on other systems, this value is ignored.

Errors

On error, a nonzero value is returned.

See also

TProcess.ExitStatus | Exit status of the process.
TProcess.Suspend | Suspend a running process
TProcess.Execute | Execute the program with the given options
TProcess.WaitOnExit | Wait for the program to stop executing.


TProcess.ThreadHandle

Main process thread handle

Declaration

Source position: process.pp line 125

public property TProcess.ThreadHandle: THandle
  read FThreadHandle;

Description

ThreadHandle is the main process thread handle. On Unix, this is the same as the process ID, on Windows, this may be a different handle than the process handle.

The handle is only valid after TProcess.Execute has been called. It is not reset after the process stopped.

See also

TProcess.Handle | Handle of the process
TProcess.ProcessID | ID of the process.
TProcess.ThreadID | ID of the main process thread


TProcess.ThreadID

ID of the main process thread

Declaration

Source position: process.pp line 127

public property TProcess.ThreadID: Integer
  read FThreadID;

Description

ProcessID is the ID of the main process thread. It is the same as the handle of the main proces thread (or the process itself) on Unix systems, but on Windows it is different from the thread Handle.

The ID is only valid after TProcess.Execute has been called. It is not reset after the process stopped.

See also

TProcess.ProcessID | ID of the process.
TProcess.Handle | Handle of the process
TProcess.ThreadHandle | Main process thread handle


TProcess.WaitOnExit

Wait for the program to stop executing.

Declaration

Source position: process.pp line 121

public function TProcess.WaitOnExit: Boolean;

Function result

True means the process was successfully waited on, False indicates some error occurred.

Description

WaitOnExit waits for the running program to exit. It returns True if the wait was succesful, or False if there was some error waiting for the program to exit.

Note that the return value of this function has changed. The old return value was a DWord with a platform dependent error code. To make things consistent and cross-platform, a boolean return type was used.

Errors

On error, False is returned. No extended error information is available, as it is highly system dependent.

See also

TProcess.ExitStatus | Exit status of the process.
TProcess.Terminate | Terminate a running process
TProcess.Running | Determines wheter the process is still running.


TProcess.WindowColumns

Number of columns in console window (windows only)

Declaration

Source position: process.pp line 151

published property TProcess.WindowColumns: Cardinal
  read dwXCountChars
  write SetWindowColumns;

Description

WindowColumns is the number of columns in the console window, used to run the command in. This property is only effective if suoUseCountChars is specified in StartupOptions

See also

TProcess.WindowHeight | Height of the process main window
TProcess.WindowWidth | Height of the process main window (Windows only)
TProcess.WindowLeft | X-coordinate of the initial window (Windows only)
TProcess.WindowTop | Y-coordinate of the initial window (Windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)
TProcess.FillAttribute | Color attributes of the characters in the console window (Windows only)
TProcess.StartupOptions | Additional (Windows) startup options


TProcess.WindowHeight

Height of the process main window

Declaration

Source position: process.pp line 152

published property TProcess.WindowHeight: Cardinal
  read dwYSize
  write SetWindowHeight;

Description

WindowHeight is the initial height (in pixels) of the process' main window. This property is only effective if suoUseSize is specified in StartupOptions

See also

TProcess.WindowWidth | Height of the process main window (Windows only)
TProcess.WindowLeft | X-coordinate of the initial window (Windows only)
TProcess.WindowTop | Y-coordinate of the initial window (Windows only)
TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)
TProcess.FillAttribute | Color attributes of the characters in the console window (Windows only)
TProcess.StartupOptions | Additional (Windows) startup options


TProcess.WindowLeft

X-coordinate of the initial window (Windows only)

Declaration

Source position: process.pp line 153

published property TProcess.WindowLeft: Cardinal
  read dwX
  write SetWindowLeft;

Description

WindowLeft is the initial X coordinate (in pixels) of the process' main window, relative to the left border of the desktop. This property is only effective if suoUsePosition is specified in StartupOptions

See also

TProcess.WindowHeight | Height of the process main window
TProcess.WindowWidth | Height of the process main window (Windows only)
TProcess.WindowTop | Y-coordinate of the initial window (Windows only)
TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)
TProcess.FillAttribute | Color attributes of the characters in the console window (Windows only)
TProcess.StartupOptions | Additional (Windows) startup options


TProcess.WindowRect

Positions for the main program window.

Declaration

Source position: process.pp line 122

public property TProcess.WindowRect: Trect
  read GetWindowRect
  write SetWindowRect;

Description

WindowRect can be used to specify the position of


TProcess.WindowRows

Number of rows in console window (Windows only)

Declaration

Source position: process.pp line 154

published property TProcess.WindowRows: Cardinal
  read dwYCountChars
  write SetWindowRows;

Description

WindowRows is the number of rows in the console window, used to run the command in. This property is only effective if suoUseCountChars is specified in StartupOptions

See also

TProcess.WindowHeight | Height of the process main window
TProcess.WindowWidth | Height of the process main window (Windows only)
TProcess.WindowLeft | X-coordinate of the initial window (Windows only)
TProcess.WindowTop | Y-coordinate of the initial window (Windows only)
TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.FillAttribute | Color attributes of the characters in the console window (Windows only)
TProcess.StartupOptions | Additional (Windows) startup options


TProcess.WindowTop

Y-coordinate of the initial window (Windows only)

Declaration

Source position: process.pp line 155

published property TProcess.WindowTop: Cardinal
  read dwY
  write SetWindowTop;

Description

WindowTop is the initial Y coordinate (in pixels) of the process' main window, relative to the top border of the desktop. This property is only effective if suoUsePosition is specified in StartupOptions

See also

TProcess.WindowHeight | Height of the process main window
TProcess.WindowWidth | Height of the process main window (Windows only)
TProcess.WindowLeft | X-coordinate of the initial window (Windows only)
TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)
TProcess.FillAttribute | Color attributes of the characters in the console window (Windows only)
TProcess.StartupOptions | Additional (Windows) startup options


TProcess.WindowWidth

Height of the process main window (Windows only)

Declaration

Source position: process.pp line 156

published property TProcess.WindowWidth: Cardinal
  read dwXSize
  write SetWindowWidth;

Description

WindowWidth is the initial width (in pixels) of the process' main window. This property is only effective if suoUseSize is specified in StartupOptions

See also

TProcess.WindowHeight | Height of the process main window
TProcess.WindowLeft | X-coordinate of the initial window (Windows only)
TProcess.WindowTop | Y-coordinate of the initial window (Windows only)
TProcess.WindowColumns | Number of columns in console window (windows only)
TProcess.WindowRows | Number of rows in console window (Windows only)
TProcess.FillAttribute | Color attributes of the characters in the console window (Windows only)
TProcess.StartupOptions | Additional (Windows) startup options


TProcess.XTermProgram

XTerm program to use (unix only)

Declaration

Source position: process.pp line 158

published property TProcess.XTermProgram:
  read FXTermProgram
  write FXTermProgram;

Description

XTermProgram can be used to specify the console program to use when poConsole is specified in TProcess.Options.

If none is specified, DetectXTerm is used to detect the terminal program to use. the list specified in TryTerminals is tried. If none is found, then the DESKTOP_SESSION environment variable is examined:

kde
konsole is used if it is found.
gnome
gnome-terminal is used if it is found
windowmaker
aterm or xterm are used if found.

If after all this, no terminal is found, then a list of default programs is tested: 'x-terminal-emulator','xterm','aterm','wterm','rxvt'.

See also

TProcess.Options | Options to be used when starting the process.
DetectXTerm | Detect the terminal program.


TProcessForkEvent

Prototype for TProcess.OnForkEvent event handler

Declaration

Source position: process.pp line 45

type TProcessForkEvent = procedure;

Description

TProcessForkEvent is the prototype for TProcess.OnForkEvent. It is a simple procedure, as the idea is that only process-global things should be performed in this event handler.

See also

TProcess.OnForkEvent

Event triggered after fork occurred on Linux


TProcessOption

Options to be used when a process is started.

Declaration

Source position: process.pp line 24

type TProcessOption = (
poRunSuspended, | Start the process in suspended state.
poWaitOnExit, | Wait for the process to terminate before returning.
poUsePipes, | Use pipes to redirect standard input and output.
poStderrToOutPut, | Redirect standard error to the standard output stream.
poNoConsole, | Do not allow access to the console window for the process (Win32 only)
poNewConsole, | Start a new console window for the process (Win32 only)
poDefaultErrorMode, | Use default error handling.
poNewProcessGroup, | Start the process in a new process group (Win32 only)
poDebugProcess, | Allow debugging of the process (Win32 only)
poDebugOnlyThisProcess | Do not follow processes started by this process (Win32 only)
);

Description

When a new process is started using TProcess.Execute, these options control the way the process is started. Note that not all options are supported on all platforms.

See also

TProcessOptions | Set of TProcessOption.
TShowWindowOptions | Description of the main window of the new process.


TProcessOptions

Set of TProcessOption.

Declaration

Source position: process.pp line 39

type TProcessOptions = set of (
poRunSuspended, | Start the process in suspended state.
poWaitOnExit, | Wait for the process to terminate before returning.
poUsePipes, | Use pipes to redirect standard input and output.
poStderrToOutPut, | Redirect standard error to the standard output stream.
poNoConsole, | Do not allow access to the console window for the process (Win32 only)
poNewConsole, | Start a new console window for the process (Win32 only)
poDefaultErrorMode, | Use default error handling.
poNewProcessGroup, | Start the process in a new process group (Win32 only)
poDebugProcess, | Allow debugging of the process (Win32 only)
poDebugOnlyThisProcess | Do not follow processes started by this process (Win32 only)
);


TProcessPriority

type determining the priority of the newly started process.

Declaration

Source position: process.pp line 37

type TProcessPriority = (
ppHigh, | The process runs at higher than normal priority.
ppIdle, | The process only runs when the system is idle (i.e. has nothing else to do)
ppNormal, | The process runs at normal priority.
ppRealTime | The process runs at real-time priority.
);

Description

This enumerated type determines the priority of the newly started process. It translates to default platform specific constants. If finer control is needed, then platform-dependent mechanism need to be used to set the priority.


TPropInfoList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class for keeping property information

Declaration

Source position: rttiutils.pp line 43

type TPropInfoList = class(TObject)
public
constructor Create(); | Create a new instance of TPropInfoList
destructor Destroy; override; | Remove the TPropInfoList instance from memory
function Contains(); | Check whether a certain property is included
function Find(); | Retrieve property information based on name
procedure Delete(); | Delete property information from the list
procedure Intersect(); | Intersect 2 property lists
property Count: Integer; [r] | Number of items in the list
property Items: PPropInfo; default; [r] | Indexed access to the property type pointers
end;

Inheritance

TPropInfoList

Class for keeping property information
|

TObject

Description

TPropInfoList is a class which can be used to maintain a list with information about published properties of a class (or an instance). It is used internally by TPropsStorage

See also

TPropsStorage

Property storage mechanism


TPropInfoList
 | ro | Count
 | ro | Items
TObject


ro | Count (TPropInfoList)
ro |


TPropInfoList
 | Create
 | Destroy
 | Contains
 | Find
 | Delete
 | Intersect
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Contains (TPropInfoList)

Create (TObject)

Create (TPropInfoList)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Delete (TPropInfoList)

Destroy (TObject)

Destroy (TPropInfoList)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Find (TPropInfoList)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

Intersect (TPropInfoList)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TPropInfoList

TObject


TPropInfoList.Contains

Check whether a certain property is included

Declaration

Source position: rttiutils.pp line 52

public function TPropInfoList.Contains(

  P: PPropInfo

):Boolean;

Arguments

P

Property info to check for

Function result

True if P is in the list of properties

Description

Contains checks whether P is included in the list of properties, and returns True if it does. If P cannot be found, False is returned.

See also

Find | Retrieve property information based on name
Intersect | Intersect 2 property lists


TPropInfoList.Count

Number of items in the list

Declaration

Source position: rttiutils.pp line 56

public property TPropInfoList.Count: Integer
  read FCount;

Description

Count is the number of property type pointers in the list.

See also

Items

Indexed access to the property type pointers


TPropInfoList.Create

Create a new instance of TPropInfoList

Declaration

Source position: rttiutils.pp line 50

public constructor TPropInfoList.Create(

  AObject: TObject;

  Filter: TTypeKinds

);

Arguments

AObject | Object whose properties should be listed
Filter | Filter on the kind of properties to retrieve

Description

Create allocates and initializes a new instance of TPropInfoList on the heap. It retrieves a list of published properties from AObject: if Filter is empty, then all properties are retrieved. If it is not empty, then only properties of the kind specified in the set are retrieved. Instance should not be Nil

See also

Destroy

Remove the TPropInfoList instance from memory


TPropInfoList.Delete

Delete property information from the list

Declaration

Source position: rttiutils.pp line 54

public procedure TPropInfoList.Delete(

  Index: Integer

);

Arguments

Index

Index of item to delete.

Description

Delete deletes the property information at position Index from the list. It's mainly of use in the Intersect call.

Errors

No checking on the validity of Index is performed.

See also

Intersect

Intersect 2 property lists


TPropInfoList.Destroy

Remove the TPropInfoList instance from memory

Declaration

Source position: rttiutils.pp line 51

public destructor TPropInfoList.Destroy; override;

Description

Destroy cleans up the internal structures maintained by TPropInfoList and then calls the inherited Destroy.

See also

Create

Create a new instance of TPropInfoList


TPropInfoList.Find

Retrieve property information based on name

Declaration

Source position: rttiutils.pp line 53

public function TPropInfoList.Find(

  const AName:

):PPropInfo;

Arguments

AName

Name of property

Function result

Pointer to property type information for AName, or Nil

Description

Find returns a pointer to the type information of the property AName. If no such information is available, the function returns Nil. The search is performed case insensitive.

See also

Intersect | Intersect 2 property lists
Contains | Check whether a certain property is included


TPropInfoList.Intersect

Intersect 2 property lists

Declaration

Source position: rttiutils.pp line 55

public procedure TPropInfoList.Intersect(

  List: TPropInfoList

);

Arguments

List

List to intersect with

Description

Intersect reduces the list of properties to the ones also contained in List, i.e. all properties which are not also present in List are removed.

See also

Delete | Delete property information from the list
Contains | Check whether a certain property is included


TPropInfoList.Items

Indexed access to the property type pointers

Declaration

Source position: rttiutils.pp line 57

public property TPropInfoList.Items: PPropInfo
  read Get;
  default;

Description

Items provides access to the property type pointers stored in the list. Index runs from 0 to Count-1.

See also

Count

Number of items in the list


TPropsStorage

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Property storage mechanism

Declaration

Source position: rttiutils.pp line 66

type TPropsStorage = class(TObject)
public
procedure StoreAnyProperty(); | Store a property value
procedure LoadAnyProperty(); | Load a property value
procedure StoreProperties(); | Store a list of properties
procedure LoadProperties(); | Load a list of properties
procedure LoadObjectsProps(); | Load a list of component properties
procedure StoreObjectsProps(); | Store a list of component properties
property AObject: TObject; [rw] | Object to load or store properties from
property Prefix: ; [rw] | Prefix to use in storage
property Section: ; [rw] | Section name for storage
property OnReadString: TReadStrEvent; [rw] | Read a string value from storage
property OnWriteString: TWriteStrEvent; [rw] | Write a string value to storage
property OnEraseSection: TEraseSectEvent; [rw] | Erase a section in storage
end;

Inheritance

TPropsStorage

Property storage mechanism
|

TObject

Description

TPropsStorage provides a mechanism to store properties from any class which has published properties (usually a TPersistent descendent) in a storage mechanism.

TPropsStorage does not handle the storage by itself, instead, the storage is handled through a series of callbacks to read and/or write strings. Conversion of property types to string is handled by TPropsStorage itself: all that needs to be done is set the 3 handlers. The storage mechanism is assumed to have the structure of an .ini file : sections with key/value pairs. The three callbacks should take this into account, but they do not need to create an actual .ini file.

See also

TPropInfoList

Class for keeping property information


TPropsStorage
 | AObject
 | Prefix
 | Section
TObject


AObject (TPropsStorage)

Prefix (TPropsStorage)

Section (TPropsStorage)


TPropsStorage
 | StoreAnyProperty
 | LoadAnyProperty
 | StoreProperties
 | LoadProperties
 | LoadObjectsProps
 | StoreObjectsProps
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

LoadAnyProperty (TPropsStorage)

LoadObjectsProps (TPropsStorage)

LoadProperties (TPropsStorage)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StoreAnyProperty (TPropsStorage)

StoreObjectsProps (TPropsStorage)

StoreProperties (TPropsStorage)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TPropsStorage
 | OnReadString
 | OnWriteString
 | OnEraseSection
TObject


OnEraseSection (TPropsStorage)

OnReadString (TPropsStorage)

OnWriteString (TPropsStorage)


TPropsStorage.AObject

Object to load or store properties from

Declaration

Source position: rttiutils.pp line 116

public property TPropsStorage.AObject: TObject
  read FObject
  write FObject;

Description

AObject is the object instance whose properties will be loaded or stored with any of the methods in the TPropsStorage class. Note that a call to StoreObjectProps or LoadObjectProps will destroy any value that this property might have.

See also

LoadProperties | Load a list of properties
LoadAnyProperty | Load a property value
StoreProperties | Store a list of properties
StoreAnyProperty | Store a property value
StoreObjectProps | Store a list of component properties
LoadObjectProps | Load a list of component properties


TPropsStorage.LoadAnyProperty

Load a property value

Declaration

Source position: rttiutils.pp line 111

public procedure TPropsStorage.LoadAnyProperty(

  PropInfo: PPropInfo

);

Arguments

PropInfo

Information about property to load

Description

LoadAnyProperty loads the property with information specified in PropInfo from the storage mechanism. The value is then applied to the object instance specified in the AObject property of TPropsStorage.

Errors

If the property pointer is invalid or AObject is invalid, an exception will be raised.

See also

AObject | Object to load or store properties from
StoreAnyProperty | Store a property value
LoadProperties | Load a list of properties
StoreProperties | Store a list of properties


TPropsStorage.LoadObjectsProps

Load a list of component properties

Declaration

Source position: rttiutils.pp line 114

public procedure TPropsStorage.LoadObjectsProps(

  AComponent: TComponent;

  StoredList: TStrings

);

Arguments

AComponent | Owner component of the components.
StoredList | List of components and their properties to load

Description

LoadObjectsProps loads a list of component properties, relative to AComponent: the names of the component properties to load are specified as follows:

ComponentName1.PropertyName
ComponentName2.Subcomponent1.PropertyName

The component instances will be located relative to AComponent, and must therefore be names of components owned by AComponent, followed by a valid property of these components. If the componentname is missing, the property name will be assumed to be a property of AComponent itself.

The Objects property of the stringlist should be filled with the instances of the components the property references refer to: they can be filled with the UpdateStoredList call.

For example, to load the checked state of a checkbox named 'CBCheckMe' and the caption of a button named 'BPressMe', both owned by a form, the following strings should be passed:

CBCheckMe.Checked
BPressMe.Caption

and the ACompontent should be the form component that owns the button and checkbox.

Note that this call removes the value of the AObject property.

Errors

If an invalid component is specified, an exception will be raised.

See also

UpdateStoredList | Update a stringlist with object references
StoreObjectsProps | Store a list of component properties
LoadProperties | Load a list of properties
LoadAnyProperty | Load a property value


TPropsStorage.LoadProperties

Load a list of properties

Declaration

Source position: rttiutils.pp line 113

public procedure TPropsStorage.LoadProperties(

  PropList: TStrings

);

Arguments

PropList

List with names of properties whose value should be loaded

Description

LoadProperties loads the values of all properties in PropList from the storage mechanism. The list should contain names of published properties of the AObject object.

Errors

If an invalid property name is specified, an exception will be raised.

See also

AObject | Object to load or store properties from
StoreAnyProperty | Store a property value
StoreProperties | Store a list of properties
LoadAnyProperty | Load a property value


TPropsStorage.OnEraseSection

Erase a section in storage

Declaration

Source position: rttiutils.pp line 121

public property TPropsStorage.OnEraseSection: TEraseSectEvent
  read FOnEraseSection
  write FOnEraseSection;

Description

OnEraseSection is the event handler called whenever TPropsStorage needs to clear a complete storage section. It should be set whenever stringlist properties need to be stored, or an exception will be raised.

See also

OnReadString | Read a string value from storage
OnWriteString | Write a string value to storage
TEraseSectEvent | Clear a storage section


TPropsStorage.OnReadString

Read a string value from storage

Declaration

Source position: rttiutils.pp line 119

public property TPropsStorage.OnReadString: TReadStrEvent
  read FOnReadString
  write FOnReadString;

Description

OnReadString is the event handler called whenever TPropsStorage needs to read a string from storage. It should be set whenever properties need to be loaded, or an exception will be raised.

See also

OnWriteString | Write a string value to storage
OnEraseSection | Erase a section in storage
TReadStrEvent | Callback to read strings from storage


TPropsStorage.OnWriteString

Write a string value to storage

Declaration

Source position: rttiutils.pp line 120

public property TPropsStorage.OnWriteString: TWriteStrEvent
  read FOnWriteString
  write FOnWriteString;

Description

OnWriteString is the event handler called whenever TPropsStorage needs to write a string to storage. It should be set whenever properties need to be stored, or an exception will be raised.

See also

OnReadString | Read a string value from storage
OnEraseSection | Erase a section in storage
TWriteStrEvent | Write a string to storage


TPropsStorage.Prefix

Prefix to use in storage

Declaration

Source position: rttiutils.pp line 117

public property TPropsStorage.Prefix:
  read FPrefix
  write FPrefix;

Description

Prefix is prepended to all property names to form the key name when writing a property to storage, or when reading a value from storage. This is useful when storing properties of multiple forms in a single section.

See also

TPropsStorage.Section

Section name for storage


TPropsStorage.Section

Section name for storage

Declaration

Source position: rttiutils.pp line 118

public property TPropsStorage.Section:
  read FSection
  write FSection;

Description

Section is used as the section name when writing values to storage. Note that when writing properties of subcomponents, their names will be appended to the value specified here.

See also

TPropsStorage.Section

Section name for storage


TPropsStorage.StoreAnyProperty

Store a property value

Declaration

Source position: rttiutils.pp line 110

public procedure TPropsStorage.StoreAnyProperty(

  PropInfo: PPropInfo

);

Arguments

PropInfo

Information about property to store

Description

StoreAnyProperty stores the property with information specified in PropInfo in the storage mechanism. The property value is retrieved from the object instance specified in the AObject property of TPropsStorage.

Errors

If the property pointer is invalid or AObject is invalid, an exception will be raised.

See also

AObject | Object to load or store properties from
LoadAnyProperty | Load a property value
LoadProperties | Load a list of properties
StoreProperties | Store a list of properties


TPropsStorage.StoreObjectsProps

Store a list of component properties

Declaration

Source position: rttiutils.pp line 115

public procedure TPropsStorage.StoreObjectsProps(

  AComponent: TComponent;

  StoredList: TStrings

);

Arguments

AComponent | Owner component of the components
StoredList | List of components and their properties to load

Description

StoreObjectsProps stores a list of component properties, relative to AComponent: the names of the component properties to store are specified as follows:

ComponentName1.PropertyName
ComponentName2.Subcomponent1.PropertyName

The component instances will be located relative to AComponent, and must therefore be names of components owned by AComponent, followed by a valid property of these components. If the componentname is missing, the property name will be assumed to be a property of AComponent itself.

The Objects property of the stringlist should be filled with the instances of the components the property references refer to: they can be filled with the UpdateStoredList call.

For example, to store the checked state of a checkbox named 'CBCheckMe' and the caption of a button named 'BPressMe', both owned by a form, the following strings should be passed:

CBCheckMe.Checked
BPressMe.Caption

and the ACompontent should be the form component that owns the button and checkbox.

Note that this call removes the value of the AObject property.

See also

UpdateStoredList | Update a stringlist with object references
LoadObjectsProps | Load a list of component properties
LoadProperties | Load a list of properties
LoadAnyProperty | Load a property value


TPropsStorage.StoreProperties

Store a list of properties

Declaration

Source position: rttiutils.pp line 112

public procedure TPropsStorage.StoreProperties(

  PropList: TStrings

);

Arguments

PropList

List with names of properties to store

Description

StoreProperties stores the values of all properties in PropList in the storage mechanism. The list should contain names of published properties of the AObject object.

Errors

If an invalid property name is specified, an exception will be raised.

See also

AObject | Object to load or store properties from
StoreAnyProperty | Store a property value
LoadProperties | Load a list of properties
LoadAnyProperty | Load a property value


EIPCError

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Error reporting exception

Declaration

Source position: simpleipc.pp line 160

type EIPCError = class(Exception) ;

Inheritance

EIPCError

Error reporting exception
|

Exception
|

TObject

Description

EIPCError is the exception used by the various classes in the SimpleIPC unit to report errors.


EIPCError
Exception
 | HelpContext
 | Message
TObject


EIPCError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EIPCError

Exception

TObject


TIPCClientComm

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internal client-side communication protocol

Declaration

Source position: simpleipc.pp line 120

type TIPCClientComm = class(TObject)
public
constructor Create(); virtual; | Create a new instance of the TIPCClientComm
property Owner: TSimpleIPCClient; [r] | TSimpleIPCClient instance for which communication must be handled.
procedure Connect; virtual; abstract; | Connect to the server
procedure Disconnect; virtual; abstract; | Disconnect from the server
function ServerRunning; virtual; abstract; | Check if the server is running.
procedure SendMessage(); virtual; abstract; | Send a message
end;

Inheritance

TIPCClientComm

Internal client-side communication protocol
|

TObject

Description

TIPCClientComm is an abstract component which implements the client-side communication protocol. The behaviour expected of this class must be implemented in a platform-dependent descendent class.

The TSimpleIPCClient class does not implement the messaging protocol by itself. Instead, it creates an instance of a (platform dependent) descendent of TIPCClientComm which handles the internals of the commnication protocol.

The server side of the messaging protocol is handled by the TIPCServerComm component. The descenent components must always be implemented in pairs.

See also

TSimpleIPCClient | Simple IPC client component
TIPCServerComm | Internal message communication component
TSimpleIPCServer | Simple IPC server component


TIPCClientComm

ro

Owner

TObject


TIPCClientComm
 | Create
 | Connect
 | Disconnect
 | ServerRunning
 | SendMessage
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Connect (TIPCClientComm)

Create (TObject)

Create (TIPCClientComm)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Disconnect (TIPCClientComm)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SendMessage (TIPCClientComm)

ServerRunning (TIPCClientComm)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TIPCClientComm

TObject


TIPCClientComm.Connect

Connect to the server

Declaration

Source position: simpleipc.pp line 128

public procedure TIPCClientComm.Connect; virtual; abstract;

Description

Connect must establish a communication channel with the server. The server endpoint must be constructed from the ServerID and ServerInstance properties of the owning TSimpleIPCClient instance.

Connect is called by the TSimpleIPCClient.Connect call or when the Active property is set to True

Messages can be sent only after Connect was called succesfully.

Errors

If the connection setup fails, or the connection was already set up , then an exception may be raised.

See also

TSimpleIPCClient.Connect | Connect to the server
Active | Communication channel active
Disconnect | Disconnect from the server


TIPCClientComm.Create

Create a new instance of the TIPCClientComm

Declaration

Source position: simpleipc.pp line 126

public constructor TIPCClientComm.Create(

  AOwner: TSimpleIPCClient

); virtual;

Arguments

AOwner

TSimpleIPCClient instance for which communication must be handled.

Description

Create instantiates a new instance of the TIPCClientComm class, and stores the AOwner reference to the TSimpleIPCClient instance for which it will handle communitation. It can be retrieved later using the Owner property.

See also

Owner | TSimpleIPCClient instance for which communication must be handled.
TSimpleIPCClient | Simple IPC client component


TIPCClientComm.Disconnect

Disconnect from the server

Declaration

Source position: simpleipc.pp line 129

public procedure TIPCClientComm.Disconnect; virtual; abstract;

Description

Disconnect closes the communication channel with the server. Any calls to SendMessage are invalid after Disconnect was called.

Disconnect is called by the TSimpleIPCClient.Disconnect call or when the Active property is set to False.

Messages can no longer be sent after Disconnect was called.

Errors

If the connection shutdown fails, or the connection was already shut down, then an exception may be raised.

See also

TSimpleIPCClient.Disconnect | Disconnect from the server
Active | Communication channel active
Connect | Connect to the server


TIPCClientComm.Owner

TSimpleIPCClient instance for which communication must be handled.

Declaration

Source position: simpleipc.pp line 127

public property TIPCClientComm.Owner: TSimpleIPCClient
  read FOwner;

Description

Owner is the TSimpleIPCClient instance for which the communication must be handled. It cannot be changed, and must be specified when the TIPCClientComm instance is created.

See also

TSimpleIPCClient | Simple IPC client component
TIPCClientComm.Create | Create a new instance of the TIPCClientComm


TIPCClientComm.SendMessage

Send a message

Declaration

Source position: simpleipc.pp line 131

public procedure TIPCClientComm.SendMessage(

  MsgType: TMessageType;

  Stream: TStream

); virtual; abstract;

Arguments

MsgType | Type of message
Stream | Message data

Description

SendMessage should deliver the message with type MsgType and data in Stream to the server. It should not return until the message was delivered.

Errors

If the delivery of the message fails, an exception will be raised.


TIPCClientComm.ServerRunning

Check if the server is running.

Declaration

Source position: simpleipc.pp line 130

public function TIPCClientComm.ServerRunning: Boolean; virtual; abstract;

Function result

True if the server communication channel endpoint can be reached.

Description

ServerRunning returns True if the server endpoint of the communication channel can be found, or False if not. The server endpoint should be obtained from the ServerID and InstanceID properties of the owning TSimpleIPCClient component.

See also

TSimpleIPCClient.InstanceID

TSimpleIPCClient.ServerID


TIPCClientCommClass

Class reference for TIPCClientComm

Declaration

Source position: simpleipc.pp line 133

type TIPCClientCommClass = class of TIPCClientComm;

Description

TIPCClientCommClass is used by TSimpleIPCClient to decide which kind of communication channel to set up.

See also

TSimpleIPCClient | Simple IPC client component
TIPCClientComm | Internal client-side communication protocol


TIPCServerComm

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internal message communication component

Declaration

Source position: simpleipc.pp line 46

type TIPCServerComm = class(TObject)
public
constructor Create(); virtual; | Create a new instance of the communication handler
property Owner: TSimpleIPCServer; [r] | TSimpleIPCServer instance for which to handle transport
procedure StartServer; virtual; abstract; | Start the server-side of the communication channel
procedure StopServer; virtual; abstract; | Stop the server side of the communication channel.
function PeekMessage(); virtual; abstract; | See if a message is available.
procedure ReadMessage; virtual; abstract; | Read message from the channel.
property InstanceID: ; [r] | Unique identifier for the communication channel.
end;

Inheritance

TIPCServerComm

Internal message communication component

|

TObject

Description

TIPCServerComm is an abstract component which implements the server-side communication protocol. The behaviour expected of this class must be implemented in a platform-dependent descendent class.

The TSimpleIPCServer class does not implement the messaging protocol by itself. Instead, it creates an instance of a (platform dependent) descendent of TIPCServerComm which handles the internals of the commnication protocol.

The client side of the messaging protocol is handled by the TIPCClientComm component. The descenent components must always be implemented in pairs.

See also

TSimpleIPCServer | Simple IPC server component
TIPCClientComm | Internal client-side communication protocol


TIPCServerComm
 | ro | Owner
 | ro | InstanceID
TObject


ro | InstanceID (TIPCServerComm)
ro |


TIPCServerComm
 | Create
 | StartServer
 | StopServer
 | PeekMessage
 | ReadMessage
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TIPCServerComm)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

PeekMessage (TIPCServerComm)

ReadMessage (TIPCServerComm)

SafeCallException (TObject)

StartServer (TIPCServerComm)

StopServer (TIPCServerComm)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TIPCServerComm

TObject


TIPCServerComm.Create

Create a new instance of the communication handler

Declaration

Source position: simpleipc.pp line 55

public constructor TIPCServerComm.Create(

  AOwner: TSimpleIPCServer

); virtual;

Arguments

AOwner

TSimpleIPCServer instance for which to handle transport

Description

Create initializes a new instance of the communication handler. It simply saves the AOwner parameter in the Owner property.

See also

Owner

TSimpleIPCServer instance for which to handle transport


TIPCServerComm.InstanceID

Unique identifier for the communication channel.

Declaration

Source position: simpleipc.pp line 61

public property TIPCServerComm.InstanceID:
  read GetInstanceID;

Description

InstanceID returns a textual representation which uniquely identifies the communication channel on the server. The value is system dependent, and should be usable by the client-side to establish a communication channel with this instance.


TIPCServerComm.Owner

TSimpleIPCServer instance for which to handle transport

Declaration

Source position: simpleipc.pp line 56

public property TIPCServerComm.Owner: TSimpleIPCServer
  read FOwner;

Description

Owner refers to the TSimpleIPCServer instance for which this instance of TSimpleIPCServer handles the transport. It is specified when the TIPCServerComm is created.

See also

TSimpleIPCServer

Simple IPC server component


TIPCServerComm.PeekMessage

See if a message is available.

Declaration

Source position: simpleipc.pp line 59

public function TIPCServerComm.PeekMessage(

  TimeOut: Integer

):Boolean; virtual; abstract;

Arguments

TimeOut

Number of milliseconds to wait for a message.

Function result

True if a message was available.

Description

PeekMessage can be used to see if a message is available: it returns True if a message is available. It will wait maximum TimeOut milliseconds for a message to arrive. If no message was available after this time, it will return False.

If a message was available, it can be read with the ReadMessage call.

See also

ReadMessage

Read message from the channel.


TIPCServerComm.ReadMessage

Read message from the channel.

Declaration

Source position: simpleipc.pp line 60

public procedure TIPCServerComm.ReadMessage; virtual; abstract;

Description

ReadMessage reads the message for the channel, and stores the information in the data structures in the Owner class.

ReadMessage is a blocking call: if no message is available, the program will wait till a message arrives. Use PeekMessage to see if a message is available.

See also

TSimpleIPCServer

Simple IPC server component


TIPCServerComm.StartServer

Start the server-side of the communication channel

Declaration

Source position: simpleipc.pp line 57

public procedure TIPCServerComm.StartServer; virtual; abstract;

Description

StartServer sets up the server-side of the communication channel. After StartServer was called, a client can connect to the communication channel, and send messages to the server.

It is called when the TSimpleIPC.Active property of the TSimpleIPCServer instance is set to True.

Errors

In case of an error, an EIPCError exception is raised.

See also

TSimpleIPCServer | Simple IPC server component
TSimpleIPC.Active | Communication channel active


TIPCServerComm.StopServer

Stop the server side of the communication channel.

Declaration

Source position: simpleipc.pp line 58

public procedure TIPCServerComm.StopServer; virtual; abstract;

Description

StartServer closes down the server-side of the communication channel. After StartServer was called, a client can no longer connect to the communication channel, or even send messages to the server if it was previously connected (i.e. it will be disconnected).

It is called when the TSimpleIPC.Active property of the TSimpleIPCServer instance is set to False.

Errors

In case of an error, an EIPCError exception is raised.

See also

TSimpleIPCServer | Simple IPC server component
TSimpleIPC.Active | Communication channel active


TIPCServerCommClass

Class reference for TIPCServerComm

Declaration

Source position: simpleipc.pp line 63

type TIPCServerCommClass = class of TIPCServerComm;

Description

TIPCServerCommClass is used by TSimpleIPCServer to decide which kind of communication channel to set up.

See also

TSimpleIPCServer | Simple IPC server component
TIPCServerComm | Internal message communication component


TSimpleIPC

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ancestor for client/server simple IPC classes

Declaration

Source position: simpleipc.pp line 66

type TSimpleIPC = class(TComponent)
published
property Active: Boolean; [rw] | Communication channel active
property ServerID: ; [rw] | Unique server identification
end;

Inheritance

TSimpleIPC

Ancestor for client/server simple IPC classes
|

TComponent,IUnknown,IInterfaceComponentReference
|

TPersistent
|

TObject

Description

TSimpleIPC is the common ancestor for the TSimpleIPCServer and TSimpleIPCClient classes. It implements some common properties between client and server.

See also

TSimpleIPCServer | Simple IPC server component
TSimpleIPCClient | Simple IPC client component


TSimpleIPC
pl |  | Active
pl |  | ServerID
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Active (TSimpleIPC)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
 |  | DesignInfo (TComponent)
 |  | Name (TComponent)
 | ro | Owner (TComponent)
pl |  |


TSimpleIPC
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TSimpleIPC

TComponent

TPersistent

TObject


TSimpleIPC.Active

Communication channel active

Declaration

Source position: simpleipc.pp line 81

published property TSimpleIPC.Active: Boolean
  read FActive
  write SetActive;

Description

Active can be set to True to set up the client or server end of the communication channel. For the server this means that the server end is set up, for the client it means that the client tries to connect to the server with ServerID identification.

See also

ServerID

Unique server identification


TSimpleIPC.ServerID

Unique server identification

Declaration

Source position: simpleipc.pp line 82

published property TSimpleIPC.ServerID:
  read FServerID
  write SetServerID;

Description

ServerID is the unique server identification: on the server, it determines how the server channel is set up, on the client it determines the server with which to connect.

See also

Active

Communication channel active


TSimpleIPCClient

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Simple IPC client component

Declaration

Source position: simpleipc.pp line 136

type TSimpleIPCClient = class(TSimpleIPC)
public
constructor Create(); override; | Create a new instance of TSimpleIPCClient
destructor Destroy; override; | Remove the TSimpleIPCClient instance from memory
procedure Connect; | Connect to the server
procedure Disconnect; | Disconnect from the server
function ServerRunning; | Check if the server is running.
procedure SendMessage(); | Send a message to the server
public
procedure SendStringMessage(); | Send a string message to the server
procedure SendStringMessageFmt(); | Send a formatted string message
public
property ServerInstance: ; [rw] | Server instance identification
end;

Inheritance

TSimpleIPCClient | Simple IPC client component
|
TSimpleIPC | Ancestor for client/server simple IPC classes
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TSimpleIPCClient is the client side of the simple IPC communication protocol. The client program should create a TSimpleIPCClient instance, set its ServerID property to the unique name for the server it wants to send messages to, and then set the Active property to True (or call Connect).

After the connection with the server was established, messages can be sent to the server with the SendMessage or SendStringMessage calls.

See also

TSimpleIPCServer | Simple IPC server component
TSimpleIPC | Ancestor for client/server simple IPC classes
TIPCClientComm | Internal client-side communication protocol


TSimpleIPCClient
 |  | ServerInstance
TSimpleIPC
pl |  | Active
pl |  | ServerID
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Active (TSimpleIPC)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
 |  | DesignInfo (TComponent)
 |  | Name (TComponent)
 | ro | Owner (TComponent)
pl |  | ServerID (TSimpleIPC)
 |  | ServerInstance (TSimpleIPCClient)
 |  | Tag (TComponent)
 |  | VCLComObject (TComponent)


TSimpleIPCClient
 | Create
 | Destroy
 | Connect
 | Disconnect
 | ServerRunning
 | SendMessage
 | SendStringMessage
 | SendStringMessageFmt
TSimpleIPC
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Connect (TSimpleIPCClient)

Create (TObject)

Create (TComponent)

Create (TSimpleIPCClient)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TSimpleIPCClient)

DestroyComponents (TComponent)

Destroying (TComponent)

Disconnect (TSimpleIPCClient)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SendMessage (TSimpleIPCClient)

SendStringMessage (TSimpleIPCClient)

SendStringMessageFmt (TSimpleIPCClient)

ServerRunning (TSimpleIPCClient)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TSimpleIPCClient

TSimpleIPC

TComponent

TPersistent

TObject


TSimpleIPCClient.Connect

Connect to the server

Declaration

Source position: simpleipc.pp line 148

public procedure TSimpleIPCClient.Connect;

Description

Connect connects to the server indicated in the ServerID and InstanceID properties. Connect is called automatically if the Active property is set to True.

After a successful call to Connect, messages can be sent to the server using SendMessage or SendStringMessage.

Calling Connect if the connection is already open has no effect.

Errors

If creating the connection fails, an EIPCError exception may be raised.

See also

ServerID | Unique server identification
InstanceID
Active | Communication channel active
SendMessage | Send a message to the server
SendStringMessage | Send a string message to the server
Disconnect | Disconnect from the server


TSimpleIPCClient.Create

Create a new instance of TSimpleIPCClient

Declaration

Source position: simpleipc.pp line 146

public constructor TSimpleIPCClient.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the instance

Description

Create instantiates a new instance of the TSimpleIPCClient class. It initializes the data structures needed to handle the client side of the communication.

See also

Destroy

Remove the TSimpleIPCClient instance from memory


TSimpleIPCClient.Destroy

Remove the TSimpleIPCClient instance from memory

Declaration

Source position: simpleipc.pp line 147

public destructor TSimpleIPCClient.Destroy; override;

Description

Destroy disconnects the client from the server if need be, and cleans up the internal data structures maintained by TSimpleIPCClient and then calls the inherited Destroy, which will remove the instance from memory.

Never call Destroy directly, use the Free method instead or the FreeAndNil procedure in SysUtils.

See also

Create

Create a new instance of TSimpleIPCClient


TSimpleIPCClient.Disconnect

Disconnect from the server

Declaration

Source position: simpleipc.pp line 149

public procedure TSimpleIPCClient.Disconnect;

Description

Disconnect shuts down the connection with the server as previously set up with Connect. Disconnect is called automatically if the Active property is set to False.

After a successful call to Disconnect, messages can no longer be sent to the server. Attempting to do so will result in an exception.

Calling Disconnect if there is no connection has no effect.

Errors

If creating the connection fails, an EIPCError exception may be raised.

See also

Active | Communication channel active
Connect | Connect to the server


TSimpleIPCClient.SendMessage

Send a message to the server

Declaration

Source position: simpleipc.pp line 151

public procedure TSimpleIPCClient.SendMessage(

  MsgType: TMessageType;

  Stream: TStream

);

Arguments

MsgType | Message type
Stream | Message data.

Description

SendMessage sends a message of type MsgType and data from stream to the server. The client must be connected for this call to work.

Errors

In case an error occurs, or there is no connection to the server, an EIPCError exception is raised.

See also

Connect | Connect to the server
SendStringMessage | Send a string message to the server


TSimpleIPCClient.SendStringMessage

Send a string message to the server

Declaration

Source position: line 0

procedure TSimpleIPCClient.SendStringMessage(

  const Msg:

);

procedure TSimpleIPCClient.SendStringMessage(

  MsgType: TMessageType;

  const Msg:

);

Arguments

Msg

String message

Arguments

MsgType | Message type
Msg | String message

Description

SendStringMessage sends a string message with type MsgTyp and data Msg to the server. This is a convenience function: a small wrapper around the SendMessage method

Errors

Same as for SendMessage.

See also

SendMessage | Send a message to the server
Connect | Connect to the server
SendStringMessageFmt | Send a formatted string message


TSimpleIPCClient.SendStringMessageFmt

Send a formatted string message

Declaration

Source position: line 0

procedure TSimpleIPCClient.SendStringMessageFmt(

  const Msg: ;

  Args: array of Const

);

procedure TSimpleIPCClient.SendStringMessageFmt(

  MsgType: TMessageType;

  const Msg: ;

  Args: array of Const

);

Arguments

Msg | Format string for message
Args | Arguments to format string with

Arguments

MsgType | Message type.
Msg | Format string for message
Args | Arguments to format string with

Description

SendStringMessageFmt sends a string message with type MsgTyp and message formatted from Msg and Args to the server. This is a convenience function: a small wrapper around the SendStringMessage method

Errors

Same as for SendMessage.

See also

SendMessage | Send a message to the server
Connect | Connect to the server
SendStringMessage | Send a string message to the server


TSimpleIPCClient.ServerInstance

Server instance identification

Declaration

Source position: simpleipc.pp line 156

public property TSimpleIPCClient.ServerInstance:
  read FServerInstance
  write SetServerInstance;

Description

ServerInstance should be used in case a particular instance of the server identified with ServerID should be contacted. This must be used if the server has its GLobal property set to False, and should match the server's InstanceID property.

See also

ServerID | Unique server identification
GLobal | Is the server reachable to all users or not
InstanceID | Instance ID


TSimpleIPCClient.ServerRunning

Check if the server is running.

Declaration

Source position: simpleipc.pp line 150

public function TSimpleIPCClient.ServerRunning: Boolean;

Function result

True if the server can be reached

Description

ServerRunning verifies if the server indicated in the ServerID and InstanceID properties is running. It returns True if the server communication endpoint can be reached, False otherwise. This function can be called before a connection is made.

See also

Connect

Connect to the server


TSimpleIPCServer

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Simple IPC server component

Declaration

Source position: simpleipc.pp line 87

type TSimpleIPCServer = class(TSimpleIPC)
public
constructor Create(); override; | Create a new instance of TSimpleIPCServer
destructor Destroy; override; | Remove the TSimpleIPCServer instance from memory
procedure StartServer; | Start the server
procedure StopServer; | Stop the server
function PeekMessage(); | Check if a client message is available.
property StringMessage: ; [r] | Last message as a string.
procedure GetMessageData(); | Read the data of the last message in a stream
property MsgType: TMessageType; [r] | Last message type
property MsgData: TStream; [r] | Last message data
property InstanceID: ; [r] | Instance ID
published
property Global: Boolean; [rw] | Is the server reachable to all users or not
property OnMessage: TNotifyEvent; [rw] | Event triggered when a pessage arrives
end;

Inheritance

TSimpleIPCServer | Simple IPC server component
|
TSimpleIPC | Ancestor for client/server simple IPC classes
|
TComponent,IUnknown,IInterfaceComponentReference
|
TPersistent
|
TObject

Description

TSimpleIPCServer is the server side of the simple IPC communication protocol. The server program should create a TSimpleIPCServer instance, set its ServerID property to a unique name for the system, and then set the Active property to True (or call StartServer).

After the server was started, it can check for availability of messages with the PeekMessage call, and read the message with ReadMessage.

See also

TSimpleIPCClient | Simple IPC client component
TSimpleIPC | Ancestor for client/server simple IPC classes
TIPCServerComm | Internal message communication component


TSimpleIPCServer
 | ro | StringMessage
 | ro | MsgType
 | ro | MsgData
 | ro | InstanceID
pl |  | Global
TSimpleIPC
pl |  | Active
pl |  | ServerID
TComponent
 | ro | ComObject
 | ro | Components
 | ro | ComponentCount
 |  | ComponentIndex
 | ro | ComponentState
 | ro | ComponentStyle
 |  | DesignInfo
 | ro | Owner
 |  | VCLComObject
 |  | Name
 |  | Tag
TPersistent
TObject


pl |  | Active (TSimpleIPC)
 | ro | ComObject (TComponent)
 | ro | ComponentCount (TComponent)
 |  | ComponentIndex (TComponent)
 | ro | Components (TComponent)
 | ro | ComponentState (TComponent)
 | ro | ComponentStyle (TComponent)
 |  | DesignInfo (TComponent)
pl |  | Global (TSimpleIPCServer)
 | ro | InstanceID (TSimpleIPCServer)
 | ro | MsgData (TSimpleIPCServer)
 | ro | MsgType (TSimpleIPCServer)
 |  | Name (TComponent)
 | ro | Owner (TComponent)
pl |  | ServerID (TSimpleIPC)
 | ro |


TSimpleIPCServer
 | Create
 | Destroy
 | StartServer
 | StopServer
 | PeekMessage
 | GetMessageData
TSimpleIPC
TComponent
 | GetComObject
 | GetComponent
 | GetComponentCount
 | GetComponentIndex
 | Insert
 | ReadLeft
 | ReadTop
 | Remove
 | RemoveNotification
 | SetComponentIndex
 | SetReference
 | WriteLeft
 | WriteTop
 | ChangeName
 | DefineProperties
 | GetChildren
 | GetChildOwner
 | GetChildParent
 | GetOwner
 | Loaded
 | Loading
 | Notification
 | PaletteCreated
 | ReadState
 | SetAncestor
 | SetDesigning
 | SetDesignInstance
 | SetInline
 | SetName
 | SetChildOrder
 | SetParentComponent
 | Updating
 | Updated
 | UpdateRegistry
 | ValidateRename
 | ValidateContainer
 | ValidateInsert
 | QueryInterface
 | _AddRef
 | _Release
 | iicrGetComponent
 | GetTypeInfoCount
 | GetTypeInfo
 | GetIDsOfNames
 | Invoke
 | WriteState
 | Create
 | Destroy
 | BeforeDestruction
 | DestroyComponents
 | Destroying
 | ExecuteAction
 | FindComponent
 | FreeNotification
 | RemoveFreeNotification
 | FreeOnRelease
 | GetEnumerator
 | GetNamePath
 | GetParentComponent
 | HasParent
 | InsertComponent
 | RemoveComponent
 | SafeCallException
 | SetSubComponent
 | UpdateAction
 | IsImplementorOf
 | ReferenceInterface
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeforeDestruction (TComponent)

ChangeName (TComponent)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TComponent)

Create (TSimpleIPCServer)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

DefineProperties (TComponent)

Destroy (TObject)

Destroy (TComponent)

Destroy (TSimpleIPCServer)

DestroyComponents (TComponent)

Destroying (TComponent)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

ExecuteAction (TComponent)

FieldAddress (TObject)

FindComponent (TComponent)

Free (TObject)

FreeInstance (TObject)

FreeNotification (TComponent)

FreeOnRelease (TComponent)

GetChildOwner (TComponent)

GetChildParent (TComponent)

GetChildren (TComponent)

GetComObject (TComponent)

GetComponent (TComponent)

GetComponentCount (TComponent)

GetComponentIndex (TComponent)

GetEnumerator (TComponent)

GetHashCode (TObject)

GetIDsOfNames (TComponent)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetMessageData (TSimpleIPCServer)

GetNamePath (TPersistent)

GetNamePath (TComponent)

GetOwner (TPersistent)

GetOwner (TComponent)

GetParentComponent (TComponent)

GetTypeInfo (TComponent)

GetTypeInfoCount (TComponent)

HasParent (TComponent)

iicrGetComponent (TComponent)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TComponent)

InsertComponent (TComponent)

InstanceSize (TObject)

Invoke (TComponent)

IsImplementorOf (TComponent)

Loaded (TComponent)

Loading (TComponent)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notification (TComponent)

PaletteCreated (TComponent)

PeekMessage (TSimpleIPCServer)

QueryInterface (TComponent)

ReadLeft (TComponent)

ReadState (TComponent)

ReadTop (TComponent)

ReferenceInterface (TComponent)

Remove (TComponent)

RemoveComponent (TComponent)

RemoveFreeNotification (TComponent)

RemoveNotification (TComponent)

SafeCallException (TObject)

SafeCallException (TComponent)

SetAncestor (TComponent)

SetChildOrder (TComponent)

SetComponentIndex (TComponent)

SetDesigning (TComponent)

SetDesignInstance (TComponent)

SetInline (TComponent)

SetName (TComponent)

SetParentComponent (TComponent)

SetReference (TComponent)

SetSubComponent (TComponent)

StartServer (TSimpleIPCServer)

StopServer (TSimpleIPCServer)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

UpdateAction (TComponent)

Updated (TComponent)

UpdateRegistry (TComponent)

Updating (TComponent)

ValidateContainer (TComponent)

ValidateInsert (TComponent)

ValidateRename (TComponent)

WriteLeft (TComponent)

WriteState (TComponent)

WriteTop (TComponent)

_AddRef (TComponent)

_Release (TComponent)


TSimpleIPCServer

pl

OnMessage

TSimpleIPC

TComponent

TPersistent

TObject


TSimpleIPCServer.Create

Create a new instance of TSimpleIPCServer

Declaration

Source position: simpleipc.pp line 103

public constructor TSimpleIPCServer.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

Owner of the TSimpleIPCServer instance.

Description

Create instantiates a new instance of the TSimpleIPCServer class. It initializes the data structures needed to handle the server side of the communication.

See also

Destroy

Remove the TSimpleIPCServer instance from memory


TSimpleIPCServer.Destroy

Remove the TSimpleIPCServer instance from memory

Declaration

Source position: simpleipc.pp line 104

public destructor TSimpleIPCServer.Destroy; override;

Description

Destroy stops the server, cleans up the internal data structures maintained by TSimpleIPCServer and then calls the inherited Destroy, which will remove the instance from memory.

Never call Destroy directly, use the Free method instead or the FreeAndNil procedure in SysUtils.

See also

Create

Create a new instance of TSimpleIPCServer


TSimpleIPCServer.GetMessageData

Read the data of the last message in a stream

Declaration

Source position: simpleipc.pp line 109

public procedure TSimpleIPCServer.GetMessageData(

  Stream: TStream

);

Arguments

Stream

Stream to store message data in

Description

GetMessageData reads the data of the last message from TSimpleIPCServer.MsgData and stores it in stream Stream. If no data was available, the stream will be cleared.

This function will return valid data only after a succesful call to ReadMessage. It will also not clear the data buffer.

See also

StringMessage | Last message as a string.
MsgData | Last message data
MsgType | Last message type


TSimpleIPCServer.Global

Is the server reachable to all users or not

Declaration

Source position: simpleipc.pp line 114

published property TSimpleIPCServer.Global: Boolean
  read FGlobal
  write SetGlobal;

Description

Global indicates whether the server is reachable to all users (True) or if it is private to the current process (False). In the latter case, the unique channel endpoint identification may change: a unique identification of the current process is appended to the ServerID name.

See also

ServerID

InstanceID

Instance ID


TSimpleIPCServer.InstanceID

Instance ID

Declaration

Source position: simpleipc.pp line 112

public property TSimpleIPCServer.InstanceID:
  read GetInstanceID;

Description

InstanceID is the unique identifier for this server communication channel endpoint, and will be appended to the ServerID property to form the unique server endpoint which a client should use.

See also

ServerID

Global


TSimpleIPCServer.MsgData

Last message data

Declaration

Source position: simpleipc.pp line 111

public property TSimpleIPCServer.MsgData: TStream
  read FMsgData;

Description

MsgData contains the actual data from the last read message. If the data is a string, then StringMessage is better suited to read the data.

This property will contain valid data only after a succesful call to ReadMessage.

See also

StringMessage

Last message as a string.

ReadMessage


TSimpleIPCServer.MsgType

Last message type

Declaration

Source position: simpleipc.pp line 110

public property TSimpleIPCServer.MsgType: TMessageType
  read FMsgType;

Description

MsgType contains the message type of the last message.

This property will contain valid data only after a succesful call to ReadMessage.

See also

ReadMessage


TSimpleIPCServer.OnMessage

Event triggered when a pessage arrives

Declaration

Source position: simpleipc.pp line 115

published property TSimpleIPCServer.OnMessage: TNotifyEvent
  read FOnMessage
  write FOnMessage;

Description

OnMessage is called by ReadMessage when a message has been read. The actual message data can be retrieved with one of the StringMessage, MsgData or MsgType properties.

See also

StringMessage | Last message as a string.
MsgData | Last message data
MsgType | Last message type


TSimpleIPCServer.PeekMessage

Check if a client message is available.

Declaration

Source position: simpleipc.pp line 107

public function TSimpleIPCServer.PeekMessage(

  TimeOut: Integer;

  DoReadMessage: Boolean

):Boolean;

Arguments

TimeOut | Number of milliseconds to wait for a message.
DoReadMessage | Should the message be read or not ?

Function result

True if a client message is available.

Description

PeekMessage checks if a message from a client is available. It will return True if a message is available. The call will wait for TimeOut milliseconds for a message to arrive: if after TimeOut milliseconds, no message is available, the function will return False.

If DoReadMessage is True then PeekMessage will read the message. If it is False, it does not read the message. The message should then be read manually with ReadMessage.

See also

ReadMessage


TSimpleIPCServer.StartServer

Start the server

Declaration

Source position: simpleipc.pp line 105

public procedure TSimpleIPCServer.StartServer;

Description

StartServer starts the server side of the communication channel. It is called automatically when the Active property is set to True. It creates the internal communication object (a TIPCServerComm descendent) and activates the communication channel.

After this method was called, clients can connect and send messages.

Prior to calling this method, the ServerID property must be set.

Errors

If an error occurs a EIPCError exception may be raised.

See also

TIPCServerComm | Internal message communication component
Active | Communication channel active
ServerID | Unique server identification
StopServer | Stop the server


TSimpleIPCServer.StopServer

Stop the server

Declaration

Source position: simpleipc.pp line 106

public procedure TSimpleIPCServer.StopServer;

Description

StopServer stops the server side of the communication channel. It is called automatically when the Active property is set to False. It deactivates the communication channel and frees the internal communication object (a TIPCServerComm descendent).

See also

TIPCServerComm | Internal message communication component
Active | Communication channel active
ServerID | Unique server identification
StartServer | Start the server


TSimpleIPCServer.StringMessage

Last message as a string.

Declaration

Source position: simpleipc.pp line 108

public property TSimpleIPCServer.StringMessage:
  read GetStringMessage;

Description

StringMessage is the content of the last message as a string.

This property will contain valid data only after a succesful call to ReadMessage.

See also

GetMessageData

Read the data of the last message in a stream


EStreamColl

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception raised when an error occurs when streaming the collection.

Declaration

Source position: streamcoll.pp line 67

type EStreamColl = class(Exception) ;

Inheritance

EStreamColl

Exception raised when an error occurs when streaming the collection.
|

Exception
|

TObject


EStreamColl
Exception
 | HelpContext
 | Message
TObject


EStreamColl
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


EStreamColl

Exception

TObject


TStreamCollection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection with stream support

Declaration

Source position: streamcoll.pp line 41

type TStreamCollection = class(TCollection)
public
procedure LoadFromStream(); | Load the collection from a stream
procedure SaveToStream(); | Load the collection from the stream.
property Streaming: Boolean; [r] | Indicates whether the collection is currently being written to stream
end;

Inheritance

TStreamCollection

Collection with stream support
|

TCollection
|

TPersistent
|

TObject

Description

TStreamCollection is a TCollection descendent which implements 2 calls LoadFromStream and SaveToStream which load and save the contents of the collection to a stream.

The collection items must be descendents of the TStreamCollectionItem class for the streaming to work correctly.

Note that the stream must be used to load collections of the same type.

See also

TStreamCollectionItem

Collection item with streaming support


TStreamCollection
 | ro | Streaming
TCollection
 |  | PropName
 | ro | UpdateCount
 | ro | Count
 | ro | ItemClass
 |  | Items
TPersistent
TObject


ro | Count (TCollection)
ro | ItemClass (TCollection)
 | Items (TCollection)
 | PropName (TCollection)
ro | Streaming (TStreamCollection)
ro | UpdateCount (TCollection)


TStreamCollection
 | LoadFromStream
 | SaveToStream
TCollection
 | GetCount
 | GetPropName
 | InsertItem
 | RemoveItem
 | DoClear
 | GetAttrCount
 | GetAttr
 | GetItemAttr
 | Changed
 | GetItem
 | SetItem
 | SetItemName
 | SetPropName
 | Update
 | Notify
 | Create
 | Destroy
 | Owner
 | Add
 | Assign
 | BeginUpdate
 | Clear
 | EndUpdate
 | Delete
 | GetEnumerator
 | GetNamePath
 | Insert
 | FindItemID
 | Exchange
 | Sort
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Add (TCollection)

AfterConstruction (TObject)

Assign (TPersistent)

Assign (TCollection)

AssignError (TPersistent)

AssignTo (TPersistent)

BeforeDestruction (TObject)

BeginUpdate (TCollection)

Changed (TCollection)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Clear (TCollection)

Create (TObject)

Create (TCollection)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineProperties (TPersistent)

Delete (TCollection)

Destroy (TObject)

Destroy (TCollection)

Dispatch (TObject)

DispatchStr (TObject)

DoClear (TCollection)

EndUpdate (TCollection)

Equals (TObject)

Exchange (TCollection)

FieldAddress (TObject)

FindItemID (TCollection)

Free (TObject)

FreeInstance (TObject)

GetAttr (TCollection)

GetAttrCount (TCollection)

GetCount (TCollection)

GetEnumerator (TCollection)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetItem (TCollection)

GetItemAttr (TCollection)

GetNamePath (TPersistent)

GetNamePath (TCollection)

GetOwner (TPersistent)

GetPropName (TCollection)

InheritsFrom (TObject)

InitInstance (TObject)

Insert (TCollection)

InsertItem (TCollection)

InstanceSize (TObject)

LoadFromStream (TStreamCollection)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Notify (TCollection)

Owner (TCollection)

RemoveItem (TCollection)

SafeCallException (TObject)

SaveToStream (TStreamCollection)

SetItem (TCollection)

SetItemName (TCollection)

SetPropName (TCollection)

Sort (TCollection)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Update (TCollection)


TStreamCollection

TCollection

TPersistent

TObject


TStreamCollection.LoadFromStream

Load the collection from a stream

Declaration

Source position: streamcoll.pp line 61

public procedure TStreamCollection.LoadFromStream(

  S: TStream

);

Arguments

S

Stream to load collection from.

Description

LoadFromStream loads the collection from the stream S, if the collection was saved using SaveToStream. It reads the number of items in the collection, and then creates and loads the items one by one from the stream.

Errors

An exception may be raised if the stream contains invalid data.

See also

TStreamCollection.SaveToStream

Load the collection from the stream.


TStreamCollection.SaveToStream

Load the collection from the stream.

Declaration

Source position: streamcoll.pp line 62

public procedure TStreamCollection.SaveToStream(

  S: TStream

);

Arguments

S

Stream to save collection to

Description

SaveToStream saves the collection to the stream S so it can be read from the stream with LoadFromStream. It does this by writing the number of collection items to the stream, and then streaming all items in the collection by calling their SaveToStream method.

Errors

None.

See also

TStreamCollection.LoadFromStream

Load the collection from a stream


TStreamCollection.Streaming

Indicates whether the collection is currently being written to stream

Declaration

Source position: streamcoll.pp line 63

public property TStreamCollection.Streaming: Boolean
  read FStreaming;

Description

Streaming is set to True if the collection is written to or loaded from stream, and is set again to False if the streaming process is finished.

See also

TStreamCollection.LoadFromStream | Load the collection from a stream
TStreamCollection.SaveToStream | Load the collection from the stream.


TStreamCollectionItem

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection item with streaming support

Declaration

Source position: streamcoll.pp line 23

type TStreamCollectionItem = class(TCollectionItem)

end;

Inheritance

TStreamCollectionItem

Collection item with streaming support
|

TCollectionItem
|

TPersistent
|

TObject

Description

TStreamCollectionItem is a TCollectionItem descendent which implements 2 abstract routines: LoadFromStream and SaveToStream which must be overridden in a descendent class.

These 2 routines will be called by the TStreamCollection to save or load the item from the stream.

See also

TStreamCollection

Collection with stream support


TStreamCollectionItem
TCollectionItem
 | ro | UpdateCount
 |  | Collection
 | ro | ID
 |  | Index
 |  | DisplayName
TPersistent
TObject


ro | ID (TCollectionItem)
 | Index (TCollectionItem)
ro | UpdateCount (TCollectionItem)


TStreamCollectionItem
TCollectionItem
 | GetIndex
 | SetCollection
 | Changed
 | GetOwner
 | GetDisplayName
 | SetIndex
 | SetDisplayName
 | Create
 | Destroy
 | GetNamePath
TPersistent
 | AssignError
 | AssignTo
 | DefineProperties
 | GetOwner
 | Assign
 | GetNamePath
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


TStreamCollectionItem

TCollectionItem

TPersistent

TObject


TBidirBinaryObjectReader

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Binary component stream reader with BiDi support

Declaration

Source position: streamex.pp line 13

type TBidirBinaryObjectReader = class(TBinaryObjectReader)

public

  property Position: LongInt; [rw]

Position in the stream

end;

Inheritance

TBidirBinaryObjectReader

Binary component stream reader with BiDi support
|

TBinaryObjectReader
|

TAbstractObjectReader
|

TObject

Description

TBidirBinaryObjectReader is a class descendent from TBinaryObjectReader, which implements the necessary support for BiDi data: the position in the stream (not available in the standard streaming) is emulated.

See also

TBidirBinaryObjectWriter | Binary component stream writer with BiDi support
TDelphiReader | Stream reader with BiDi Support


TBidirBinaryObjectReader

Position

TBinaryObjectReader

TAbstractObjectReader

TObject


Position (TBidirBinaryObjectReader)


TBidirBinaryObjectReader
TBinaryObjectReader
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadExtended
 | SkipProperty
 | SkipSetBody
 | Create
 | Destroy
 | NextValue
 | ReadValue
 | BeginRootComponent
 | BeginComponent
 | BeginProperty
 | Read
 | ReadBinary
 | ReadFloat
 | ReadSingle
 | ReadDate
 | ReadCurrency
 | ReadIdent
 | ReadInt8
 | ReadInt16
 | ReadInt32
 | ReadInt64
 | ReadSet
 | ReadStr
 | ReadString
 | ReadWideString
 | ReadUnicodeString
 | SkipComponent
 | SkipValue
TAbstractObjectReader
 | NextValue
 | ReadValue
 | BeginRootComponent
 | BeginComponent
 | BeginProperty
 | Read
 | ReadBinary
 | ReadFloat
 | ReadSingle
 | ReadDate
 | ReadCurrency
 | ReadIdent
 | ReadInt8
 | ReadInt16
 | ReadInt32
 | ReadInt64
 | ReadSet
 | ReadStr
 | ReadString
 | ReadWideString
 | ReadUnicodeString
 | SkipComponent
 | SkipValue
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

BeginComponent (TAbstractObjectReader)

BeginComponent (TBinaryObjectReader)

BeginProperty (TAbstractObjectReader)

BeginProperty (TBinaryObjectReader)

BeginRootComponent (TAbstractObjectReader)

BeginRootComponent (TBinaryObjectReader)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TBinaryObjectReader)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TBinaryObjectReader)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

NextValue (TAbstractObjectReader)

NextValue (TBinaryObjectReader)

Read (TAbstractObjectReader)

Read (TBinaryObjectReader)

ReadBinary (TAbstractObjectReader)

ReadBinary (TBinaryObjectReader)

ReadCurrency (TAbstractObjectReader)

ReadCurrency (TBinaryObjectReader)

ReadDate (TAbstractObjectReader)

ReadDate (TBinaryObjectReader)

ReadDWord (TBinaryObjectReader)

ReadExtended (TBinaryObjectReader)

ReadFloat (TAbstractObjectReader)

ReadFloat (TBinaryObjectReader)

ReadIdent (TAbstractObjectReader)

ReadIdent (TBinaryObjectReader)

ReadInt16 (TAbstractObjectReader)

ReadInt16 (TBinaryObjectReader)

ReadInt32 (TAbstractObjectReader)

ReadInt32 (TBinaryObjectReader)

ReadInt64 (TAbstractObjectReader)

ReadInt64 (TBinaryObjectReader)

ReadInt8 (TAbstractObjectReader)

ReadInt8 (TBinaryObjectReader)

ReadQWord (TBinaryObjectReader)

ReadSet (TAbstractObjectReader)

ReadSet (TBinaryObjectReader)

ReadSingle (TAbstractObjectReader)

ReadSingle (TBinaryObjectReader)

ReadStr (TAbstractObjectReader)

ReadStr (TBinaryObjectReader)

ReadString (TAbstractObjectReader)

ReadString (TBinaryObjectReader)

ReadUnicodeString (TAbstractObjectReader)

ReadUnicodeString (TBinaryObjectReader)

ReadValue (TAbstractObjectReader)

ReadValue (TBinaryObjectReader)

ReadWideString (TAbstractObjectReader)

ReadWideString (TBinaryObjectReader)

ReadWord (TBinaryObjectReader)

SafeCallException (TObject)

SkipComponent (TAbstractObjectReader)

SkipComponent (TBinaryObjectReader)

SkipProperty (TBinaryObjectReader)

SkipSetBody (TBinaryObjectReader)

SkipValue (TAbstractObjectReader)

SkipValue (TBinaryObjectReader)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TBidirBinaryObjectReader

TBinaryObjectReader

TAbstractObjectReader

TObject


TBidirBinaryObjectReader.Position

Position in the stream

Declaration

Source position: streamex.pp line 18

public property TBidirBinaryObjectReader.Position: LongInt
  read GetPosition
  write SetPosition;

Description

Position exposes the position of the stream in the reader for use in the TDelphiReader class.

See also

TDelphiReader

Stream reader with BiDi Support


TBidirBinaryObjectWriter

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Binary component stream writer with BiDi support

Declaration

Source position: streamex.pp line 23

type TBidirBinaryObjectWriter = class(TBinaryObjectWriter)

public

  property Position: LongInt; [rw]

Position in the stream

end;

Inheritance

TBidirBinaryObjectWriter

Binary component stream writer with BiDi support
|

TBinaryObjectWriter
|

TAbstractObjectWriter
|

TObject

Description

TBidirBinaryObjectReader is a class descendent from TBinaryObjectWriter, which implements the necessary support for BiDi data.

See also

TBidirBinaryObjectWriter | Binary component stream writer with BiDi support
TDelphiWriter | Stream writer with BiDi Support


TBidirBinaryObjectWriter

Position

TBinaryObjectWriter

TAbstractObjectWriter

TObject


Position (TBidirBinaryObjectWriter)


TBidirBinaryObjectWriter
TBinaryObjectWriter
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteExtended
 | FlushBuffer
 | WriteValue
 | WriteStr
 | Create
 | Destroy
 | BeginCollection
 | BeginComponent
 | BeginList
 | EndList
 | BeginProperty
 | EndProperty
 | Write
 | WriteBinary
 | WriteBoolean
 | WriteFloat
 | WriteSingle
 | WriteDate
 | WriteCurrency
 | WriteIdent
 | WriteInteger
 | WriteUInt64
 | WriteMethodName
 | WriteSet
 | WriteString
 | WriteWideString
 | WriteUnicodeString
 | WriteVariant
TAbstractObjectWriter
 | BeginCollection
 | BeginComponent
 | BeginList
 | EndList
 | BeginProperty
 | EndProperty
 | Write
 | WriteBinary
 | WriteBoolean
 | WriteFloat
 | WriteSingle
 | WriteDate
 | WriteCurrency
 | WriteIdent
 | WriteInteger
 | WriteUInt64
 | WriteVariant
 | WriteMethodName
 | WriteSet
 | WriteString
 | WriteWideString
 | WriteUnicodeString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

BeginCollection (TAbstractObjectWriter)

BeginCollection (TBinaryObjectWriter)

BeginComponent (TAbstractObjectWriter)

BeginComponent (TBinaryObjectWriter)

BeginList (TAbstractObjectWriter)

BeginList (TBinaryObjectWriter)

BeginProperty (TAbstractObjectWriter)

BeginProperty (TBinaryObjectWriter)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TBinaryObjectWriter)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TBinaryObjectWriter)

Dispatch (TObject)

DispatchStr (TObject)

EndList (TAbstractObjectWriter)

EndList (TBinaryObjectWriter)

EndProperty (TAbstractObjectWriter)

EndProperty (TBinaryObjectWriter)

Equals (TObject)

FieldAddress (TObject)

FlushBuffer (TBinaryObjectWriter)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TAbstractObjectWriter)

Write (TBinaryObjectWriter)

WriteBinary (TAbstractObjectWriter)

WriteBinary (TBinaryObjectWriter)

WriteBoolean (TAbstractObjectWriter)

WriteBoolean (TBinaryObjectWriter)

WriteCurrency (TAbstractObjectWriter)

WriteCurrency (TBinaryObjectWriter)

WriteDate (TAbstractObjectWriter)

WriteDate (TBinaryObjectWriter)

WriteDWord (TBinaryObjectWriter)

WriteExtended (TBinaryObjectWriter)

WriteFloat (TAbstractObjectWriter)

WriteFloat (TBinaryObjectWriter)

WriteIdent (TAbstractObjectWriter)

WriteIdent (TBinaryObjectWriter)

WriteInteger (TAbstractObjectWriter)

WriteInteger (TBinaryObjectWriter)

WriteMethodName (TAbstractObjectWriter)

WriteMethodName (TBinaryObjectWriter)

WriteQWord (TBinaryObjectWriter)

WriteSet (TAbstractObjectWriter)

WriteSet (TBinaryObjectWriter)

WriteSingle (TAbstractObjectWriter)

WriteSingle (TBinaryObjectWriter)

WriteStr (TBinaryObjectWriter)

WriteString (TAbstractObjectWriter)

WriteString (TBinaryObjectWriter)

WriteUInt64 (TAbstractObjectWriter)

WriteUInt64 (TBinaryObjectWriter)

WriteUnicodeString (TAbstractObjectWriter)

WriteUnicodeString (TBinaryObjectWriter)

WriteValue (TBinaryObjectWriter)

WriteVariant (TAbstractObjectWriter)

WriteVariant (TBinaryObjectWriter)

WriteWideString (TAbstractObjectWriter)

WriteWideString (TBinaryObjectWriter)

WriteWord (TBinaryObjectWriter)


TBidirBinaryObjectWriter

TBinaryObjectWriter

TAbstractObjectWriter

TObject


TBidirBinaryObjectWriter.Position

Position in the stream

Declaration

Source position: streamex.pp line 28

public property TBidirBinaryObjectWriter.Position: LongInt
  read GetPosition
  write SetPosition;

Description

Position exposes the position of the stream in the writer for use in the TDelphiWriter class.

See also

TDelphiWriter

Stream writer with BiDi Support


TDelphiReader

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Stream reader with BiDi Support

Declaration

Source position: streamex.pp line 33

type TDelphiReader = class(TReader)
public
function GetDriver; | Return the driver class as a TBidirBinaryObjectReader class
function ReadStr; | Overrides the standard ReadStr method
procedure Read(); override; | Read data from stream
property Position: LongInt; [rw] | Position in the stream
end;

Inheritance

TDelphiReader

Stream reader with BiDi Support
|

TReader
|

TFiler
|

TObject

Description

TDelphiReader is a descendent of TReader which has support for BiDi Streaming. It overrides the stream reading methods for strings, and makes sure the stream can be positioned in the case of strings. For this purpose, it makes use of the TBidirBinaryObjectReader driver class.

See also

TDelphiWriter | Stream writer with BiDi Support
TBidirBinaryObjectReader | Binary component stream reader with BiDi support


TDelphiReader
 |  | Position
TReader
 | ro | PropName
 | ro | CanHandleExceptions
 | ro | Driver
 |  | Owner
 |  | Parent
TFiler
 |  | Root
 | ro | LookupRoot
 |  | Ancestor
 |  | IgnoreChildren
TObject


ro | CanHandleExceptions (TReader)
ro | Driver (TReader)
 | IgnoreChildren (TFiler)
ro | LookupRoot (TFiler)
 | Owner (TReader)
 | Parent (TReader)
 | Position (TDelphiReader)
ro | PropName (TReader)


TDelphiReader
 | GetDriver
 | ReadStr
 | Read
TReader
 | DoFixupReferences
 | FindComponentClass
 | Error
 | FindMethod
 | ReadProperty
 | ReadPropValue
 | PropertyError
 | ReadData
 | CreateDriver
 | Create
 | Destroy
 | BeginReferences
 | CheckValue
 | DefineProperty
 | DefineBinaryProperty
 | EndOfList
 | EndReferences
 | FixupReferences
 | NextValue
 | Read
 | ReadBoolean
 | ReadChar
 | ReadWideChar
 | ReadUnicodeChar
 | ReadCollection
 | ReadComponent
 | ReadComponents
 | ReadFloat
 | ReadSingle
 | ReadDate
 | ReadCurrency
 | ReadIdent
 | ReadInteger
 | ReadInt64
 | ReadSet
 | ReadListBegin
 | ReadListEnd
 | ReadRootComponent
 | ReadVariant
 | ReadString
 | ReadWideString
 | ReadUnicodeString
 | ReadValue
 | CopyValue
TFiler
 | SetRoot
 | DefineProperty
 | DefineBinaryProperty
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

BeginReferences (TReader)

CheckValue (TReader)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyValue (TReader)

Create (TObject)

Create (TReader)

CreateDriver (TReader)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineBinaryProperty (TFiler)

DefineBinaryProperty (TReader)

DefineProperty (TFiler)

DefineProperty (TReader)

Destroy (TObject)

Destroy (TReader)

Dispatch (TObject)

DispatchStr (TObject)

DoFixupReferences (TReader)

EndOfList (TReader)

EndReferences (TReader)

Equals (TObject)

Error (TReader)

FieldAddress (TObject)

FindComponentClass (TReader)

FindMethod (TReader)

FixupReferences (TReader)

Free (TObject)

FreeInstance (TObject)

GetDriver (TDelphiReader)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

NextValue (TReader)

PropertyError (TReader)

Read (TReader)

Read (TDelphiReader)

ReadBoolean (TReader)

ReadChar (TReader)

ReadCollection (TReader)

ReadComponent (TReader)

ReadComponents (TReader)

ReadCurrency (TReader)

ReadData (TReader)

ReadDate (TReader)

ReadFloat (TReader)

ReadIdent (TReader)

ReadInt64 (TReader)

ReadInteger (TReader)

ReadListBegin (TReader)

ReadListEnd (TReader)

ReadProperty (TReader)

ReadPropValue (TReader)

ReadRootComponent (TReader)

ReadSet (TReader)

ReadSingle (TReader)

ReadStr (TDelphiReader)

ReadString (TReader)

ReadUnicodeChar (TReader)

ReadUnicodeString (TReader)

ReadValue (TReader)

ReadVariant (TReader)

ReadWideChar (TReader)

ReadWideString (TReader)

SafeCallException (TObject)

SetRoot (TFiler)


TDelphiReader
TReader
 | OnError
 | OnPropertyNotFound
 | OnFindMethod
 | OnSetMethodProperty
 | OnSetName
 | OnReferenceName
 | OnAncestorNotFound
 | OnCreateComponent
 | OnFindComponentClass
 | OnReadStringProperty
TFiler
TObject


OnAncestorNotFound (TReader)

OnCreateComponent (TReader)

OnError (TReader)

OnFindComponentClass (TReader)

OnFindMethod (TReader)

OnPropertyNotFound (TReader)

OnReadStringProperty (TReader)

OnReferenceName (TReader)

OnSetMethodProperty (TReader)

OnSetName (TReader)


TDelphiReader.GetDriver

Return the driver class as a TBidirBinaryObjectReader class

Declaration

Source position: streamex.pp line 39

public function TDelphiReader.GetDriver: TBidirBinaryObjectReader;

Function result

The driver instance.

Description

GetDriver simply returns the used driver and typecasts it as TBidirBinaryObjectReader class.

See also

TBidirBinaryObjectReader

Binary component stream reader with BiDi support


TDelphiReader.Position

Position in the stream

Declaration

Source position: streamex.pp line 42

public property TDelphiReader.Position: LongInt
  read GetPosition
  write SetPosition;

Description

Position in the stream.

See also

TDelphiReader.Read

Read data from stream


TDelphiReader.Read

Read data from stream

Declaration

Source position: streamex.pp line 41

public procedure TDelphiReader.Read(

  var Buf;

  Count: LongInt

); override;

Arguments

Buf | Buffer to contain the data
Count | Number of bytes to read from the stream

Description

Read reads raw data from the stream. It reads Count bytes from the stream and places them in Buf. It forces the use of the TBidirBinaryObjectReader class when reading.

See also

TBidirBinaryObjectReader | Binary component stream reader with BiDi support
TDelphiReader.Position | Position in the stream


TDelphiReader.ReadStr

Overrides the standard ReadStr method

Declaration

Source position: streamex.pp line 40

public function TDelphiReader.ReadStr: ;

Function result

String read from stream

Description

ReadStr makes sure the TBidirBinaryObjectReader methods are used, to store additional information about the stream position when reading the strings.

See also

TBidirBinaryObjectReader

Binary component stream reader with BiDi support


TDelphiWriter

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Stream writer with BiDi Support

Declaration

Source position: streamex.pp line 47

type TDelphiWriter = class(TWriter)
public
function GetDriver; | Return the driver class as a TBidirBinaryObjectWriter class
procedure FlushBuffer; | Flushes the stream buffer
procedure Write(); override; | Write raw data to the stream
procedure WriteStr(); | Write a string to the stream
procedure WriteValue(); | Write value type
property Position: LongInt; [rw] | Position in the stream
end;

Inheritance

TDelphiWriter

Stream writer with BiDi Support
|

TWriter
|

TFiler
|

TObject

Description

TDelphiWriter is a descendent of TWriter which has support for BiDi Streaming. It overrides the stream writing methods for strings, and makes sure the stream can be positioned in the case of strings. For this purpose, it makes use of the TBidirBinaryObjectWriter driver class.

See also

TDelphiReader | Stream reader with BiDi Support
TBidirBinaryObjectWriter | Binary component stream writer with BiDi support


TDelphiWriter
 |  | Position
TWriter
 |  | RootAncestor
 | ro | Driver
 | ro | PropertyPath
TFiler
 |  | Root
 | ro | LookupRoot
 |  | Ancestor
 |  | IgnoreChildren
TObject


ro | Driver (TWriter)
 | IgnoreChildren (TFiler)
ro | LookupRoot (TFiler)
 | Position (TDelphiWriter)
ro |


TDelphiWriter
 | GetDriver
 | FlushBuffer
 | Write
 | WriteStr
 | WriteValue
TWriter
 | AddToAncestorList
 | WriteComponentData
 | DetermineAncestor
 | DoFindAncestor
 | SetRoot
 | WriteBinary
 | WriteProperty
 | WriteProperties
 | WriteChildren
 | CreateDriver
 | Create
 | Destroy
 | DefineProperty
 | DefineBinaryProperty
 | Write
 | WriteBoolean
 | WriteCollection
 | WriteComponent
 | WriteChar
 | WriteWideChar
 | WriteDescendent
 | WriteFloat
 | WriteSingle
 | WriteDate
 | WriteCurrency
 | WriteIdent
 | WriteInteger
 | WriteSet
 | WriteListBegin
 | WriteListEnd
 | WriteRootComponent
 | WriteString
 | WriteWideString
 | WriteUnicodeString
 | WriteVariant
TFiler
 | SetRoot
 | DefineProperty
 | DefineBinaryProperty
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AddToAncestorList (TWriter)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TWriter)

CreateDriver (TWriter)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

DefineBinaryProperty (TFiler)

DefineBinaryProperty (TWriter)

DefineProperty (TFiler)

DefineProperty (TWriter)

Destroy (TObject)

Destroy (TWriter)

DetermineAncestor (TWriter)

Dispatch (TObject)

DispatchStr (TObject)

DoFindAncestor (TWriter)

Equals (TObject)

FieldAddress (TObject)

FlushBuffer (TDelphiWriter)

Free (TObject)

FreeInstance (TObject)

GetDriver (TDelphiWriter)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

SafeCallException (TObject)

SetRoot (TFiler)

SetRoot (TWriter)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TWriter)

Write (TDelphiWriter)

WriteBinary (TWriter)

WriteBoolean (TWriter)

WriteChar (TWriter)

WriteChildren (TWriter)

WriteCollection (TWriter)

WriteComponent (TWriter)

WriteComponentData (TWriter)

WriteCurrency (TWriter)

WriteDate (TWriter)

WriteDescendent (TWriter)

WriteFloat (TWriter)

WriteIdent (TWriter)

WriteInteger (TWriter)

WriteListBegin (TWriter)

WriteListEnd (TWriter)

WriteProperties (TWriter)

WriteProperty (TWriter)

WriteRootComponent (TWriter)

WriteSet (TWriter)

WriteSingle (TWriter)

WriteStr (TDelphiWriter)

WriteString (TWriter)

WriteUnicodeString (TWriter)

WriteValue (TDelphiWriter)

WriteVariant (TWriter)

WriteWideChar (TWriter)

WriteWideString (TWriter)


TDelphiWriter
TWriter
 | OnFindAncestor
 | OnWriteMethodProperty
 | OnWriteStringProperty
TFiler
TObject


OnFindAncestor (TWriter)

OnWriteMethodProperty (TWriter)

OnWriteStringProperty (TWriter)


TDelphiWriter.FlushBuffer

Flushes the stream buffer

Declaration

Source position: streamex.pp line 54

public procedure TDelphiWriter.FlushBuffer;

Description

FlushBuffer flushes the internal buffer of the writer. It simply calls the FlushBuffer method of the driver class.


TDelphiWriter.GetDriver

Return the driver class as a TBidirBinaryObjectWriter class

Declaration

Source position: streamex.pp line 53

public function TDelphiWriter.GetDriver: TBidirBinaryObjectWriter;

Function result

The driver instance

Description

GetDriver simply returns the used driver and typecasts it as TBidirBinaryObjectWriter class.

See also

TBidirBinaryObjectWriter

Binary component stream writer with BiDi support


TDelphiWriter.Position

Position in the stream

Declaration

Source position: streamex.pp line 58

public property TDelphiWriter.Position: LongInt
  read GetPosition
  write SetPosition;

Description

Position exposes the position in the stream as exposed by the TBidirBinaryObjectWriter instance used when streaming.

See also

TBidirBinaryObjectWriter

Binary component stream writer with BiDi support


TDelphiWriter.Write

Write raw data to the stream

Declaration

Source position: streamex.pp line 55

public procedure TDelphiWriter.Write(

  const Buf;

  Count: LongInt

); override;

Arguments

Buf | Buffer containing data to write
Count | Number of bytes to write

Description

Write writes Count bytes from Buf to the buffer, updating the position as needed.


TDelphiWriter.WriteStr

Write a string to the stream

Declaration

Source position: streamex.pp line 56

public procedure TDelphiWriter.WriteStr(

  const Value:

);

Arguments

Value

String to write

Description

WriteStr writes a string to the stream, forcing the use of the TBidirBinaryObjectWriter class methods, which update the position of the stream.

See also

TBidirBinaryObjectWriter

Binary component stream writer with BiDi support


TDelphiWriter.WriteValue

Write value type

Declaration

Source position: streamex.pp line 57

public procedure TDelphiWriter.WriteValue(

  Value: TValueType

);

Arguments

Value

Value to write to stream

Description

WriteValue overrides the same method in TWriter to force the use of the TBidirBinaryObjectWriter methods, which update the position of the stream.

See also

TBidirBinaryObjectWriter

Binary component stream writer with BiDi support


TCriticalSection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Critical section

Declaration

Source position: syncobjs.pp line 38

type TCriticalSection = class(TSynchroObject)
public
procedure Acquire; override; | Enter the critical section
procedure Release; override; | Leave the critical section
procedure Enter; | Alias for Acquire
function TryEnter; | Try and obtain the critical section
procedure Leave; | Alias for Release
constructor Create; | Create a new critical section.
destructor Destroy; override; | Destroy the criticalsection instance
end;

Inheritance

TCriticalSection | Critical section
|
TSynchroObject | Abstract synchronization object
|
TObject

Description

TCriticalSection is a class wrapper around the low-level TRTLCriticalSection routines. It simply calls the RTL routines in the system unit for critical section support.

A critical section is a resource which can be owned by only 1 caller: it can be used to make sure that in a multithreaded application only 1 thread enters pieces of code protected by the critical section.

Typical usage is to protect a piece of code with the following code (MySection is a TCriticalSection instance):

// Previous code
  MySection.Acquire;
  Try
    // Protected code
  Finally
    MySection.Release;
  end;
  // Other code.

The protected code can be executed by only 1 thread at a time. This is useful for instance for list operations in multithreaded environments.

See also

Acquire | Enter the critical section
Release | Leave the critical section


TCriticalSection

TSynchroObject

TObject


TCriticalSection
 | Acquire
 | Release
 | Enter
 | TryEnter
 | Leave
 | Create
 | Destroy
TSynchroObject
 | Acquire
 | Release
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Acquire (TSynchroObject)

Acquire (TCriticalSection)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TCriticalSection)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TCriticalSection)

Dispatch (TObject)

DispatchStr (TObject)

Enter (TCriticalSection)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

Leave (TCriticalSection)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Release (TSynchroObject)

Release (TCriticalSection)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

TryEnter (TCriticalSection)

UnitName (TObject)


TCriticalSection.Acquire

Enter the critical section

Declaration

Source position: syncobjs.pp line 42

public procedure TCriticalSection.Acquire; override;

Description

Acquire attempts to enter the critical section. It will suspend the calling thread if the critical section is in use by another thread, and will resume as soon as the other thread has released the critical section.

See also

Release

Leave the critical section


TCriticalSection.Create

Create a new critical section.

Declaration

Source position: syncobjs.pp line 47

public constructor TCriticalSection.Create;

Description

Create initializes a new critical section, and initializes the system objects for the critical section. It should be created only once for all threads, all threads should use the same critical section instance.

See also

Destroy

Destroy the criticalsection instance


TCriticalSection.Destroy

Destroy the criticalsection instance

Declaration

Source position: syncobjs.pp line 48

public destructor TCriticalSection.Destroy; override;

Description

Destroy releases the system critical section resources, and removes the TCriticalSection instance from memory.

Errors

Any threads trying to enter the critical section when it is destroyed, will start running with an error (an exception should be raised).

See also

Create | Create a new critical section.
Acquire | Enter the critical section


TCriticalSection.Enter

Alias for Acquire

Declaration

Source position: syncobjs.pp line 44

public procedure TCriticalSection.Enter;

Description

Enter just calls Acquire.

See also

Leave | Alias for Release
Acquire | Enter the critical section


TCriticalSection.Leave

Alias for Release

Declaration

Source position: syncobjs.pp line 46

public procedure TCriticalSection.Leave;

Description

Leave just calls Release

See also

Release | Leave the critical section
Enter | Alias for Acquire


TCriticalSection.Release

Leave the critical section

Declaration

Source position: syncobjs.pp line 43

public procedure TCriticalSection.Release; override;

Description

Release leaves the critical section. It will free the critical section so another thread waiting to enter the critical section will be awakened, and will enter the critical section. This call always returns immediatly.

See also

Acquire

Enter the critical section


TCriticalSection.TryEnter

Try and obtain the critical section

Declaration

Source position: syncobjs.pp line 45

public function TCriticalSection.TryEnter: Boolean;

Function result

False if another thread owns the critical section, true if obtained at once.

Description

TryEnter tries to enter the critical section: it returns at once and does not wait if the critical section is owned by another thread; if the current thread owns the critical section or the critical section was obtained successfully, true is returned. If the critical section is currently owned by another thread, False is returned.

Errors

None.

See also

TCriticalSection.Enter

Alias for Acquire


TEventObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Event propagation object

Declaration

Source position: syncobjs.pp line 61

type TEventObject = class(THandleObject)
public
constructor Create(); | Create a new event object
destructor destroy; override; | Clean up the event and release from memory
procedure ResetEvent; | Reset the event
procedure SetEvent; | Set the event
function WaitFor(); | Wait for the event to be set.
property ManualReset: Boolean; [r] | Should the event be reset manually
end;

Inheritance

TEventObject | Event propagation object
|
THandleObject | Class encapsulating an operating system handle
|
TSynchroObject | Abstract synchronization object
|
TObject

Description

TEventObject encapsulates the BasicEvent implementation of the system unit in a class. The event can be used to notify other threads of a change in conditions. (in POSIX terms, this is a conditional variable). A thread that wishes to notify other threads creates an instance of TEventObject with a certain name, and posts events to it. Other threads that wish to be notified of these events should create their own instances of TEventObject with the same name, and wait for events to arrive.

See also

TCriticalSection

Critical section


TEventObject
 | ro | ManualReset
THandleObject
 | ro | Handle
 | ro | LastError
TSynchroObject
TObject


ro | Handle (THandleObject)
ro | LastError (THandleObject)
ro |


TEventObject
 | Create
 | destroy
 | ResetEvent
 | SetEvent
 | WaitFor
THandleObject
 | destroy
TSynchroObject
 | Acquire
 | Release
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Acquire (TSynchroObject)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TEventObject)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

destroy (THandleObject)

destroy (TEventObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Release (TSynchroObject)

ResetEvent (TEventObject)

SafeCallException (TObject)

SetEvent (TEventObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

WaitFor (TEventObject)


TEventObject

THandleObject

TSynchroObject

TObject


TEventObject.Create

Create a new event object

Declaration

Source position: syncobjs.pp line 65

public constructor TEventObject.Create(

  EventAttributes: PSecurityAttributes;

  AManualReset: Boolean;

  InitialState: Boolean;

  const Name:

);

Arguments

EventAttributes | Security attributes (only used on Windows)
AManualReset | Manual reset allowed
InitialState | Initial event state
Name | Name uniquely identifying the event in this process.

Description

Create creates a new event object with unique name AName. The object will be created security attributes EventAttributes (windows only).

The AManualReset indicates whether the event must be reset manually (if it is False, the event is reset immediatly after the first thread waiting for it is notified). InitialState determines whether the event is initially set or not.

See also

ManualReset | Should the event be reset manually
ResetEvent | Reset the event


TEventObject.destroy

Clean up the event and release from memory

Declaration

Source position: syncobjs.pp line 67

public destructor TEventObject.destroy; override;

Description

Destroy cleans up the low-level resources allocated for this event and releases the event instance from memory.

See also

Create

Create a new event object


TEventObject.ManualReset

Should the event be reset manually

Declaration

Source position: syncobjs.pp line 71

public property TEventObject.ManualReset: Boolean
  read FManualReset;


TEventObject.ResetEvent

Reset the event

Declaration

Source position: syncobjs.pp line 68

public procedure TEventObject.ResetEvent;

Description

ResetEvent turns off the event. Any WaitFor operation will suspend the calling thread.

See also

SetEvent | Set the event
WaitFor | Wait for the event to be set.


TEventObject.SetEvent

Set the event

Declaration

Source position: syncobjs.pp line 69

public procedure TEventObject.SetEvent;

Description

SetEvent sets the event. If the ManualReset is True any thread that was waiting for the event to be set (using WaitFor) will resume it's operation. After the event was set, any thread that executes WaitFor will return at once. If ManualReset is False, only one thread will be notified that the event was set, and the event will be immediatly reset after that.

See also

WaitFor | Wait for the event to be set.
ManualReset | Should the event be reset manually


TEventObject.WaitFor

Wait for the event to be set.

Declaration

Source position: syncobjs.pp line 70

public function TEventObject.WaitFor(

  Timeout: Cardinal

):TWaitResult;

Arguments

Timeout

Maximum time to wait for the event to be set

Function result

Reason for returning

Description

WaitFor should be used in threads that should be notified when the event is set. When WaitFor is called, and the event is not set, the thread will be suspended. As soon as the event is set by some other thread (using SetEvent) or the timeout period (TimeOut) has expired, the WaitFor function returns. The return value depends on the condition that caused the WaitFor function to return.

The calling thread will wait indefinitely when the constant INFINITE is specified for the TimeOut parameter.

See also

TEventObject.SetEvent

Set the event


THandleObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class encapsulating an operating system handle

Declaration

Source position: syncobjs.pp line 51

type THandleObject = class(TSynchroObject)
public
destructor destroy; override; | Free the instance
property Handle: TEventHandle; [r] | Handle for this object
property LastError: Integer; [r] | Last operating system error
end;

Inheritance

THandleObject | Class encapsulating an operating system handle
|
TSynchroObject | Abstract synchronization object
|
TObject

Description

THandleObject is a parent class for synchronization classes that need to store an operating system handle. It introduces a property Handle which can be used to store the operating system handle. The handle is in no way manipulated by THandleObject, only storage is provided.

See also

Handle

Handle for this object


THandleObject
 | ro | Handle
 | ro | LastError
TSynchroObject
TObject


ro | Handle (THandleObject)
ro |


THandleObject
 | destroy
TSynchroObject
 | Acquire
 | Release
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Acquire (TSynchroObject)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

destroy (THandleObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Release (TSynchroObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


THandleObject

TSynchroObject

TObject


THandleObject.destroy

Free the instance

Declaration

Source position: syncobjs.pp line 56

public destructor THandleObject.destroy; override;

Description

Destroy does nothing in the Free Pascal implementation of THandleObject.


THandleObject.Handle

Handle for this object

Declaration

Source position: syncobjs.pp line 57

public property THandleObject.Handle: TEventHandle
  read FHandle;

Description

Handle provides read-only access to the operating system handle of this instance. The public access is read-only, descendent classes should set the handle by accessing it's protected field FHandle directly.


THandleObject.LastError

Last operating system error

Declaration

Source position: syncobjs.pp line 58

public property THandleObject.LastError: Integer
  read FLastError;

Description

LastError provides read-only access to the last operating system error code for operations on Handle.

See also

Handle

Handle for this object


TSimpleEvent

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Simple, anonymous event

Declaration

Source position: syncobjs.pp line 76

type TSimpleEvent = class(TEventObject)

  constructor Create;

Creates a new TSimpleEvent instance

end;

Inheritance

TSimpleEvent | Simple, anonymous event
|
TEventObject | Event propagation object
|
THandleObject | Class encapsulating an operating system handle
|
TSynchroObject | Abstract synchronization object
|
TObject

Description

TSimpleEvent is a simple descendent of the TEventObject class. It creates an event with no name, which must be reset manually, and which is initially not set.

See also

TEventObject | Event propagation object
TSimpleEvent.Create | Creates a new TSimpleEvent instance


TSimpleEvent
TEventObject
 | ro | ManualReset
THandleObject
 | ro | Handle
 | ro | LastError
TSynchroObject
TObject


TSimpleEvent
 | Create
TEventObject
 | Create
 | destroy
 | ResetEvent
 | SetEvent
 | WaitFor
THandleObject
 | destroy
TSynchroObject
 | Acquire
 | Release
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Acquire (TSynchroObject)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

Create (TEventObject)

Create (TSimpleEvent)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

destroy (THandleObject)

destroy (TEventObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Release (TSynchroObject)

ResetEvent (TEventObject)

SafeCallException (TObject)

SetEvent (TEventObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

WaitFor (TEventObject)


TSimpleEvent

TEventObject

THandleObject

TSynchroObject

TObject


TSimpleEvent.Create

Creates a new TSimpleEvent instance

Declaration

Source position: syncobjs.pp line 77

constructor TSimpleEvent.Create;

Description

Create instantiates a new TSimpleEvent instance. It simply calls the inherited Create with Nil for the security attributes, an empty name, AManualReset set to True, and InitialState to False.

See also

TEventObject.Create

Create a new event object


TSynchroObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Abstract synchronization object

Declaration

Source position: syncobjs.pp line 33

type TSynchroObject = class(TObject)
procedure Acquire; virtual; | Acquire synchronization resource
procedure Release; virtual; | Release previously acquired synchronization resource
end;

Inheritance

TSynchroObject

Abstract synchronization object
|

TObject

Description

TSynchroObject is an abstract synchronization resource object. It implements 2 virtual methods Acquire which can be used to acquire the resource, and Release to release the resource.

See also

Acquire | Acquire synchronization resource
Release | Release previously acquired synchronization resource


TSynchroObject

TObject


TSynchroObject
 | Acquire
 | Release
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Acquire (TSynchroObject)

AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

Create (TObject)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FieldAddress (TObject)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Release (TSynchroObject)

SafeCallException (TObject)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)


TSynchroObject.Acquire

Acquire synchronization resource

Declaration

Source position: syncobjs.pp line 34

procedure TSynchroObject.Acquire; virtual;

Description

Acquire does nothing in TSynchroObject. Descendent classes must override this method to acquire the resource they manage.

See also

Release

Release previously acquired synchronization resource


TSynchroObject.Release

Release previously acquired synchronization resource

Declaration

Source position: syncobjs.pp line 35

procedure TSynchroObject.Release; virtual;

Description

Release does nothing in TSynchroObject. Descendent classes must override this method to release the resource they acquired through the Acquire call.

See also

Acquire

Acquire synchronization resource


Ecompressionerror

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Errors in the TCompressionStream class are signaled with this exception

Declaration

Source position: zstream.pp line 100

type Ecompressionerror = class(Ezliberror) end;

Inheritance

Ecompressionerror | Errors in the TCompressionStream class are signaled with this exception
|
Ezliberror | Base exception for exceptions in the ZStream unit
|
EStreamError
|
Exception
|
TObject

Description

ECompressionError is the exception class used by the TCompressionStream class.


Ecompressionerror
Ezliberror
EStreamError
Exception
 | HelpContext
 | Message
TObject


Ecompressionerror
Ezliberror
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Ecompressionerror

Ezliberror

EStreamError

Exception

TObject


Edecompressionerror

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Errors in the TDeCompressionStream class are signaled with this exception

Declaration

Source position: zstream.pp line 103

type Edecompressionerror = class(Ezliberror) end;

Inheritance

Edecompressionerror | Errors in the TDeCompressionStream class are signaled with this exception
|
Ezliberror | Base exception for exceptions in the ZStream unit
|
EStreamError
|
Exception
|
TObject

Description

EDecompressionError is the exception class used by the TDeCompressionStream class.


Edecompressionerror
Ezliberror
EStreamError
Exception
 | HelpContext
 | Message
TObject


Edecompressionerror
Ezliberror
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Edecompressionerror

Ezliberror

EStreamError

Exception

TObject


Egzfileerror

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Exception class used in Tgzfilestream class

Declaration

Source position: zstream.pp line 97

type Egzfileerror = class(Ezliberror) end;

Inheritance

Egzfileerror | Exception class used in Tgzfilestream class
|
Ezliberror | Base exception for exceptions in the ZStream unit
|
EStreamError
|
Exception
|
TObject

Description

Egzfileerror is the exception class used to report errors by the Tgzfilestream class.

See also

Tgzfilestream

Stream to read/write from a gzip file.


Egzfileerror
Ezliberror
EStreamError
Exception
 | HelpContext
 | Message
TObject


Egzfileerror
Ezliberror
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Egzfileerror

Ezliberror

EStreamError

Exception

TObject


Ezliberror

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base exception for exceptions in the ZStream unit

Declaration

Source position: zstream.pp line 94

type Ezliberror = class(EStreamError) end;

Inheritance

Ezliberror

Base exception for exceptions in the ZStream unit
|

EStreamError
|

Exception
|

TObject

Description

Errors which occur in the zstream unit are signaled by raising an EZLibError exception descendent.


Ezliberror
EStreamError
Exception
 | HelpContext
 | Message
TObject


Ezliberror
EStreamError
Exception
 | Create
 | CreateFmt
 | CreateRes
 | CreateResFmt
 | CreateHelp
 | CreateFmtHelp
 | CreateResHelp
 | CreateResFmtHelp
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


Ezliberror

EStreamError

Exception

TObject


Tcompressionstream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Write-only stream class which compresses data written to it.

Declaration

Source position: zstream.pp line 55

type Tcompressionstream = class(Tcustomzlibstream)
public
constructor create(); | Create a new instance of the compression stream.
destructor destroy; override; | Flushe data to the output stream and destroys the compression stream.
function write(); override; | Write data to the stream
procedure flush; | Flush remaining data to the target stream
function get_compressionrate; | Get the current compression rate
end;

Inheritance

Tcompressionstream | Write-only stream class which compresses data written to it.
|
Tcustomzlibstream | Ancestor for compression and decompression classes
|
TOwnerStream
|
TStream
|
TObject

Description

TCompressionStream

Documentation generated on: Aug 02 2012


Tcompressionstream
Tcustomzlibstream
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


Tcompressionstream
 | create
 | destroy
 | write
 | flush
 | get_compressionrate
Tcustomzlibstream
 | create
 | destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

create (Tcustomzlibstream)

create (Tcompressionstream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

destroy (Tcustomzlibstream)

destroy (Tcompressionstream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

flush (Tcompressionstream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

get_compressionrate (Tcompressionstream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

write (Tcompressionstream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


Tcompressionstream

Tcustomzlibstream

TOwnerStream

TStream

TObject


Tcompressionstream.create

Create a new instance of the compression stream.

Declaration

Source position: zstream.pp line 59

public constructor Tcompressionstream.create(

  level: Tcompressionlevel;

  dest: TStream;

  Askipheader: Boolean = False

);

Arguments

level | Compression level for compression stream
dest | Output stream to which compressed data is written.
Askipheader | If set, the deflated data block header is not written to stream

Description

Create creates a new instance of the compression stream. It merely calls the inherited constructor with the destination stream Dest and stores the compression level.

If ASkipHeader is set to True, the method will not write the block header to the stream. This is required for deflated data in a zip file.

Note that the compressed data is only completely written after the compression stream is destroyed.

See also

Destroy

Flushe data to the output stream and destroys the compression stream.


Tcompressionstream.destroy

Flushe data to the output stream and destroys the compression stream.

Declaration

Source position: zstream.pp line 62

public destructor Tcompressionstream.destroy; override;

Description

Destroy flushes the output stream: any compressed data not yet written to the output stream are written, and the deflate structures are cleaned up.

Errors

None.

See also

Create

Create a new instance of the compression stream.


Tcompressionstream.flush

Flush remaining data to the target stream

Declaration

Source position: zstream.pp line 64

public procedure Tcompressionstream.flush;

Description

flush writes any remaining data in the memory buffers to the target stream, and clears the memory buffer.


Tcompressionstream.get_compressionrate

Get the current compression rate

Declaration

Source position: zstream.pp line 65

public function Tcompressionstream.get_compressionrate: single;

Function result

Percentage of compression

Description

get_compressionrate returns the percentage of the number of written compressed bytes relative to the number of written bytes.

Errors

If no bytes were written, an exception is raised.


Tcompressionstream.write

Write data to the stream

Declaration

Source position: zstream.pp line 63

public function Tcompressionstream.write(

  const buffer;

  count: LongInt

):LongInt; override;

Arguments

buffer | Buffer to take data from.
count | Number of bytes to take from the buffer.

Function result

Number of (uncompressed) bytes actually written

Description

Write takes Count bytes from Buffer and comresseses (deflates) them. The compressed result is written to the output stream.

Errors

If an error occurs, an ECompressionError exception is raised.

See also

Read | Overridden to raise an exception.
Seek | Overrides seek to raise an exception.


Tcustomzlibstream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ancestor for compression and decompression classes

Declaration

Source position: zstream.pp line 43

type Tcustomzlibstream = class(TOwnerStream)
public
constructor create(); | Create a new instance of TCustomZlibStream
destructor destroy; override; | Clear up instance
end;

Inheritance

Tcustomzlibstream

Ancestor for compression and decompression classes
|

TOwnerStream
|

TStream
|

TObject

Description

TCustomZlibStream serves as the ancestor class for the TCompressionStream and TDeCompressionStream classes.

It introduces support for a progess handler, and stores the input or output stream.


Tcustomzlibstream
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


Tcustomzlibstream
 | create
 | destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

create (Tcustomzlibstream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

destroy (Tcustomzlibstream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


Tcustomzlibstream

TOwnerStream

TStream

TObject


Tcustomzlibstream.create

Create a new instance of TCustomZlibStream

Declaration

Source position: zstream.pp line 51

public constructor Tcustomzlibstream.create(

  stream: TStream

);

Arguments

stream

Source or target stream

Description

Create creates a new instance of TCustomZlibStream. It stores a reference to the input/output stream, and initializes the deflate compression mechanism so they can be used by the descendents.

See also

TCompressionStream | Write-only stream class which compresses data written to it.
TDecompressionStream | Reads and decompresses data from a compressed data stream.


Tcustomzlibstream.destroy

Clear up instance

Declaration

Source position: zstream.pp line 52

public destructor Tcustomzlibstream.destroy; override;

Description

Destroy cleans up the internal memory buffer and calls the inherited destroy.

See also

Tcustomzlibstream.create

Create a new instance of TCustomZlibStream


Tdecompressionstream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Reads and decompresses data from a compressed data stream.

Declaration

Source position: zstream.pp line 68

type Tdecompressionstream = class(Tcustomzlibstream)
public
constructor create(); | Creates a new instance of the TDecompressionStream stream
destructor destroy; override; | Destroys the TDecompressionStream instance
function read(); override; | Read data from the compressed stream
function seek(); override; | Move stream position to a certain location in the stream.
function get_compressionrate; | Get the current compression rate
end;

Inheritance

Tdecompressionstream | Reads and decompresses data from a compressed data stream.
|
Tcustomzlibstream | Ancestor for compression and decompression classes
|
TOwnerStream
|
TStream
|
TObject

Description

TDecompressionStream performs the inverse operation of TCompressionStream. A read operation reads data from an input stream and decompresses (inflates) the data it as it goes along.

The decompression stream reads it's compressed data from a stream with deflated data. This data can be created e.g. with a TCompressionStream compression stream.

See also

TCompressionStream

Write-only stream class which compresses data written to it.


Tdecompressionstream
Tcustomzlibstream
TOwnerStream
 | ro | Source
 |  | SourceOwner
TStream
 |  | Position
 |  | Size
TObject


Tdecompressionstream
 | create
 | destroy
 | read
 | seek
 | get_compressionrate
Tcustomzlibstream
 | create
 | destroy
TOwnerStream
 | Create
 | Destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

Create (TOwnerStream)

create (Tcustomzlibstream)

create (Tdecompressionstream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

Destroy (TOwnerStream)

destroy (Tcustomzlibstream)

destroy (Tdecompressionstream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

get_compressionrate (Tdecompressionstream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

read (Tdecompressionstream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

seek (Tdecompressionstream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


Tdecompressionstream

Tcustomzlibstream

TOwnerStream

TStream

TObject


Tdecompressionstream.create

Creates a new instance of the TDecompressionStream stream

Declaration

Source position: zstream.pp line 75

public constructor Tdecompressionstream.create(

  Asource: TStream;

  Askipheader: Boolean = False

);

Arguments

Asource | Stream with compressed data
Askipheader | Should the header data be skipped.

Description

Create creates and initializes a new instance of the TDecompressionStream class. It calls the inherited Create and passes it the Source stream. The source stream is the stream from which the compressed (deflated) data is read.

If ASkipHeader is true, then the gzip data header is skipped, allowing TDecompressionStream to read deflated data in a .zip file. (this data does not have the gzip header record prepended to it).

Note that the source stream is by default not owned by the decompression stream, and is not freed when the decompression stream is destroyed.

See also

Destroy

Destroys the TDecompressionStream instance


Tdecompressionstream.destroy

Destroys the TDecompressionStream instance

Declaration

Source position: zstream.pp line 76

public destructor Tdecompressionstream.destroy; override;

Description

Destroy cleans up the inflate structure, and then simply calls the inherited destroy.

By default the source stream is not freed when calling Destroy.

See also

Create

Creates a new instance of the TDecompressionStream stream


Tdecompressionstream.get_compressionrate

Get the current compression rate

Declaration

Source position: zstream.pp line 79

public function Tdecompressionstream.get_compressionrate: single;

Function result

Percentage of compression

Description

get_compressionrate returns the percentage of the number of read compressed bytes relative to the total number of read bytes.

Errors

If no bytes were written, an exception is raised.


Tdecompressionstream.read

Read data from the compressed stream

Declaration

Source position: zstream.pp line 77

public function Tdecompressionstream.read(

  var buffer;

  count: LongInt

):LongInt; override;

Arguments

buffer | Buffer in which to store the read data
count | Maximum number of bytes to read.

Function result

Number of decompressed bytes that were actually read

Description

Read will read data from the compressed stream until the decompressed data size is Count or there is no more compressed data available. The decompressed data is written in Buffer. The function returns the number of bytes written in the buffer.

Errors

If an error occurs, an EDeCompressionError exception is raised.

See also

Write

Write data to the stream


Tdecompressionstream.seek

Move stream position to a certain location in the stream.

Declaration

Source position: zstream.pp line 78

public function Tdecompressionstream.seek(

  offset: LongInt;

  origin: Word

):LongInt; override;

Arguments

offset | Offset to apply to the position in the stream
origin | Origin from where Offset should be counted.

Function result

New position in the stream

Description

Seek overrides the standard Seek implementation. There are a few differences between the implementation of Seek in Free Pascal compared to Delphi:

  • In Free Pascal, you can perform any seek. In case of a forward seek, the Free Pascal implementation will read some bytes until the desired position is reached, in case of a backward seek it will seek the source stream backwards to the position it had at the creation time of the TDecompressionStream and then again read some bytes until the desired position has been reached.
  • In Free Pascal, a seek with soFromBeginning will reset the source stream to the position it had when the TDecompressionStream was created. In Delphi, the source stream is reset to position 0. This means that at creation time the source stream must always be at the start of the zstream, you cannot use TDecompressionStream.Seek to reset the source stream to the begin of the file.

Errors

An EDecompressionError exception is raised if the stream does not allow the requested seek operation.

See also

Read

Read data from the compressed stream


TGZFileStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Stream to read/write from a gzip file.

Declaration

Source position: zstream.pp line 82

type TGZFileStream = class(TStream)
public
constructor create(); | Create a new instance of TGZFileStream
function read(); override; | Read data from the compressed file
function write(); override; | Write data to be compressed
function seek(); override; | Set the position in the compressed stream.
destructor destroy; override; | Removes TGZFileStream instance
end;

Inheritance

TGZFileStream

Stream to read/write from a gzip file.
|

TStream
|

TObject

Description

TGZFileStream can be used to read data from a gzip file, or to write data to a gzip file.

See also

TCompressionStream | Write-only stream class which compresses data written to it.
TDeCompressionStream | Reads and decompresses data from a compressed data stream.


TGZFileStream
TStream
 | Position
 | Size
TObject


Position (TStream)

Size (TStream)


TGZFileStream
 | create
 | read
 | write
 | seek
 | destroy
TStream
 | InvalidSeek
 | Discard
 | DiscardLarge
 | FakeSeekForward
 | GetPosition
 | SetPosition
 | GetSize
 | SetSize64
 | SetSize
 | ReadNotImplemented
 | WriteNotImplemented
 | Read
 | Write
 | Seek
 | ReadBuffer
 | WriteBuffer
 | CopyFrom
 | ReadComponent
 | ReadComponentRes
 | WriteComponent
 | WriteComponentRes
 | WriteDescendent
 | WriteDescendentRes
 | WriteResourceHeader
 | FixupResourceHeader
 | ReadResHeader
 | ReadByte
 | ReadWord
 | ReadDWord
 | ReadQWord
 | ReadAnsiString
 | WriteByte
 | WriteWord
 | WriteDWord
 | WriteQWord
 | WriteAnsiString
TObject
 | Create
 | Destroy
 | newinstance
 | FreeInstance
 | SafeCallException
 | DefaultHandler
 | Free
 | InitInstance
 | CleanupInstance
 | ClassType
 | ClassInfo
 | ClassName
 | ClassNameIs
 | ClassParent
 | InstanceSize
 | InheritsFrom
 | StringMessageTable
 | MethodAddress
 | MethodName
 | FieldAddress
 | AfterConstruction
 | BeforeDestruction
 | DefaultHandlerStr
 | Dispatch
 | DispatchStr
 | GetInterface
 | GetInterfaceByStr
 | GetInterfaceWeak
 | GetInterfaceEntry
 | GetInterfaceEntryByStr
 | GetInterfaceTable
 | UnitName
 | Equals
 | GetHashCode
 | ToString


AfterConstruction (TObject)

BeforeDestruction (TObject)

ClassInfo (TObject)

ClassName (TObject)

ClassNameIs (TObject)

ClassParent (TObject)

ClassType (TObject)

CleanupInstance (TObject)

CopyFrom (TStream)

Create (TObject)

create (TGZFileStream)

DefaultHandler (TObject)

DefaultHandlerStr (TObject)

Destroy (TObject)

destroy (TGZFileStream)

Discard (TStream)

DiscardLarge (TStream)

Dispatch (TObject)

DispatchStr (TObject)

Equals (TObject)

FakeSeekForward (TStream)

FieldAddress (TObject)

FixupResourceHeader (TStream)

Free (TObject)

FreeInstance (TObject)

GetHashCode (TObject)

GetInterface (TObject)

GetInterfaceByStr (TObject)

GetInterfaceEntry (TObject)

GetInterfaceEntryByStr (TObject)

GetInterfaceTable (TObject)

GetInterfaceWeak (TObject)

GetPosition (TStream)

GetSize (TStream)

InheritsFrom (TObject)

InitInstance (TObject)

InstanceSize (TObject)

InvalidSeek (TStream)

MethodAddress (TObject)

MethodName (TObject)

newinstance (TObject)

Read (TStream)

read (TGZFileStream)

ReadAnsiString (TStream)

ReadBuffer (TStream)

ReadByte (TStream)

ReadComponent (TStream)

ReadComponentRes (TStream)

ReadDWord (TStream)

ReadNotImplemented (TStream)

ReadQWord (TStream)

ReadResHeader (TStream)

ReadWord (TStream)

SafeCallException (TObject)

Seek (TStream)

seek (TGZFileStream)

SetPosition (TStream)

SetSize (TStream)

SetSize64 (TStream)

StringMessageTable (TObject)

ToString (TObject)

UnitName (TObject)

Write (TStream)

write (TGZFileStream)

WriteAnsiString (TStream)

WriteBuffer (TStream)

WriteByte (TStream)

WriteComponent (TStream)

WriteComponentRes (TStream)

WriteDescendent (TStream)

WriteDescendentRes (TStream)

WriteDWord (TStream)

WriteNotImplemented (TStream)


TGZFileStream

TStream

TObject


TGZFileStream.create

Create a new instance of TGZFileStream

Declaration

Source position: zstream.pp line 87

public constructor TGZFileStream.create(

  filename: ansistring;

  filemode: Tgzopenmode

);

Arguments

filename | Name of the gzip file
filemode | Open mode for the file.

Description

Create creates a new instance of the TGZFileStream class. It opens FileName for reading or writing, depending on the FileMode parameter. It is not possible to open the file read-write. If the file is opened for reading, it must exist.

If the file is opened for reading, the TGZFileStream.Read method can be used for reading the data in uncompressed form.

If the file is opened for writing, any data written using the TGZFileStream.Write method will be stored in the file in compressed (deflated) form.

Errors

If the file is not found, an EZlibError exception is raised.

See also

Destroy | Removes TGZFileStream instance
TGZOpenMode | Open mode for gzip file.


TGZFileStream.destroy

Removes TGZFileStream instance

Declaration

Source position: zstream.pp line 91

public destructor TGZFileStream.destroy; override;

Description

Destroy closes the file and releases the TGZFileStream instance from memory.

See also

Create

Create a new instance of TGZFileStream


TGZFileStream.read

Read data from the compressed file

Declaration

Source position: zstream.pp line 88

public function TGZFileStream.read(

  var buffer;

  count: LongInt

):LongInt; override;

Arguments

buffer | Memory buffer to store the data in
count | Number of (uncompressed) bytes to read.

Function result

Number of bytes (uncompressed) actually read

Description

Read overrides the Read method of TStream to read the data from the compressed file. The Buffer parameter indicates where the read data should be stored. The Count parameter specifies the number of bytes (uncompressed) that should be read from the compressed file. Note that it is not possible to read from the stream if it was opened in write mode.

The function returns the number of uncompressed bytes actually read.

Errors

If Buffer points to an invalid location, or does not have enough room for Count bytes, an exception will be raised.

See also

Create | Create a new instance of TGZFileStream
Write | Write data to be compressed
Seek | Set the position in the compressed stream.


TGZFileStream.seek

Set the position in the compressed stream.

Declaration

Source position: zstream.pp line 90

public function TGZFileStream.seek(

  offset: LongInt;

  origin: Word

):LongInt; override;

Arguments

offset | Number of bytes to position on
origin | Where to start positioning

Function result

New position in the stream

Description

Seek sets the position to Offset bytes, starting from Origin. Not all combinations are possible, see TDecompressionStream.Seek for a list of possibilities.

Errors

In case an impossible combination is asked, an EZlibError exception is raised.

See also

TDecompressionStream.Seek

Move stream position to a certain location in the stream.


TGZFileStream.write

Write data to be compressed

Declaration

Source position: zstream.pp line 89

public function TGZFileStream.write(

  const buffer;

  count: LongInt

):LongInt; override;

Arguments

buffer | Memory location containing the data to be written.
count | Number of bytes to write.

Function result

Number of uncompressed bytes written

Description

Write writes Count bytes from Buffer to the compressed file. The data is compressed as it is written, so ideally, less than Count bytes end up in the compressed file. Note that it is not possible to write to the stream if it was opened in read mode.

The function returns the number of (uncompressed) bytes that were actually written.

Errors

In case of an error, an EZlibError exception is raised.

See also

Create | Create a new instance of TGZFileStream
Read | Read data from the compressed file
Seek | Set the position in the compressed stream.


DecodeStringBase64

Decodes a Base64 encoded string and returns the decoded data as a string.

Declaration

Source position: base64.pp line 91

function DecodeStringBase64(

  const s:

):;

Arguments

s

The base64 encoded string to decode

Function result

The base64 decoded version of S

Description

DecodeStringBase64 decodes the string s (containing Base 64 encoded data) returns the decoded data as a string. It uses a TBase64DecodingStream to do this.

See also

DecodeStringBase64 | Decodes a Base64 encoded string and returns the decoded data as a string.
TBase64DecodingStream | Base64 Decoding stream


EncodeStringBase64

Encode a string with Base64 encoding and return the result as a string.

Declaration

Source position: base64.pp line 90

function EncodeStringBase64(

  const s:

):;

Arguments

s

The string to encode with base64

Function result

The Base64 encoded version of S

Description

EncodeStringBase64 encodes the string s using Base 64 encoding and returns the result. It uses a TBase64EncodingStream to do this.

See also

DecodeStringBase64 | Decodes a Base64 encoded string and returns the decoded data as a string.
TBase64EncodingStream | Base64 encoding stream.


RSHash

Standard hash value calculating function.

Declaration

Source position: contnrs.pp line 479

function RSHash(

  const S: ;

  const TableSize: LongWord

):LongWord;

Arguments

S | String to calculate hash value from
TableSize | Hash table size

Function result

Hash value

Description

RSHash is the standard hash calculating function used in the TFPCustomHashTable hash class. It's Robert Sedgwick's "Algorithms in C" hash function.

Errors

None.

See also

TFPCustomHashTable

Hash class


Application

Application instance

Declaration

Source position: daemonapp.pp line 386

function Application: TCustomDaemonApplication;

Function result

TCustomDaemonApplication instance used by application

Description

Application is the TCustomDaemonApplication instance used by this application. The instance is created at the first invocation of this function, so it is possible to use RegisterDaemonApplicationClass to register an alternative TCustomDaemonApplication class to run the application.

See also

TCustomDaemonApplication | Custom daemon application class
RegisterDaemonApplicationClass | Register alternative TCustomDaemonApplication class.


DaemonError

Raise an EDaemon exception

Declaration

Source position: line 0

procedure DaemonError(

  Msg:

);

procedure DaemonError(

  Fmt: ;

  Args: array of Const

);

Arguments

Msg

Message for the exception

Arguments

Fmt | Formatting string for exception message
Args | Arguments to format for exception message

Description

DaemonError raises an EDaemon exception with message Msg or it formats the message using Fmt and Args.

See also

EDaemon

Exception used in all daemon application code


RegisterDaemonApplicationClass

Register alternative TCustomDaemonApplication class.

Declaration

Source position: daemonapp.pp line 389

procedure RegisterDaemonApplicationClass(

  AClass: TCustomDaemonApplicationClass

);

Arguments

AClass

New class pointer to be used

Description

RegisterDaemonApplicationClass can be used to register an alternative TCustomDaemonApplication descendent which will be used when creating the global Application instance. Only the last registered class pointer will be used.

See also

TCustomDaemonApplication | Custom daemon application class
Application | Application instance


RegisterDaemonClass

Register daemon

Declaration

Source position: daemonapp.pp line 388

procedure RegisterDaemonClass(

  AClass: TCustomDaemonClass

);

Arguments

AClass

TCustomDaemon descendent class to be registered.

Description

RegisterDaemonClass must be called for each TCustomDaemon descendent that is used in the class: the class pointer and class name are used by the TCustomDaemonMapperClass class to create a TCustomDaemon instance when a daemon is required.

See also

TCustomDaemonMapperClass | Class of TCustomDaemonMapper
TCustomDaemon | Base daemon application class


RegisterDaemonMapper

Register a daemon mapper class

Declaration

Source position: daemonapp.pp line 387

procedure RegisterDaemonMapper(

  AMapperClass: TCustomDaemonMapperClass

);

Arguments

AMapperClass

New TCustomDaemonMapperClass class

Description

RegisterDaemonMapper can be used to register an alternative class for the global daemonmapper. The daemonmapper will be used only when the application is being run, by the TCustomDaemonApplication code, so registering an alternative mapping class should happen in the initialization section of the application units.

See also

TCustomDaemonApplication | Custom daemon application class
TCustomDaemonMapperClass | Class of TCustomDaemonMapper


BuffersEqual

Check whether 2 memory buffers are equal

Declaration

Source position: db.pas line 2100

function BuffersEqual(

  Buf1: Pointer;

  Buf2: Pointer;

  Size: Integer

):Boolean;

Arguments

Buf1 | Pointer to first memory area.
Buf2 | Pointer to second memory area
Size | Number of bytes to compare.

Function result

True if the memory areas have the same content.

Description

BuffersEqual compares the memory areas pointed to by the Buf1 and Buf2 pointers and returns True if the contents are equal. The memory areas are compared for the first Size bytes. If all bytes in the indicated areas are equal, then True is returned, otherwise False is returned.

Errors

If Buf1 or Buf2 do not point to a valid memory area or Size is too large, then an exception may occur

See also

#rtl.sysutils.Comparemem


DatabaseError

Raise an EDatabaseError exception.

Declaration

Source position: line 0

procedure DatabaseError(

  const Msg:

); overload;

procedure DatabaseError(

  const Msg: ;

  Comp: TComponent

); overload;

Arguments

Msg

Message to specify for the exception

Arguments

Msg | Message to specify for the exception
Comp | Prepend the name of this Component to the message

Description

DatabaseError raises an EDatabaseError exception, passing it Msg. If Comp is specified, the name of the component is prepended to the message.

See also

DatabaseErrorFmt | Raise an EDatabaseError exception with a formatted message
EDatabaseError | Base class for all database-related errors


DatabaseErrorFmt

Raise an EDatabaseError exception with a formatted message

Declaration

Source position: line 0

procedure DatabaseErrorFmt(

  const Fmt: ;

  Args: array of Const

); overload;

procedure DatabaseErrorFmt(

  const Fmt: ;

  Args: array of Const;

  Comp: TComponent

); overload;

Arguments

Fmt | Formatting string
Args | Formatting arguments

Arguments

Fmt | Formatting string
Args | Formatting arguments
Comp | Prepend the name of this Component to the message

Description

DatabaseErrorFmt raises an EDatabaseError exception, passing it a message made by calling #rtl.sysutils.format with the fmt and Args arguments. If Comp is specified, the name of the component is prepended to the message.

See also

DatabaseError | Raise an EDatabaseError exception.
EDatabaseError | Base class for all database-related errors


DateTimeRecToDateTime

Convert TDateTimeRec record to a TDateTime value.

Declaration

Source position: db.pas line 2096

function DateTimeRecToDateTime(

  DT: TFieldType;

  Data: TDateTimeRec

):TDateTime;

Arguments

DT | Datatype of Data.
Data | Timestamp specification in TDateTimeRec formar.

Function result

TDateTime value corresponding to timestamp in Data.

Description

DateTimeRecToDateTime examines Data and Dt and uses dt to convert the timestamp in Data to a TDateTime value.

See also

TFieldType | Field data type description
TDateTimeRec | Date/Time record
DateTimeToDateTimeRec | Convert TDateTime value to a TDateTimeRec record.


DateTimeToDateTimeRec

Convert TDateTime value to a TDateTimeRec record.

Declaration

Source position: db.pas line 2097

function DateTimeToDateTimeRec(

  DT: TFieldType;

  Data: TDateTime

):TDateTimeRec;

Arguments

DT | Datatype for result
Data | Timestam specification in TDateTime format.

Function result

TDateTimeRec record corresponding to timestamp in Data.

Description

DateTimeToDateTimeRec examines Data and Dt and uses dt to convert the date/time valuein Data to a TDateTimeRec record.

See also

TFieldType | Field data type description
TDateTimeRec | Date/Time record
DateTimeRecToDateTime | Convert TDateTimeRec record to a TDateTime value.


DisposeMem

Dispose of a heap memory block and Nil the pointer (deprecated)

Declaration

Source position: db.pas line 2099

procedure DisposeMem(

  var Buffer;

  Size: Integer

);

Arguments

Buffer | Pointer to memory area
Size | Size of the memory block

Description

DisposeMem disposes of the heap memory area pointed to by Buffer (Buffer must be of type Pointer). The Size parameter indicates the size of the memory area (it is, in fact, ignored by the heap manager). The pointer Buffer is set to Nil. If Buffer is Nil, then nothing happens. Do not use DisposeMem on objects, because their destructor will not be called.

Errors

If Buffer is not pointing to a valid heap memory block, then memory corruption may occur.

See also

#rtl.system.FreeMem

#rtl.sysutils.freeandnil


ExtractFieldName

Extract the field name at position

Declaration

Source position: db.pas line 2095

function ExtractFieldName(

  const Fields: ;

  var Pos: Integer

):;

Arguments

Fields | Semicolon-separated list of field names
Pos | Position to start copying.

Function result

Name of the field

Description

ExtractFieldName returns the string starting at position Pos till the next semicolon (;) character or the end of the string. On return, Pos contains the position of the first character after the semicolon character (or one more than the length of the string).

See also

Tfields.GetFieldList


SkipComments

Skip SQL comments

Declaration

Source position: db.pas line 2102

function SkipComments(

  var p: PChar;

  EscapeSlash: Boolean;

  EscapeRepeat: Boolean

):Boolean;

Arguments

p | Pointer to null-terminated string containing a SQL statement.
EscapeSlash | Is a backslash an escape character
EscapeRepeat | Are repeated quotes considered a single character

Function result

True if a comment was skipped.

Description

SkipComments examines the null-terminated string in P and skips any SQL comment or string literal found at the start. It returns P the first non-comment or non-string literal position. The EscapeSlash parameter determines whether the backslash character (\) functions as an escape character (i.e. the following character is not considered a delimiter). EscapeRepeat must be set to True if the quote character is repeated to indicate itself.

The function returns True if a comment was found and skipped, False otherwise.

Errors

No checks are done on the validity of P.

See also

TParams.ParseSQL

Parse SQL statement, replacing parameter names with SQL parameter placeholders


GetDebuggingEnabled

Check if sending of debug messages is enabled.

Declaration

Source position: dbugintf.pp line 38

function GetDebuggingEnabled: Boolean;

Function result

True if sending debug messages is currently enabled.

Description

GetDebuggingEnabled returns the value set by the last call to SetDebuggingEnabled. It is True by default.

See also

SetDebuggingEnabled | Temporary enables or disables debugging
SendDebug | Send a message to the debug server.


InitDebugClient

Initialize the debug client.

Declaration

Source position: dbugintf.pp line 43

function InitDebugClient: Boolean;

Function result

True if the client was successfully started.

Description

InitDebugClient starts the debug server and then performs all necessary initialization of the debug IPC communication channel.

Normally this function should not be called. The SendDebug call will initialize the debug client when it is first called.

Errors

None.

See also

SendDebug | Send a message to the debug server.
StartDebugServer | Start the debug server


SendBoolean

Send the value of a boolean variable

Declaration

Source position: dbugintf.pp line 25

procedure SendBoolean(

  const Identifier: ;

  const Value: Boolean

);

Arguments

Identifier | Name of the boolean variable
Value | Value of the boolean variable.

Description

SendBoolean is a simple wrapper around SendDebug which sends the name and value of a boolean value as an informational message.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendDateTime | Send the value of a TDateTime variable.
SendInteger | Send the value of an integer variable.
SendPointer | Send the value of a pointer variable.


SendDateTime

Send the value of a TDateTime variable.

Declaration

Source position: dbugintf.pp line 26

procedure SendDateTime(

  const Identifier: ;

  const Value: TDateTime

);

Arguments

Identifier | Name of the TDateTime variable
Value | The actual date/time

Description

SendDateTime is a simple wrapper around SendDebug which sends the name and value of an integer value as an informational message. The value is converted to a string using the DateTimeToStr call.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendBoolean | Send the value of a boolean variable
SendInteger | Send the value of an integer variable.
SendPointer | Send the value of a pointer variable.


SendDebug

Send a message to the debug server.

Declaration

Source position: dbugintf.pp line 30

procedure SendDebug(

  const Msg:

);

Arguments

Msg

The message to be sent to the server.

Description

SendDebug sends the message Msg to the debug server as an informational message (debug level dlInformation). If no debug server is running, then an attempt will be made to start the server first.

The binary that is started is called debugserver and should be somewhere on the PATH. A sample binary which writes received messages to standard output is included in the FCL, it is called dbugsrv. This binary can be renamed to debugserver or can be started before the program is started.

Errors

Errors are silently ignored, any exception messages are stored in SendError.

See also

SendDebugEx | Send debug message other than informational messages
SendDebugFmt | Format and send a debug message
SendDebugFmtEx | Format and send message with alternate type


SendDebugEx

Send debug message other than informational messages

Declaration

Source position: dbugintf.pp line 29

procedure SendDebugEx(

  const Msg: ;

  MType: TDebugLevel

);

Arguments

Msg | Message to be sent
MType | Debug level of the message to be sent

Description

SendDebugEx allows to specify the debug level of the message to be sent in MType. By default, SendDebug uses informational messages.

Other than that the function of SendDebugEx is equal to that of SendDebug

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendDebugFmt | Format and send a debug message
SendDebugFmtEx | Format and send message with alternate type


SendDebugFmt

Format and send a debug message

Declaration

Source position: dbugintf.pp line 34

procedure SendDebugFmt(

  const Msg: ;

  const Args: array of Const

);

Arguments

Msg | Template for message
Args | Arguments to be inserted in template

Description

SendDebugFmt is a utility routine which formats a message by passing Msg and Args to Format and sends the result to the debug server using SendDebug. It exists mainly to avoid the Format call in calling code.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendDebugEx | Send debug message other than informational messages
SendDebugFmtEx | Format and send message with alternate type
#rtl.sysutils.format


SendDebugFmtEx

Format and send message with alternate type

Declaration

Source position: dbugintf.pp line 35

procedure SendDebugFmtEx(

  const Msg: ;

  const Args: array of Const;

  MType: TDebugLevel

);

Arguments

Msg | Message template
Args | Arguments to insert in template
MType | Debug level of message

Description

SendDebugFmtEx is a utility routine which formats a message by passing Msg and Args to Format and sends the result to the debug server using SendDebugEx with Debug level MType. It exists mainly to avoid the Format call in calling code.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendDebugEx | Send debug message other than informational messages
SendDebugFmt | Format and send a debug message
#rtl.sysutils.format


SendInteger

Send the value of an integer variable.

Declaration

Source position: dbugintf.pp line 27

procedure SendInteger(

  const Identifier: ;

  const Value: Integer;

  HexNotation: Boolean = False

);

Arguments

Identifier | Name of the integer variable
Value | The actual value
HexNotation | Format integer using hexadecimal notation

Description

SendInteger is a simple wrapper around SendDebug which sends the name and value of an integer value as an informational message. If HexNotation is True, then the value will be displayed using hexadecimal notation.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendBoolean | Send the value of a boolean variable
SendDateTime | Send the value of a TDateTime variable.
SendPointer | Send the value of a pointer variable.


SendMethodEnter

Send method enter message

Declaration

Source position: dbugintf.pp line 31

procedure SendMethodEnter(

  const MethodName:

);

Arguments

MethodName

Name of the entered method

Description

SendMethodEnter sends a "Entering MethodName" message to the debug server. After that it increases the message indentation (currently 2 characters). By sending a corresponding SendMethodExit, the indentation of messages can be decreased again.

By using the SendMethodEnter and SendMethodExit methods at the beginning and end of a procedure/method, it is possible to visually trace program execution.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendMethodExit | Send method exit message
SendSeparator | Send a separator message


SendMethodExit

Send method exit message

Declaration

Source position: dbugintf.pp line 32

procedure SendMethodExit(

  const MethodName:

);

Arguments

MethodName

Name of the method that is entered

Description

SendMethodExit sends a "Exiting MethodName" message to the debug server. After that it decreases the message indentation (currently 2 characters). By sending a corresponding SendMethodEnter, the indentation of messages can be increased again.

By using the SendMethodEnter and SendMethodExit methods at the beginning and end of a procedure/method, it is possible to visually trace program execution.

Note that the indentation level will not be made negative.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendMethodEnter | Send method enter message
SendSeparator | Send a separator message


SendPointer

Send the value of a pointer variable.

Declaration

Source position: dbugintf.pp line 28

procedure SendPointer(

  const Identifier: ;

  const Value: Pointer

);

Arguments

Identifier | Name of the pointer variable
Value | The actual pointer value

Description

SendInteger is a simple wrapper around SendDebug which sends the name and value of a pointer value as an informational message. The pointer value is displayed using hexadecimal notation.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendBoolean | Send the value of a boolean variable
SendDateTime | Send the value of a TDateTime variable.
SendInteger | Send the value of an integer variable.


SendSeparator

Send a separator message

Declaration

Source position: dbugintf.pp line 33

procedure SendSeparator;

Description

SendSeparator is a simple wrapper around SendDebug which sends a short horizontal line to the debug server. It can be used to visually separate execution of blocks of code or blocks of values.

Errors

None.

See also

SendDebug | Send a message to the debug server.
SendMethodEnter | Send method enter message
SendMethodExit | Send method exit message


SetDebuggingEnabled

Temporary enables or disables debugging

Declaration

Source position: dbugintf.pp line 37

procedure SetDebuggingEnabled(

  const AValue: Boolean

);

Arguments

AValue

Should sending of debug messages be enabled or not

Description

SetDebuggingEnabled can be used to temporarily enable or disable sending of debug messages: this allows to control the amount of messages sent to the debug server without having to remove the SendDebug statements. By default, debugging is enabled. If set to false, debug messages are simply discarded till debugging is enabled again.

A value of True enables sending of debug messages. A value of False disables sending.

Errors

None.

See also

GetDebuggingEnabled | Check if sending of debug messages is enabled.
SendDebug | Send a message to the debug server.


StartDebugServer

Start the debug server

Declaration

Source position: dbugintf.pp line 42

function StartDebugServer: Integer;

Function result

True if started succesfully, false otherwise

Description

StartDebugServer attempts to start the debug server. The process started is called debugserver and should be located in the PATH.

Normally this function should not be called. The SendDebug call will attempt to start the server by itself if it is not yet running.

Errors

On error, False is returned.

See also

SendDebug | Send a message to the debug server.
InitDebugClient | Initialize the debug client.


DebugMessageName

Return the name of the debug message

Declaration

Source position: dbugmsg.pp line 42

function DebugMessageName(

  msgType: Integer

):;

Arguments

msgType

Message type

Function result

String describing the message type

Description

DebugMessageName returns the name of the message type. It can be used to examine the MsgType field of a TDebugMessage record, and if msgType contains a known type, it returns a string describing this type.

Errors

If MsgType contains an unknown type, 'Unknown' is returned.


ReadDebugMessageFromStream

Read a message from stream

Declaration

Source position: dbugmsg.pp line 40

procedure ReadDebugMessageFromStream(

  AStream: TStream;

  var Msg: TDebugMessage

);

Arguments

AStream | Stream from which record is read
Msg | Record to be read from stream

Description

ReadDebugMessageFromStream reads a TDebugMessage record (Msg) from the stream AStream.

The record is not read in a byte-ordering safe way, i.e. it cannot be exchanged between little- and big-endian systems.

Errors

If the stream contains not enough bytes or is malformed, then an exception may be raised.

See also

TDebugMessage | Structure describing a message
WriteDebugMessageToStream | Write a message to stream


WriteDebugMessageToStream

Write a message to stream

Declaration

Source position: dbugmsg.pp line 41

procedure WriteDebugMessageToStream(

  AStream: TStream;

  const Msg: TDebugMessage

);

Arguments

AStream | Stream to write message to
Msg | Message record to be written

Description

WriteDebugMessageFromStream writes a TDebugMessage record (Msg) to the stream AStream.

The record is not written in a byte-ordering safe way, i.e. it cannot be exchanged between little- and big-endian systems.

Errors

A stream write error may occur if the stream cannot be written to.

See also

TDebugMessage | Structure describing a message
ReadDebugMessageFromStream | Read a message from stream


GetLanguageIDs

Return the current language IDs

Declaration

Source position: gettext.pp line 72

procedure GetLanguageIDs(

  var Lang: ;

  var FallbackLang:

);

Arguments

Lang | Primary language
FallbackLang | Secondary language

Description

GetLanguageIDs returns the current language IDs (an ISO string) as returned by the operating system. On windows, the GetUserDefaultLCID and GetLocaleInfo calls are used. On other operating systems, the LC_ALL, LC_MESSAGES or LANG environment variables are examined.


TranslateResourceStrings

Translate the resource strings of the application.

Declaration

Source position: line 0

procedure TranslateResourceStrings(

  AFile: TMOFile

);

procedure TranslateResourceStrings(

  const AFilename:

);

Arguments

AFile

TMOfile instance with translated strings.

Arguments

AFilename

Name of .mo file with translated strings

Description

TranslateResourceStrings translates all the resource strings in the application based on the values in the .mo file AFileName or AFile. The procedure creates an TMOFile instance to read the .mo file if a filename is given.

Errors

If the file does not exist or is an invalid .mo file.

See also

TranslateUnitResourceStrings | Translate the resource strings of a unit.
TMOFile | Class providing access to a .mo file.


TranslateUnitResourceStrings

Translate the resource strings of a unit.

Declaration

Source position: line 0

procedure TranslateUnitResourceStrings(

  const AUnitName: ;

  AFile: TMOFile

);

procedure TranslateUnitResourceStrings(

  const AUnitName: ;

  const AFilename:

);

Arguments

AUnitName | Name of the unit whose strings should be translated.
AFile | TMOFile instance with translated strings.

Arguments

AUnitName | Name of the unit whose strings should be translated.
AFilename | Name of .mo file with translated strings

Description

TranslateUnitResourceStrings is identical in function to TranslateResourceStrings, but translates the strings of a single unit (AUnitName) which was used to compile the application. This can be more convenient, since the resource string files are created on a unit basis.

See also

TranslateResourceStrings | Translate the resource strings of the application.
TMOFile | Class providing access to a .mo file.


CipherIdea

Encrypt or decrypt a buffer.

Declaration

Source position: idea.pp line 69

procedure CipherIdea(

  Input: TIdeaCryptData;

  out outdata: TIdeaCryptData;

  z: TIDEAKey

);

Arguments

Input | Data to be encrypted/decrypted
outdata | Decrypted/Encrypted data
z | Key to use for Encryption/Decryption

Description

CipherIdea encrypts or decrypts a buffer with data (Input) using key z. The resulting encrypted or decrypted data is returned in Output.

Errors

None.

See also

EnKeyIdea | Create an IDEA encryption key from a user key.
DeKeyIdea | Create a decryption key from an encryption key.
TIDEAEncryptStream | IDEA encryption stream.
TIDEADecryptStream | IDEA Decryption stream.


DeKeyIdea

Create a decryption key from an encryption key.

Declaration

Source position: idea.pp line 68

procedure DeKeyIdea(

  z: TIDEAKey;

  out dk: TIDEAKey

);

Arguments

z | Encryption key
dk | Key for decryption

Description

DeKeyIdea creates a decryption key based on the encryption key z. The decryption key is returned in dk. Note that only a decryption key generated from the encryption key that was used to encrypt the data can be used to decrypt the data.

Errors

None.

See also

EnKeyIdea | Create an IDEA encryption key from a user key.
CipherIdea | Encrypt or decrypt a buffer.


EnKeyIdea

Create an IDEA encryption key from a user key.

Declaration

Source position: idea.pp line 67

procedure EnKeyIdea(

  UserKey: TIdeaCryptKey;

  out z: TIDEAKey

);

Arguments

UserKey | User-supplied data to generate key from
z | 64-bit Encryption key.

Description

EnKeyIdea creates an IDEA encryption key from user-supplied data in UserKey. The Encryption key is stored in z.

Errors

None.

See also

DeKeyIdea | Create a decryption key from an encryption key.
CipherIdea | Encrypt or decrypt a buffer.


ClearDirRec

Initialize tar archive entry

Declaration

Source position: libtar.pp line 233

procedure ClearDirRec(

  var DirRec: TTarDirRec

);

Arguments

DirRec

Record to clear.

Description

ClearDirRec clears the DirRec entry, it basically zeroes out all fields.

See also

TTarDirRec

Tar Directory entry


ConvertFilename

Convert filename to archive format

Declaration

Source position: libtar.pp line 230

function ConvertFilename(

  Filename:

):;

Arguments

Filename

Filename to correct

Function result

Corrected filename in archive format

Description

ConvertFileName converts the file name FileName to a format allowed by the tar archive. Basically, it converts directory specifiers to forward slashes.


FileTimeGMT

Extract filetime

Declaration

Source position: line 0

function FileTimeGMT(

  FileName:

):TDateTime; overload;

function FileTimeGMT(

  SearchRec: TSearchRec

):TDateTime; overload;

Arguments

FileName

Name of file to examine

Function result

File time in GMT notation

Arguments

SearchRec

Searchrec from which timestamp is taken

Description

FileTimeGMT returns the timestamp of a filename (FileName must exist) or a search rec (TSearchRec) to a GMT representation that can be used in a tar entry.

See also

TTarDirRec

Tar Directory entry


PermissionString

Convert a set of permissions to a string

Declaration

Source position: libtar.pp line 229

function PermissionString(

  Permissions: TTarPermissions

):;

Arguments

Permissions

Set of permissions

Function result

String representation of Permissions

Description

PermissionString can be used to convert a set of Permissions to a string in the same format as used by the unix 'ls' command.

See also

TTarPermissions

Complete set of permissions for file


CreatePipeHandles

Function to create a set of pipe handles

Declaration

Source position: pipes.pp line 53

function CreatePipeHandles(

  var Inhandle: THandle;

  var OutHandle: THandle

):Boolean;

Arguments

Inhandle | File handle for reading end of the pipe
OutHandle | File handle for writing end of the pipe

Function result

True if the call was succesul, False if not.

Description

CreatePipeHandles provides an OS-independent way to create a set of pipe filehandles. These handles are inheritable to child processes. The reading end of the pipe is returned in InHandle, the writing end in OutHandle.

Errors

On error, False is returned.

See also

CreatePipeStreams

Create a pair of pipe stream.


CreatePipeStreams

Create a pair of pipe stream.

Declaration

Source position: pipes.pp line 54

procedure CreatePipeStreams(

  var InPipe: TInputPipeStream;

  var OutPipe: TOutputPipeStream

);

Arguments

InPipe | Contains the read end of the pipe on return
OutPipe | Contains the write end of the pipe on return.

Description

CreatePipeStreams creates a set of pipe file descriptors with CreatePipeHandles, and if that call is succesfull, a pair of streams is created: InPipe and OutPipe.

Errors

If no pipe handles could be created, an EPipeCreation exception is raised.

See also

CreatePipeHandles | Function to create a set of pipe handles
TInputPipeStream | TStream descendent which wraps the read end of a pipe.
TOutputPipeStream | TStream descendent which wraps the write end of a pipe.


CommandToList

Declaration

Source position: process.pp line 163

procedure CommandToList(

  S: ;

  List: TStrings

);


DetectXTerm

Detect the terminal program.

Declaration

Source position: process.pp line 169

function DetectXTerm: ;

Function result

The terminal program to use, or empty if none was found.

Description

DetectXTerm checks if XTermProgram is set. if so, it returns that. If XTermProgram is empty, the list specified in TryTerminals is tested for existence. If none is found, then the DESKTOP_SESSION environment variable is examined:

kde
konsole is used if it is found.
gnome
gnome-terminal is used if it is found
windowmaker
aterm or xterm are used if found.

If after all this, no terminal is found, then a list of default programs is tested: 'x-terminal-emulator','xterm','aterm','wterm','rxvt'.

If a terminal program is found, then it is saved in XTermProgram, so the next call to DetectXTerm will re-use the value. If the search must be performed again, it is sufficient to set XTermProgram to the empty string.

See also

XTermProgram | Default XTerm program to use
TryTerminals | A list of terminal programs to use (unix only)
TProcess.XTermProgram | XTerm program to use (unix only)


RunCommand

Declaration

Source position: line 0

function RunCommand(

  const exename: ;

  const commands: array of ;

  var outputstring:

):Boolean;

function RunCommand(

  const cmdline: ;

  var outputstring:

):Boolean;


RunCommandIndir

Declaration

Source position: line 0

function RunCommandIndir(

  const curdir: ;

  const exename: ;

  const commands: array of ;

  var outputstring: ;

  var exitstatus: Integer

):Integer;

function RunCommandIndir(

  const curdir: ;

  const exename: ;

  const commands: array of ;

  var outputstring:

):Boolean;

function RunCommandInDir(

  const curdir: ;

  const cmdline: ;

  var outputstring:

):Boolean;


CreateStoredItem

Concatenates component and property name

Declaration

Source position: rttiutils.pp line 127

function CreateStoredItem(

  const CompName: ;

  const PropName:

):;

Arguments

CompName | Component name
PropName | Property name

Function result

Full property path

Description

CreateStoredItem concatenates CompName and PropName if they are both empty. The names are separated by a dot (.) character. If either of the names is empty, an empty string is returned.

This function can be used to create items for the list of properties such as used in UpdateStoredList, TPropsStorage.StoreObjectsProps or TPropsStorage.LoadObjectsProps.

See also

ParseStoredItem | Split a property reference to component reference and property name
UpdateStoredList | Update a stringlist with object references
TPropsStorage.StoreObjectsProps | Store a list of component properties
TPropsStorage.LoadObjectsProps | Load a list of component properties


ParseStoredItem

Split a property reference to component reference and property name

Declaration

Source position: rttiutils.pp line 128

function ParseStoredItem(

  const Item: ;

  var CompName: ;

  var PropName:

):Boolean;

Arguments

Item | Property reference to parse
CompName | Component part of property reference.
PropName | Property name part of property reference.

Function result

True if Item contains a valid property reference

Description

ParseStoredItem parses the property reference Item and splits it in a reference to a component (returned in CompName) and a name of a property (returned in PropName). This function basically does the opposite of CreateStoredItem. Note that both names should be non-empty, i.e., at least 1 dot character must appear in Item.

Errors

If an error occurred during parsing, False is returned.

See also

CreateStoredItem | Concatenates component and property name
UpdateStoredList | Update a stringlist with object references
TPropsStorage.StoreObjectsProps | Store a list of component properties
TPropsStorage.LoadObjectsProps | Load a list of component properties


UpdateStoredList

Update a stringlist with object references

Declaration

Source position: rttiutils.pp line 126

procedure UpdateStoredList(

  AComponent: TComponent;

  AStoredList: TStrings;

  FromForm: Boolean

);

Arguments

AComponent | Root component
AStoredList | List of property references to resolve
FromForm | Start search from form or search globally

Description

UpdateStoredList will parse the strings in AStoredList using ParseStoredItem and will replace the Objects properties with the instance of the object whose name each property path in the list refers to. If FromForm is True, then all instances are searched relative to AComponent, i.e. they must be owned by AComponent. If FromForm is False the instances are searched in the global list of streamed components. (the FindGlobalComponentCallBack callback must be set for the search to work correctly in this case)

If a component cannot be found, the reference string to the property is removed from the stringlist.

Errors

If AComponent is Nil, an exception may be raised.

See also

ParseStoredItem | Split a property reference to component reference and property name
TPropsStorage.StoreObjectsProps | Store a list of component properties
TPropsStorage.LoadObjectsProps | Load a list of component properties
FindGlobalComponentCallBack | Callback used when component references must be resolved.


ColReadBoolean

Read a boolean value from a stream

Declaration

Source position: streamcoll.pp line 76

function ColReadBoolean(

  S: TStream

):Boolean;

Arguments

S

Stream to read boolean value from

Function result

Boolean value read from the stream

Description

ColReadBoolean reads a boolean from the stream S as it was written by ColWriteBoolean and returns the read value. The value cannot be read and written across systems that have different endian values.

See also

ColReadDateTime | Read a TDateTime value from a stream
ColWriteBoolean | Write a boolean to a stream
ColReadString | Read a string from a stream
ColReadInteger | Read a 32-bit integer from a stream.
ColReadFloat | Read a floating point value from a stream
ColReadCurrency | Read a currency value from the stream


ColReadCurrency

Read a currency value from the stream

Declaration

Source position: streamcoll.pp line 78

function ColReadCurrency(

  S: TStream

):Currency;

Arguments

S

Stream to read currency value from

Function result

Currency value read from the stream

Description

ColReadCurrency reads a currency value from the stream S as it was written by ColWriteCurrency and returns the read value. The value cannot be read and written across systems that have different endian values.

See also

ColReadDateTime | Read a TDateTime value from a stream
ColReadBoolean | Read a boolean value from a stream
ColReadString | Read a string from a stream
ColReadInteger | Read a 32-bit integer from a stream.
ColReadFloat | Read a floating point value from a stream
ColWriteCurrency | Write a currency value to stream


ColReadDateTime

Read a TDateTime value from a stream

Declaration

Source position: streamcoll.pp line 79

function ColReadDateTime(

  S: TStream

):TDateTime;

Arguments

S

Stream to read TDateTime value from

Function result

TDateTime value read from the stream

Description

ColReadDateTime reads a currency value from the stream S as it was written by ColWriteDateTime and returns the read value. The value cannot be read and written across systems that have different endian values.

See also

ColWriteDateTime | Write a TDateTime value to stream
ColReadBoolean | Read a boolean value from a stream
ColReadString | Read a string from a stream
ColReadInteger | Read a 32-bit integer from a stream.
ColReadFloat | Read a floating point value from a stream
ColReadCurrency | Read a currency value from the stream


ColReadFloat

Read a floating point value from a stream

Declaration

Source position: streamcoll.pp line 80

function ColReadFloat(

  S: TStream

):Double;

Arguments

S

Stream to read float value from.

Function result

Float value read from the stream

Description

ColReadFloat reads a double value from the stream S as it was written by ColWriteFloat and returns the read value. The value cannot be read and written across systems that have different endian values.

See also

ColReadDateTime | Read a TDateTime value from a stream
ColReadBoolean | Read a boolean value from a stream
ColReadString | Read a string from a stream
ColReadInteger | Read a 32-bit integer from a stream.
ColWriteFloat | Write floating point value to stream
ColReadCurrency | Read a currency value from the stream


ColReadInteger

Read a 32-bit integer from a stream.

Declaration

Source position: streamcoll.pp line 75

function ColReadInteger(

  S: TStream

):Integer;

Arguments

S

Stream to read integer value from

Function result

Integer value read from stream S

Description

ColReadInteger reads a 32-bit integer from the stream S as it was written by ColWriteInteger and returns the read value. The value cannot be read and written across systems that have different endian values.

See also

ColReadDateTime | Read a TDateTime value from a stream
ColReadBoolean | Read a boolean value from a stream
ColReadString | Read a string from a stream
ColWriteInteger | Write a 32-bit integer to a stream
ColReadFloat | Read a floating point value from a stream
ColReadCurrency | Read a currency value from the stream


ColReadString

Read a string from a stream

Declaration

Source position: streamcoll.pp line 77

function ColReadString(

  S: TStream

):;

Arguments

S

Stream to read string value from

Function result

String value read from the stream

Description

ColReadStream reads a string value from the stream S as it was written by ColWriteString and returns the read value. The value cannot be read and written across systems that have different endian values.

See also

ColReadDateTime | Read a TDateTime value from a stream
ColReadBoolean | Read a boolean value from a stream
ColWriteString | Write a string value to the stream
ColReadInteger | Read a 32-bit integer from a stream.
ColReadFloat | Read a floating point value from a stream
ColReadCurrency | Read a currency value from the stream


ColWriteBoolean

Write a boolean to a stream

Declaration

Source position: streamcoll.pp line 70

procedure ColWriteBoolean(

  S: TStream;

  AValue: Boolean

);

Arguments

S | Stream to write value to
AValue | Boolean value to write to stream

Description

ColWriteBoolean writes the boolean AValue to the stream. S.

See also

ColReadBoolean | Read a boolean value from a stream
ColWriteString | Write a string value to the stream
ColWriteInteger | Write a 32-bit integer to a stream
ColWriteCurrency | Write a currency value to stream
ColWriteDateTime | Write a TDateTime value to stream
ColWriteFloat | Write floating point value to stream


ColWriteCurrency

Write a currency value to stream

Declaration

Source position: streamcoll.pp line 72

procedure ColWriteCurrency(

  S: TStream;

  AValue: Currency

);

Arguments

S | Stream to write currency to
AValue | Currency value to write to stream

Description

ColWriteCurrency writes the currency AValue to the stream S.

See also

ColWriteBoolean | Write a boolean to a stream
ColWriteString | Write a string value to the stream
ColWriteInteger | Write a 32-bit integer to a stream
ColWriteDateTime | Write a TDateTime value to stream
ColWriteFloat | Write floating point value to stream
ColReadCurrency | Read a currency value from the stream


ColWriteDateTime

Write a TDateTime value to stream

Declaration

Source position: streamcoll.pp line 73

procedure ColWriteDateTime(

  S: TStream;

  AValue: TDateTime

);

Arguments

S | Stream to write datetime value to
AValue | DateTime value to write to stream

Description

ColWriteDateTime writes the TDateTimeAValue to the stream S.

See also

ColReadDateTime | Read a TDateTime value from a stream
ColWriteBoolean | Write a boolean to a stream
ColWriteString | Write a string value to the stream
ColWriteInteger | Write a 32-bit integer to a stream
ColWriteFloat | Write floating point value to stream
ColWriteCurrency | Write a currency value to stream


ColWriteFloat

Write floating point value to stream

Declaration

Source position: streamcoll.pp line 74

procedure ColWriteFloat(

  S: TStream;

  AValue: Double

);

Arguments

S | Stream to write float value to
AValue | Double value to write to the stream

Description

ColWriteFloat writes the double AValue to the stream S.

See also

ColWriteDateTime | Write a TDateTime value to stream
ColWriteBoolean | Write a boolean to a stream
ColWriteString | Write a string value to the stream
ColWriteInteger | Write a 32-bit integer to a stream
ColReadFloat | Read a floating point value from a stream
ColWriteCurrency | Write a currency value to stream


ColWriteInteger

Write a 32-bit integer to a stream

Declaration

Source position: streamcoll.pp line 69

procedure ColWriteInteger(

  S: TStream;

  AValue: Integer

);

Arguments

S | Stream to write integer to
AValue | Integer value to write to stream

Description

ColWriteInteger writes the 32-bit integer AValue to the stream S. No endianness is observed.

See also

ColWriteBoolean | Write a boolean to a stream
ColWriteString | Write a string value to the stream
ColReadInteger | Read a 32-bit integer from a stream.
ColWriteCurrency | Write a currency value to stream
ColWriteDateTime | Write a TDateTime value to stream


ColWriteString

Write a string value to the stream

Declaration

Source position: streamcoll.pp line 71

procedure ColWriteString(

  S: TStream;

  AValue:

);

Arguments

S | Stream to write string value to
AValue | String value to write to stream

Description

ColWriteString writes the string value AValue to the stream S.

See also

ColWriteBoolean | Write a boolean to a stream
ColReadString | Read a string from a stream
ColWriteInteger | Write a 32-bit integer to a stream
ColWriteCurrency | Write a currency value to stream
ColWriteDateTime | Write a TDateTime value to stream
ColWriteFloat | Write floating point value to stream


AssignStream

Assign a text file to a stream.

Declaration

Source position: streamio.pp line 25

procedure AssignStream(

  var F: Textfile;

  Stream: TStream

);

Arguments

F | The file one wishes to reroute through a stream.
Stream | The stream that should perform the actual I/O.

Description

AssignStream assigns the stream Stream to file F. The file can subsequently be used to write to the stream, using the standard Write calls.

Before writing, call Rewrite on the stream. Before reading, call Reset.

Errors

if Stream is Nil, an exception will be raised.

See also

TStream

GetStream

Return the stream, associated with a file.


GetStream

Return the stream, associated with a file.

Declaration

Source position: streamio.pp line 26

function GetStream(

  var F: TTextRec

):TStream;

Arguments

F

The file one wishes to get the stream from.

Function result

The stream assigned to the file.

Description

GetStream returns the instance of the stream that was associated with the file F using AssignStream.

Errors

An invalid class reference will be returned if the file was not associated with a stream.

See also

AssignStream

Assign a text file to a stream.

TStream


EncodeURI

Form a string representation of the URI

Declaration

Source position: uriparser.pp line 39

function EncodeURI(

  const URI: TURI

):;

Arguments

URI

The URI record to encode

Function result

The text representation of the URI

Description

EncodeURI will return a valid text representation of the URI in the URI record.

See also

ParseURI

Parse a URI and split it into its constituent parts


FilenameToURI

Construct a URI from a filename

Declaration

Source position: uriparser.pp line 50

function FilenameToURI(

  const Filename:

):;

Arguments

Filename

Filename to construct URI from

Function result

file: protocol URI

Description

FilenameToURI takes Filename and constructs a file: protocol URI from it.

Errors

None.

See also

URIToFilename

Convert a URI to a filename


IsAbsoluteURI

Check whether a URI is absolute.

Declaration

Source position: uriparser.pp line 52

function IsAbsoluteURI(

  const UriReference:

):Boolean;

Arguments

UriReference

URI to analyse

Function result

True if UriReference is absolute.

Description

IsAbsoluteURI returns True if the URI in UriReference is absolute, i.e. contains a protocol part.

Errors

None.

See also

FilenameToURI | Construct a URI from a filename
URIToFileName | Convert a URI to a filename


ParseURI

Parse a URI and split it into its constituent parts

Declaration

Source position: line 0

function ParseURI(

  const URI:

):TURI; overload;

function ParseURI(

  const URI: ;

  const DefaultProtocol: ;

  DefaultPort: Word

):TURI; overload;

Arguments

URI

URI to decode

Function result

Record with the URI split out in parts.

Arguments

URI | URI to decode
DefaultProtocol | Default protocol to use if none is specified.
DefaultPort | Default port to use if none is specified.

Description

ParseURI decodes URI and returns the various parts of the URI in the result record.

The function accepts the most general URI scheme:

proto://user:pwd@host:port/path/document?params#bookmark

Missing (optional) parts in the URI will be left blank in the result record. If a default protocol and port are specified, they will be used in the record if the corresponding part is not present in the URI.

See also

EncodeURI

Form a string representation of the URI


ResolveRelativeURI

Return a relative link

Declaration

Source position: line 0

function ResolveRelativeURI(

  const BaseUri: WideString;

  const RelUri: WideString;

  out ResultUri: WideString

):Boolean; overload;

function ResolveRelativeURI(

  const BaseUri: UTF8String;

  const RelUri: UTF8String;

  out ResultUri: UTF8String

):Boolean; overload;

Arguments

BaseUri | Base URI
RelUri | URI relative to BaseURI or absolute URI.
ResultUri | Resulting absolute URI

Function result

True if the operation was succesful, False if not.

Arguments

BaseUri | Base URI
RelUri | URI relative to BaseURI or absolute URI.
ResultUri | Resulting absolute URI

Description

ResolveRelativeURI returns in ResultUri an absolute link constructed from a base URI BaseURI and a relative link RelURI. One of the two URI names must have a protocol specified. If the RelURI argument contains a protocol, it is considered a complete (absolute) URI and is returned as the result.

The function returns True if a link was succesfully returned.

Errors

If no protocols are specified, the function returns False


URIToFilename

Convert a URI to a filename

Declaration

Source position: uriparser.pp line 49

function URIToFilename(

  const URI: ;

  out Filename:

):Boolean;

Arguments

URI | URI to analyse
Filename | Resulting filename

Function result

True if a filename was extracted from the URI

Description

URIToFilename returns a filename (using the correct Path Delimiter character) from URI. The URI must be of protocol File or have no protocol.

Errors

If the URI contains an unsupported protocol, False is returned.

See also

ResolveRelativeURI | Return a relative link
FilenameToURI | Construct a URI from a filename


Reference for package 'fcl'

Free Pascal FCL: Free Component Library

Units

ascii85 | ASCII 85 or Base 85 encoding
AVL_Tree | AVL tree implementation
base64 | Unit implementing base64 encoding
BlowFish | Unit implementing blowfish encryption/decryption streams
bufstream | Buffered stream
CacheCls | Unit implementing cache class
contnrs | Various general purpose classes: stack, queue, objectlists
CustApp | Custom application class
daemonapp | Daemon (service) application class
db | Database access layer
dbugintf | Unit to send commands to a debug server process
dbugmsg | Auxiliary unit for the dbugintf unit.
eventlog | Unit implementing system log class
ezcgi | Easy CGI unit
fpTimer | Timer class
gettext | Unit implementing resource string translation using gettext files
IBConnection | Firebird/Interbase database connection unit
idea | The IDEA unit provides IDEA encryption support
inicol | Collection which can write itself to inifile.
IniFiles | Ini files support
iostream | Implement streams for handling standard input, output and stderr
libtar | tar archive manipulation classes
mssqlconn | Microsoft SQL Server and Sybase ASE database connectors
Pipes | Unit implementing pipe streams.
pooledmm | Pooled memory manager implementation
process | Unit implementing the TProcess component.
rttiutils | RTTI utility functions
simpleipc | Simple one-way IPC protocol
streamcoll | Collection which can stream itself
streamex | Stream extensions
StreamIO | Streams for standard text files.
syncobjs | Synchronization objects
URIParser | URI Parsing routines
zstream | Support for compression streams

Description

The Free Component Library is a series of units that implemenent various classes and non-visual components for use with Free Pascal. They are building blocks for non-visual and visual programs, such as designed in Lazarus.

The TDataset descendents have been implemented in a way that makes them compatible to the Delphi implementation of these units. There are other units that have counterparts in Delphi, but most of them are unique to Free Pascal.


Index of all identifiers in package 'fcl'

A B C D E F G H I K L M P R S T U W X Y Z

A

ALL_PERMISSIONS | ascInitial | ascTwoEncodedChars
AppClass | ascNoEncodedChar | AssignStream
Application | ascOneEncodedChar | AVL_Tree
ascFourEncodedChars | ascPrefix |
ascii85 | ascThreeEncodedChars |

B

base64 | bl128 | BlowFish
bdmMIME | bl16 | bmRead
bdmStrict | bl2 | bmReadWrite
bfBOF | bl256 | bmWrite
bfCurrent | bl32 | BuffersEqual
bfEOF | bl4 | bufstream
bfInserted | bl64 |
BFRounds | bl8 |

C

CacheCls | ColReadString | csRunning
ccISO88591 | ColWriteBoolean | csStartPending
ccNone | ColWriteCurrency | csStopped
ccUnknown | ColWriteDateTime | csStopPending
ccUTF8 | ColWriteFloat | ctDDL
CipherIdea | ColWriteInteger | ctDelete
cldefault | ColWriteString | ctInsert
ClearDirRec | CommandToList | ctQuery
clfastest | contnrs | ctSelect
clmax | ConvertFilename | ctStoredProc
clnone | CreatePipeHandles | ctTable
ColReadBoolean | CreatePipeStreams | ctUnknown
ColReadCurrency | CreateStoredItem | ctUpdate
ColReadDateTime | csContinuePending | CurrentStatusNames
ColReadFloat | csPaused | CustApp
ColReadInteger | csPausePending | CustomApplication

D

daAbort | DefaultFieldClasses | doInteractive
daemonapp | DefaultIPCClientClass | drmInstall
DaemonError | DefaultIPCServerClass | drmRun
daFail | DefaultTimerDriverClass | drmUninstall
daRetry | DEFDIALECT | drmUnknown
DatabaseError | deFieldChange | dsBlockRead
DatabaseErrorFmt | deFieldListChange | dsBrowse
DateTimeRecToDateTime | deFocusControl | dsCalcFields
DateTimeToDateTimeRec | DeKeyIdea | dsCurValue
db | deLayoutChange | dsEdit
DBLibLibraryName | deParentScroll | dsEditModes
dbugintf | dePropertyChange | dsFilter
dbugmsg | deReconcileError | dsInactive
DebugMessageName | deRecordChange | dsInsert
DebugServerID | DetectXTerm | dsInternalCalc
deCheckBrowseMode | deUpdateRecord | dsMaxBufferCount
DecodeStringBase64 | deUpdateState | dsMaxStringSize
deConnectChange | DisposeMem | dsNewValue
deDataSetChange | dlError | dsOldValue
deDataSetScroll | dlInformation | dsOpening
deDisabledStateChange | dlWarning | dsSetKey
DefaultBufferCapacity | doAllowPause | dsWriteModes
DefaultDaemonOptions | doAllowStop |

E

EBase64DecodingException | EIOStreamError | EPipeSeek
EBlowFishError | EIPCError | EProcess
ECacheError | EKeyNotFound | esCritical
ECGIException | ELogError | esIgnore
Ecompressionerror | EMOFileError | esNormal
EDaemon | EMSSQLDatabaseError | esSevere
EDatabaseError | EncodeStringBase64 | EStreamColl
Edecompressionerror | EncodeURI | EUpdateError
EDuplicate | EnKeyIdea | eventlog
Egzfileerror | ENoSeekMsg | EXECUTE_PERMISSIONS
EIBDatabaseError | EPipeCreation | ExtractFieldName
EIDEAError | EPipeError | ezcgi
EIniCol | EPipeMsg | Ezliberror

F

faFixed | ftBlock | ftLargeint
faHiddenCol | ftBoolean | ftLink
faLink | ftBytes | ftMemo
faReadonly | ftCharacter | ftMultiVolume
faRequired | ftContiguous | ftNormal
faUnNamed | ftCurrency | ftOraBlob
Fieldtypenames | ftCursor | ftOraClob
FieldTypetoVariantMap | ftDataSet | ftParadoxOle
FilenameToURI | ftDate | ftReference
FileTimeGMT | ftDateTime | ftSmallint
FILETYPE_NAME | ftDBaseOle | ftString
FindGlobalComponentCallBack | ftDirectory | ftSymbolicLink
fkCalculated | ftDumpDir | ftTime
fkData | ftFifo | ftTimeStamp
fkInternalCalc | ftFixedChar | ftTypedBinary
fkLookup | ftFixedWideChar | ftUnknown
foCaseInsensitive | ftFloat | ftVarBytes
foNoPartialCompare | ftFMTBcd | ftVariant
fpTimer | ftFmtMemo | ftVolumeHeader
ftADT | ftGraphic | ftWideMemo
ftArray | ftGuid | ftWideString
ftAutoInc | ftIDispatch | ftWord
ftBCD | ftInteger |
ftBlob | ftInterface |

G

GetDebuggingEnabled | gmNext | grOK
GetLanguageIDs | gmPrior | gzopenread
GetStream | grBOF | gzopenwrite
gettext | grEOF |
gmCurrent | grError |

H

hexTable

I

IBConnection | inicol | IsAbsoluteURI
idea | IniFiles | ixCaseInsensitive
IDEABLOCKSIZE | InitDebugClient | ixDescending
IdeaCryptData | iosError | ixExpression
IdeaCryptKey | iosInput | ixNonMaintained
IDEAkey | iosOutPut | ixPrimary
IDEAKEYSIZE | iostream | ixUnique
INFINITE | IProviderSupport |

K

KeyCount KEYLEN

L

LargeInt | lctStop | loPartialKey
lctError | lctWarning | ltFile
lctIdentify | libtar | ltSystem
lctInformation | loCaseInsensitive |

M

MAXBLOBSEGMENTSIZE | MaxItemsPerHash | mtString
MaxHashListSize | MOFileHeaderMagic | mtUnknown
MaxHashStrSize | MsgVersion |
MaxHashTableSize | mssqlconn |

P

ParseStoredItem | Pipes | ppHigh
ParseURI | PLargeInt | ppIdle
PBlowFishKey | PLongWordArray | ppNormal
PBookmarkFlag | PLookupListRec | PPooledMemManagerItem
PBucket | PMOStringTable | ppRealTime
PBufferList | poDebugOnlyThisProcess | process
PCacheSlot | poDebugProcess | PSecurityAttributes
PCacheSlotArray | poDefaultErrorMode | psInterbase
PDateTimeRec | poNewConsole | psPostgreSQL
PermissionString | poNewProcessGroup | psSimulated
pfHidden | poNoConsole | ptInput
pfInKey | pooledmm | ptInputOutput
pfInUpdate | poRunSuspended | ptOutput
pfInWhere | poStderrToOutPut | ptResult
PHashItem | poUsePipes | ptUnknown
PHashItemList | poWaitOnExit |
PHashTable | PPCharArray |

R

ReadDebugMessageFromStream | ROUNDS | RSHash
READ_PERMISSIONS | rrAbort | rttiutils
RegisterDaemonApplicationClass | rrApply | RunCommand
RegisterDaemonClass | rrIgnore | RunCommandIndir
RegisterDaemonMapper | rrMerge |
ResolveRelativeURI | rrSkip |

S

SControlFailed | SErrServiceManagerStartFailed | stDevice
SCustomCode | SErrUnknownDaemonClass | stDisabled
SDaemonStatus | SErrWindowClass | stFileSystem
SendBoolean | SetDebuggingEnabled | stManual
SendDateTime | SExiting | streamcoll
SendDebug | SGlobal | streamex
SendDebugEx | SHelpCommand | StreamIO
SendDebugFmt | SHelpInstall | stSystem
SendDebugFmtEx | SHelpRun | stWin32
SendError | SHelpUnInstall | suoUseCountChars
SendInteger | SHelpUsage | suoUseFillAttribute
SendMethodEnter | simpleipc | suoUsePosition
SendMethodExit | SInvalidIndex | suoUseShowWindow
SendPointer | SkipComments | suoUseSize
SendSeparator | SLogCustom | swoHIDE
SEntering | SLogDebug | swoMaximize
SErrActive | SLogError | swoMinimize
SErrApplicationAlreadyCreated | SLogInfo | swoNone
SErrDaemonStartFailed | SLogWarning | swoRestore
SErrDuplicateName | SProcessID | swoShow
SErrInActive | sPropNameDelimiter | swoShowDefault
SErrLogFailedMsg | SQLDelimiterCharacters | swoShowMaximized
SErrNoDaemonDefForStatus | SSeparator | swoShowMinimized
SErrNoDaemonForStatus | SServerStartFailed | swoshowMinNOActive
SErrNoServiceMapper | SStatus | swoShowNA
SErrNothingToDo | StartDebugServer | swoShowNoActivate
SErrOnlyOneMapperAllowed | stAuto | swoShowNormal
SErrServerNotActive | stBoot | syncobjs

T

TASCII85DecoderStream | TDependency | TMasterParamsDataLink
TASCII85EncoderStream | TDetailDataLink | TMemIniFile
TASCII85RingBuffer | TEnumItemsMethod | TMemoField
TASCII85State | TEraseSectEvent | TMessageType
TAutoIncField | TErrorSeverity | TMOFile
TAVLTree | TEvent | TMOFileHeader
TAVLTreeNode | TEventHandle | TMOStringInfo
TAVLTreeNodeEnumerator | TEventLog | TMOStringTable
TAVLTreeNodeMemManager | TEventLogTypes | tmSaveText
TBase64DecodingMode | TEventObject | tmSetGid
TBase64DecodingStream | TExceptionEvent | tmSetUid
TBase64EncodingStream | TEZcgi | TMsgHeader
TBaseAVLTreeNodeManager | TField | TMSSQLConnection
TBCDField | TFieldAttribute | TMSSQLConnectionDef
TBFBlock | TFieldAttributes | TNamedIniCollection
TBidirBinaryObjectReader | TFieldChars | TNamedIniCollectionItem
TBidirBinaryObjectWriter | TFieldClass | TNamedItem
TBinaryField | TFieldDef | TNonFreePooledMemManager
TBlobData | TFieldDefs | TNumericField
TBlobField | TFieldGetTextEvent | TObjectBucketList
TBlobStreamMode | TFieldKind | TObjectIteratorMethod
TBlobType | TFieldKinds | TObjectList
TBlowFish | TFieldMap | TObjectListCallback
TBlowFishDeCryptStream | TFieldNotifyEvent | TObjectListStaticCallback
TBlowFishEncryptStream | TFieldRef | TObjectQueue
TBlowFishKey | Tfields | TObjectStack
TBlowFishStream | TFieldsEnumerator | TOnFreeSlot
TBookmark | TFieldSetTextEvent | TOnIsDataEqual
TBookmarkFlag | TFieldType | TOrderedList
TBookmarkStr | TFileType | TOutputPipeStream
TBooleanField | TFilterOption | TParam
TBucket | TFilterOptions | TParamBinding
TBucketArray | TFilterRecordEvent | TParams
TBucketItem | TFindComponentEvent | TParamStyle
TBucketItemArray | TFloatField | TParamType
TBucketList | TFMTBCDField | TParamTypes
TBucketListSizes | TFPCustomHashTable | TPCharArray
TBucketProc | TFPCustomTimer | tpExecuteByGroup
TBucketProcObject | TFPDataHashTable | tpExecuteByOther
TBufferArray | TFPHashList | tpExecuteByOwner
TBufferList | TFPHashObject | TPooledMemManager
TBufStream | TFPHashObjectList | TPooledMemManagerItem
TBytesField | TFPObjectHashTable | tpReadByGroup
TCache | TFPObjectList | tpReadByOther
TCacheSlot | TFPStringHashTable | tpReadByOwner
TCacheSlotArray | TFPTimer | TProcess
TCheckConstraint | TFPTimerDriver | TProcessForkEvent
TCheckConstraints | TFPTimerDriverClass | TProcessOption
TClassList | TGetMode | TProcessOptions
TClientCharset | TGetResult | TProcessPriority
TComponentList | TGraphicField | TPropInfoList
Tcompressionlevel | TGuidField | TPropsStorage
Tcompressionstream | TGuiLoopEvent | TProviderFlag
TCriticalSection | TGZFileStream | TProviderFlags
TCurrencyField | Tgzopenmode | TPSCommandType
TCurrentStatus | THandleObject | tpWriteByGroup
TCustomApplication | THashedStringList | tpWriteByOther
TCustomBucketList | THashFunction | tpWriteByOwner
TCustomConnection | THashItem | TQueue
TCustomControlCodeEvent | THashItemList | TranslateResourceStrings
TCustomDaemon | THashTable | TranslateUnitResourceStrings
TCustomDaemonApplication | THTCustomNode | TReadBufStream
TCustomDaemonApplicationClass | THTCustomNodeClass | TReadStrEvent
TCustomDaemonClass | THTDataNode | TRecordBuffer
TCustomDaemonMapper | THTNode | TRecordBufferBaseType
TCustomDaemonMapperClass | THTObjectNode | TResolverResponse
TCustomIniFile | THTOwnedObjectNode | TResyncMode
Tcustomzlibstream | THTStringNode | TryTerminals
TDaemon | TIBConnection | TServiceType
TDaemonApplication | TIBConnectionDef | TShowWindowOptions
TDaemonClass | TIBCursor | TSimpleEvent
TDaemonController | TIBTrans | TSimpleIPC
TDaemonDef | TIdeaCryptData | TSimpleIPCClient
TDaemonDefs | TIdeaCryptKey | TSimpleIPCServer
TDaemonEvent | TIDEADeCryptStream | TSmallintField
TDaemonMapper | TIDEAEncryptStream | TStack
TDaemonOKEvent | TIDEAKey | TStartType
TDaemonOption | TIDEAStream | TStartupOption
TDaemonOptions | TIndexDef | TStartupOptions
TDaemonRunMode | TIndexDefs | TStreamCollection
TDaemonThread | TIndexOption | TStreamCollectionItem
TDataAction | TIndexOptions | TStringField
TDatabase | TIniCollection | TStringFieldBuffer
TDatabaseClass | TIniCollectionItem | TStringIteratorMethod
TDataChangeEvent | TIniFile | TSybaseConnection
TDataEvent | TIniFileKey | TSybaseConnectionDef
TDataIteratorMethod | TIniFileKeyList | TSynchroObject
TDataLink | TIniFileSection | TTarArchive
TDataOperation | TIniFileSectionList | TTarDirRec
TDataSet | TInputPipeStream | TTarMode
TDatasetClass | TIntegerField | TTarModes
TDataSetErrorEvent | TIOStream | TTarPermission
TDataSetNotifyEvent | TIOSType | TTarPermissions
TDataSetState | TIPCClientComm | TTarWriter
TDataSource | TIPCClientCommClass | TTimeField
TDateField | TIPCServerComm | TUpdateAction
TDateTimeAlias | TIPCServerCommClass | TUpdateKind
TDateTimeField | TIteratorMethod | TUpdateMode
TDateTimeRec | TLargeintField | TUpdateStatus
TDBDataset | TLocateOption | TUpdateStatusSet
TDBDatasetClass | TLocateOptions | TURI
TDBTransaction | TLogCategoryEvent | TVarBytesField
TDBTransactionClass | TLogCodeEvent | TVariantField
TDebugLevel | TLoginEvent | TWaitResult
TDebugMessage | TLogType | TWideMemoField
Tdecompressionstream | TLongintField | TWideStringField
TDefCollection | TLongWordArray | TWinBindings
TDelphiReader | TLookupList | TWordField
TDelphiWriter | TLookupListRec | TWriteBufStream
TDependencies | TMasterDataLink | TWriteStrEvent

U

uaAbort | ukInsert | URIParser
uaApplied | ukModify | URIToFilename
uaFail | UpdateStoredList | usDeleted
uaRetry | upWhereAll | usInserted
uaSkip | upWhereChanged | usModified
ukDelete | upWhereKeyOnly | usUnmodified

W

wrAbandoned | WriteDebugMessageToStream | wrSignaled
wrError | WRITE_PERMISSIONS | wrTimeout

X

XTermProgram

Y

YesNoChars

Z

zstream


Reference for unit 'ascii85'

ASCII 85 or Base 85 encoding

uses

  System,

  sysutils,

  Classes;

Overview

The ascii85 provides an ASCII 85 or base 85 decoding algorithm. It is class and stream based: the TASCII85DecoderStream stream can be used to decode any stream with ASCII85 encoded data.

Currently, no ASCII85 encoder stream is available.

It's usage and purpose is similar to the IDEA or base64 units.


Reference for unit 'ascii85': Types

TASCII85State

Encoder state enumeration


Reference for unit 'ascii85': Classes

TASCII85DecoderStream | ASCII 85 decoder stream.
TASCII85EncoderStream | ASCII 85 encoding stream
TASCII85RingBuffer | Internal buffer class


Index of all identifiers in unit 'ascii85'

A T

A

ascFourEncodedChars | ascOneEncodedChar | ascTwoEncodedChars
ascInitial | ascPrefix |
ascNoEncodedChar | ascThreeEncodedChars |

T

TASCII85DecoderStream | TASCII85RingBuffer
TASCII85EncoderStream | TASCII85State


TASCII85State

Encoder state enumeration

Declaration

Source position: ascii85.pp line 29

type TASCII85State = (
ascInitial = 0, | Initial state
ascOneEncodedChar = 1, | One encoded character in buffer.
ascTwoEncodedChars = 2, | Two encoded characters in buffer.
ascThreeEncodedChars = 3, | Three encoded characters in buffer.
ascFourEncodedChars = 4, | Four encoded characters in buffer.
ascNoEncodedChar = 5, | No encoded characters in buffer.
ascPrefix = 6 | Prefix processing
);

Description

TASCII85State is for internal use, it contains the current state of the decoder.

See also

TASCII85DecoderStream

ASCII 85 decoder stream.


Reference for unit 'AVL_Tree'

AVL tree implementation

uses

  System,

  Classes,

  sysutils;

Overview

The avl_tree unit implements a general-purpose AVL (balanced) tree class: the TAVLTree class and it's associated data node class TAVLTreeNode.


Reference for unit 'AVL_Tree': Classes

TAVLTree | AVL tree component
TAVLTreeNode | Represents a node in the tree.
TAVLTreeNodeEnumerator | Enumerator for the TAVLTree tree nodes
TAVLTreeNodeMemManager | TAVLTreeNode Node memory manager
TBaseAVLTreeNodeManager | Base class for a node memory manager


Index of all identifiers in unit 'AVL_Tree'

T

T

TAVLTree | TAVLTreeNodeEnumerator | TBaseAVLTreeNodeManager
TAVLTreeNode | TAVLTreeNodeMemManager |


Reference for unit 'base64'

Unit implementing base64 encoding

uses

  System,

  Classes,

  sysutils;

Overview

base64 implements base64 encoding (as used for instance in MIME encoding) based on streams. It implements 2 streams which encode or decode anything written or read from it. The source or the destination of the encoded data is another stream. 2 classes are implemented for this: TBase64EncodingStream for encoding, and TBase64DecodingStream for decoding.

The streams are designed as plug-in streams, which can be placed between other streams, to provide base64 encoding and decoding on-the-fly...


Reference for unit 'base64': Types

TBase64DecodingMode

Decoding mode for stream


Reference for unit 'base64': Classes

EBase64DecodingException | Exception raised on errors
TBase64DecodingStream | Base64 Decoding stream
TBase64EncodingStream | Base64 encoding stream.


Reference for unit 'base64': Procedures and functions

DecodeStringBase64 | Decodes a Base64 encoded string and returns the decoded data as a string.
EncodeStringBase64 | Encode a string with Base64 encoding and return the result as a string.


Index of all identifiers in unit 'base64'

B D E T

B

bdmMIME bdmStrict

D

DecodeStringBase64

E

EBase64DecodingException EncodeStringBase64

T

TBase64DecodingMode TBase64DecodingStream TBase64EncodingStream


TBase64DecodingMode

Decoding mode for stream

Declaration

Source position: base64.pp line 58

type TBase64DecodingMode = (
bdmStrict, | Strict encoding
bdmMIME | MIME encoding
);

Description

TBase64DecodingMode determines the decoding algorithm used by TBase64DecodingStream. There are 2 modes:

bdmStrict
Strict mode, which follows RFC3548 and rejects any characters outside of base64 alphabet. In this mode only up to two '=' characters are accepted at the end. It requires the input to have a Size being a multiple of 4, otherwise an EBase64DecodingException exception is raised.
bdmMime
MIME mode, which follows RFC2045 and ignores any characters outside of base64 alphabet. In this mode any '=' is seen as the end of string, it handles apparently truncated input streams gracefully.


BFRounds

Number of rounds in blowfish encryption.

Declaration

Source position: blowfish.pp line 28

const BFRounds = 16;


Reference for unit 'BlowFish'

Unit implementing blowfish encryption/decryption streams

uses

  System,

  sysutils,

  Classes;

Overview

The BlowFish implements a class TBlowFish to handle blowfish encryption/decryption of memory buffers, and 2 TStream descendents TBlowFishDeCryptStream which decrypts any data that is read from it on the fly, as well as TBlowFishEnCryptStream which encrypts the data that is written to it on the fly.


Reference for unit 'BlowFish': Constants

BFRounds

Number of rounds in blowfish encryption.


Reference for unit 'BlowFish': Types

PBlowFishKey | Pointer to TBlowFishKey array
TBFBlock | Internal blowfish data structure
TBlowFishKey | Array to hold blowfish encryption keys


Reference for unit 'BlowFish': Classes

EBlowFishError | Exception used to report errors.
TBlowFish | Class implementing blowfish encryption/decription
TBlowFishDeCryptStream | On-the-fly Blowfish decryption stream
TBlowFishEncryptStream | On-the-fly Blowfish encryption stream
TBlowFishStream | Parent class for blowfish encryption/decryption streams


Index of all identifiers in unit 'BlowFish'

B E P T

B

BFRounds

E

EBlowFishError

P

PBlowFishKey

T

TBFBlock | TBlowFishDeCryptStream | TBlowFishKey
TBlowFish | TBlowFishEncryptStream | TBlowFishStream


PBlowFishKey

Pointer to TBlowFishKey array

Declaration

Source position: blowfish.pp line 31

type PBlowFishKey = ^TBlowFishKey;

Description

PBlowFishKey is a simple pointer to a TBlowFishKey array.

See also

TBlowFishKey

Array to hold blowfish encryption keys


TBFBlock

Internal blowfish data structure

Declaration

Source position: blowfish.pp line 33

type TBFBlock = array [0..1] of LongInt;

Description

TBFBlock is the basic data structure used by the encrypting/decrypting routines in TBlowFish, TBlowFishDeCryptStream and TBlowFishEnCryptStream. It is the basic encryption/decryption block for all encrypting/decrypting: all encrypting/decrypting happens on a TBFBlock structure.

See also

TBlowFish | Class implementing blowfish encryption/decription
TBlowFishEnCryptStream | On-the-fly Blowfish encryption stream
TBlowFishDeCryptStream | On-the-fly Blowfish decryption stream


TBlowFishKey

Array to hold blowfish encryption keys

Declaration

Source position: blowfish.pp line 32

type TBlowFishKey = array [0..55] of Byte;

Description

TBlowFishKey is a data structure which keeps the encryption or decryption key for the TBlowFish, TBlowFishDeCryptStream and TBlowFishEnCryptStream classes. It should be filled with the encryption key and passed to the constructor of one of these classes.

See also

TBlowFish | Class implementing blowfish encryption/decription
TBlowFishDeCryptStream | On-the-fly Blowfish decryption stream
TBlowFishEnCryptStream | On-the-fly Blowfish encryption stream


DefaultBufferCapacity

Default buffer size

Declaration

Source position: bufstream.pp line 26

const DefaultBufferCapacity: Integer = 16;

Description

If no buffer size is specified when the stream is created, then this size is used.

See also

TBufStream.Create

Create a new TBufStream instance.


Reference for unit 'bufstream'

Buffered stream

uses

  System,

  Classes,

  sysutils;

Overview

BufStream implements two one-way buffered streams: the streams store all data from (or for) the source stream in a memory buffer, and only flush the buffer when it's full (or refill it when it's empty). The buffer size can be specified at creation time. 2 streams are implemented: TReadBufStream which is for reading only, and TWriteBufStream which is for writing only.

Buffered streams can help in speeding up read or write operations, especially when a lot of small read/write operations are done: it avoids doing a lot of operating system calls.


Reference for unit 'bufstream': Constants

DefaultBufferCapacity

Default buffer size


Reference for unit 'bufstream': Classes

TBufStream | Common ancestor for buffered streams
TReadBufStream | Read-only buffered stream.
TWriteBufStream | Write-only buffered stream.


Index of all identifiers in unit 'bufstream'

D T

D

DefaultBufferCapacity

T

TBufStream TReadBufStream TWriteBufStream


Reference for unit 'CacheCls'

Unit implementing cache class

uses

  System,

  sysutils;

Overview

The CacheCls unit implements a caching class: similar to a hash class, it can be used to cache data, associated with string values (keys). The class is calles TCache


Reference for unit 'CacheCls': Resource strings

SInvalidIndex
'Invalid index %i'


Reference for unit 'CacheCls': Types

PCacheSlot | Pointer to TCacheSlot record.
PCacheSlotArray | Pointer to TCacheSlotArray array
TCacheSlot | Record representing 1 item in the cache list.
TCacheSlotArray | Array of TCacheSlot
TOnFreeSlot | Callback called when a slot must be freed.
TOnIsDataEqual | Callback type to check whether 2 data types are equal.


Reference for unit 'CacheCls': Classes

ECacheError | Exception class used in the cachecls unit.
TCache | Cache class


Index of all identifiers in unit 'CacheCls'

E P S T

E

ECacheError

P

PCacheSlot PCacheSlotArray

S

SInvalidIndex

T

TCache | TCacheSlotArray | TOnIsDataEqual
TCacheSlot | TOnFreeSlot |


PCacheSlot

Pointer to TCacheSlot record.

Declaration

Source position: cachecls.pp line 44

type PCacheSlot = ^TCacheSlot;

See also

TCacheSlot

Record representing 1 item in the cache list.


PCacheSlotArray

Pointer to TCacheSlotArray array

Declaration

Source position: cachecls.pp line 51

type PCacheSlotArray = ^TCacheSlotArray;

See also

TCacheSlotArray

Array of TCacheSlot


TOnFreeSlot

Callback called when a slot must be freed.

Declaration

Source position: cachecls.pp line 56

type TOnFreeSlot = procedure(

  ACache: TCache;

  SlotIndex: Integer

) of object;

Arguments

ACache | Cache class calling the function
SlotIndex | Index of the slot that will be freed.

Description

TOnFreeSlot is a callback prototype used when not enough slots are free, and a slot must be freed.

See also

TCache.OnFreeSlot

Event called when a slot is freed


TOnIsDataEqual

Callback type to check whether 2 data types are equal.

Declaration

Source position: cachecls.pp line 54

type TOnIsDataEqual = function(

  ACache: TCache;

  AData1: Pointer;

  AData2: Pointer

):Boolean of object;

Arguments

ACache | TCache instance which calls the callback.
AData1 | First data element pointer.
AData2 | Second data element pointer.

Function result

True if AData1 and AData2 are equal.

Description

TOnIsDataEqual is a callback prototype; It is used by the TCache.Add call to determine whether the item to be added is a new item or not. The function returns True if the 2 data pointers AData1 and AData2 should be considered equal, or False when they are not.

For most purposes, comparing the pointers will be enough, but if the pointers are ansistrings, then the contents should be compared.

See also

TCache.Add

Add a data element to the list.


Reference for unit 'contnrs'

Various general purpose classes: stack, queue, objectlists

uses

  System,

  sysutils,

  Classes;

Overview

The contnrs unit implements various general-purpose classes:

Object lists
lists that manage objects instead of pointers, and which automatically dispose of the objects.
Component lists
lists that manage components instead of pointers, and which automatically dispose the components.
Class lists
lists that manage class pointers instead of pointers.
Stacks
Stack classes to push/pop pointers or objects
Queues
Classes to manage a FIFO list of pointers or objects
Hash lists
General-purpose Hash lists.


Reference for unit 'contnrs': Constants

MaxHashListSize | Maximum size of hash list.
MaxHashStrSize | Maximum string size
MaxHashTableSize | Maximum size of the hash table.
MaxItemsPerHash | Maximum number of items in each hash bucket.


Reference for unit 'contnrs': Types

PBucket | Pointer to TBucket" type.
PHashItem | Pointer to THashItem
PHashItemList | Pointer to THashItemList array
PHashTable | Pointer to THashTable array.
TBucket | Bucket record
TBucketArray | Array of TBucket records.
TBucketItem | Record used in bucket list.
TBucketItemArray | Array of TBucketItem records
TBucketListSizes | Enumerated type to indicate bucket list size
TBucketProc | Callback for the ForEach call.
TBucketProcObject | Callback for the ForEach call.
TDataIteratorMethod | Data iterator method.
THashFunction | Hash calculation function.
THashItem | Record used to maintain an item in the hash list
THashItemList | array of THashItem records.
THashTable | Array of hash values
THTCustomNodeClass | Class of THTCustomNodeClass.
THTNode | Alias for THTDataNode
TIteratorMethod | Iterator prototype for TFPCustomHashTable
TObjectIteratorMethod | iterate callback prototype.
TObjectListCallback | Method callback type for TFPObjectList.ForEachCall
TObjectListStaticCallback | Plan procedure callback type for TFPObjectList.ForEachCall
TStringIteratorMethod | Iterator callback type


Reference for unit 'contnrs': Classes

EDuplicate | Exception raised when a key is stored twice in a hash table.
EKeyNotFound | Exception raised when a key is not found.
TBucketList | Default bucket list implementation.
TClassList | List of classes.
TComponentList | List to manage component instances.
TCustomBucketList | Custom bucket list class
TFPCustomHashTable | Hash class
TFPDataHashTable | Hash table for data pointers
TFPHashList | Hash list class for pointer data
TFPHashObject | Hash-list aware object
TFPHashObjectList
TFPObjectHashTable | Hash table for object instances
TFPObjectList | TFPList descendent which manages objects.
TFPStringHashTable | Hash table for string data.
THTCustomNode | Single item in the hash table.
THTDataNode | Data node for pointer hashtable
THTObjectNode | Node type for TFPObjectHashTable
THTOwnedObjectNode | Node type for owned objects.
THTStringNode | Node type for TFPStringHashTable
TObjectBucketList | Bucket list using objects instead of pointers.
TObjectList | List to manage object instances.
TObjectQueue
TObjectStack | Object instances stack
TOrderedList | Base class for queues and stacks.
TQueue | Pointer queue
TStack | Pointer Stack


Reference for unit 'contnrs': Procedures and functions

RSHash

Standard hash value calculating function.


Index of all identifiers in unit 'contnrs'

B E M P R T

B

bl128 | bl256 | bl64
bl16 | bl32 | bl8
bl2 | bl4 |

E

EDuplicate EKeyNotFound

M

MaxHashListSize | MaxHashTableSize
MaxHashStrSize | MaxItemsPerHash

P

PBucket | PHashItemList
PHashItem | PHashTable

R

RSHash

T

TBucket | TFPHashObject | THTStringNode
TBucketArray | TFPHashObjectList | TIteratorMethod
TBucketItem | TFPObjectHashTable | TObjectBucketList
TBucketItemArray | TFPObjectList | TObjectIteratorMethod
TBucketList | TFPStringHashTable | TObjectList
TBucketListSizes | THashFunction | TObjectListCallback
TBucketProc | THashItem | TObjectListStaticCallback
TBucketProcObject | THashItemList | TObjectQueue
TClassList | THashTable | TObjectStack
TComponentList | THTCustomNode | TOrderedList
TCustomBucketList | THTCustomNodeClass | TQueue
TDataIteratorMethod | THTDataNode | TStack
TFPCustomHashTable | THTNode | TStringIteratorMethod
TFPDataHashTable | THTObjectNode |
TFPHashList | THTOwnedObjectNode |


MaxHashListSize

Maximum size of hash list.

Declaration

Source position: contnrs.pp line 193

const MaxHashListSize = Maxint div 16;

Description

MaxHashListSize is the maximum number of elements a hash list can contain.

See also

TFPHashList

Hash list class for pointer data


MaxHashStrSize

Maximum string size

Declaration

Source position: contnrs.pp line 194

const MaxHashStrSize = Maxint;

Description

MaxHashStrSize is the maximum amount of data for the key string values. The key strings are kept in a continuous memory area. This constant determines the maximum size of this memory area.

See also

TFPHashList

Hash list class for pointer data


MaxHashTableSize

Maximum size of the hash table.

Declaration

Source position: contnrs.pp line 195

const MaxHashTableSize = Maxint div 4;

Description

MaxHashTableSize is the maximum number of elements in the hash.

See also

TFPHashList

Hash list class for pointer data


MaxItemsPerHash

Maximum number of items in each hash bucket.

Declaration

Source position: contnrs.pp line 196

const MaxItemsPerHash = 3;

Description

MaxItemsPerHash is the threshold above which the hash is expanded. If the number of elements in a hash bucket becomes larger than this value, the hash size is increased.

See also

TFPHashList

Hash list class for pointer data


PBucket

Pointer to TBucket" type.

Declaration

Source position: contnrs.pp line 496

type PBucket = ^TBucket;


PHashItem

Pointer to THashItem

Declaration

Source position: contnrs.pp line 190

type PHashItem = ^THashItem;

Description

PHashItem is a pointer type, pointing to the THashItem record.

See also

THashItem

Record used to maintain an item in the hash list


PHashItemList

Pointer to THashItemList array

Declaration

Source position: contnrs.pp line 199

type PHashItemList = ^THashItemList;

Description

PHashItemList is a pointer to the THashItemList. It's used in the TFPHashList as a pointer to the memory area containing the hash item records.

See also

THashItemList

array of THashItem records.


PHashTable

Pointer to THashTable array.

Declaration

Source position: contnrs.pp line 201

type PHashTable = ^THashTable;

Description

PHashTable is a pointer to the THashTable. It's used in the TFPHashList as a pointer to the memory area containing the hash values.

See also

THashTable | Array of hash values
TFPHashList | Hash list class for pointer data


TBucket

Bucket record

Declaration

Source position: contnrs.pp line 492

type TBucket = record
Count: Integer; | Number of items in the bucket
Items: TBucketItemArray; | Items in this bucket
end;

Description

TBucket describes 1 bucket in the TCustomBucketList class. It is a container for TBucketItem records. It should never be used directly.

See also

TBucketItem | Record used in bucket list.
TCustomBucketList | Custom bucket list class


TBucketArray

Array of TBucket records.

Declaration

Source position: contnrs.pp line 497

type TBucketArray = array of TBucket;


TBucketItem

Record used in bucket list.

Declaration

Source position: contnrs.pp line 487

type TBucketItem = record
Item: Pointer; | Item to associate data with
Data: Pointer; | Data associated with item
end;

Description

TBucketItem is a record used for internal use in TCustomBucketList. It should not be necessary to use it directly.

See also

TCustomBucketList

Custom bucket list class


TBucketItemArray

Array of TBucketItem records

Declaration

Source position: contnrs.pp line 490

type TBucketItemArray = array of TBucketItem;

See also

TBucketItem

Record used in bucket list.


TBucketProc

Callback for the ForEach call.

Declaration

Source position: contnrs.pp line 499

type TBucketProc = procedure(

  AInfo: Pointer;

  AItem: Pointer;

  AData: Pointer;

  out AContinue: Boolean

);

Arguments

AInfo | Extra info pointer passed to Foreach call.
AItem | Item
AData | Data associated with item
AContinue | Set to false to stop iteration over items.

Description

TBucketProc is the prototype for the TCustomBucketList.Foreach call. It is the plain procedural form. The Continue parameter can be set to False to indicate that the Foreach call should stop the iteration.

For a procedure of object (a method) callback, see the TBucketProcObject prototype.

See also

TCustomBucketList.Foreach | Loop over all items.
TBucketProcObject | Callback for the ForEach call.


TBucketProcObject

Callback for the ForEach call.

Declaration

Source position: contnrs.pp line 500

type TBucketProcObject = procedure(

  AItem: Pointer;

  AData: Pointer;

  out AContinue: Boolean

) of object;

Arguments

AItem | Item
AData | Data associated with item
AContinue | Set to false to stop iteration over items.

Description

TBucketProcObject is the prototype for the TCustomBucketList.Foreach call. It is the method (procedure of object) form. The Continue parameter can be set to False to indicate that the Foreach call should stop the iteration.

For a plain procedural callback, see the TBucketProc prototype.

See also

TCustomBucketList.Foreach | Loop over all items.
TBucketProc | Callback for the ForEach call.


TDataIteratorMethod

Data iterator method.

Declaration

Source position: contnrs.pp line 406

type TDataIteratorMethod = procedure(

  Item: Pointer;

  const Key: ;

  var Continue: Boolean

) of object;

Arguments

Item | Data pointer item
Key | Key associated with item
Continue | Continue iterating or stop iteration

Description

TDataIteratorMethod is a callback prototype for the TFPDataHashTable.Iterate method. It is called for each data pointer in the hash list, passing the key (key) and data pointer (item) for each item in the list. If Continue is set to false, the iteration stops.

See also

TFPDataHashTable.Iterate


THashFunction

Hash calculation function.

Declaration

Source position: contnrs.pp line 334

type THashFunction = function(

  const S: ;

  const TableSize: LongWord

):LongWord;

Arguments

S | String to calculate hash value from.
TableSize | Hash table size.

Function result

Hash value

Description

THashFunction is the prototype for a hash calculation function. It should calculate a hash of string S, where the hash table size is TableSize. The return value should be the hash value.


THashItem

Record used to maintain an item in the hash list

Declaration

Source position: contnrs.pp line 184

type THashItem = record
HashValue: LongWord; | Key hash value
StrIndex: Integer; | Index of the string value
NextIndex: Integer; | Next value index
Data: Pointer; | Data associated with the key.
end;

Description

THashItem is used internally in the hash list. It should never be used directly.

See also

TFPHashList

Hash list class for pointer data


THashItemList

array of THashItem records.

Declaration

Source position: contnrs.pp line 200

type THashItemList = array [0..MaxHashListSize-1] of THashItem;

Description

THashItemList is an array type, primarily used to be able to define the PHashItemList type. It's used in the TFPHashList class.

See also

PHashItemList | Pointer to THashItemList array
TFPHashList | Hash list class for pointer data


THashTable

Array of hash values

Declaration

Source position: contnrs.pp line 202

type THashTable = array [0..MaxHashTableSize-1] of Integer;

Description

THashTable defines an array of integers, used to hold hash values. It's mainly used to define the PHashTable class.

See also

PHashTable | Pointer to THashTable array.
TFPHashList | Hash list class for pointer data


THTNode

Alias for THTDataNode

Declaration

Source position: contnrs.pp line 404

type THTNode = THTDataNode;

Description

THTNode is provided for backwards compatibility.

See also

THTDataNode | Data node for pointer hashtable
TFPCustomHashTable | Hash class
TFPDataHashTable | Hash table for data pointers
THTObjectNode | Node type for TFPObjectHashTable
THTStringNode | Node type for TFPStringHashTable


TIteratorMethod

Iterator prototype for TFPCustomHashTable

Declaration

Source position: contnrs.pp line 408

type TIteratorMethod = TDataIteratorMethod;

Description

TIteratorMethod is used in an internal TFPDataHashTable method.

See also

TFPDataHashTable

Hash table for data pointers


TObjectIteratorMethod

iterate callback prototype.

Declaration

Source position: contnrs.pp line 457

type TObjectIteratorMethod = procedure(

  Item: TObject;

  const Key: ;

  var Continue: Boolean

) of object;

Arguments

Item | Data object
Key | Key value
Continue | Should the iteration continue or stop

Description

TObjectIteratorMethod is the iterator callback prototype. It is used to iterate over all items in the hash table, and is called with each key value (Key) and associated object (Item). If Continue is set to false, the iteration stops.


TStringIteratorMethod

Iterator callback type

Declaration

Source position: contnrs.pp line 429

type TStringIteratorMethod = procedure(

  Item: ;

  const Key: ;

  var Continue: Boolean

) of object;

Arguments

Item | String associated with key
Key | Key value
Continue | Should iterate continue or stop ?

Description

TStringIteratorMethod is the callback prototype for the Iterate method. It is called for each element in the hash table, with the string. If Continue is set to false, the iteration stops.


CustomApplication

Global application instance

Declaration

Source position: custapp.pp line 92

var CustomApplication: TCustomApplication = nil;

Description

CustomApplication contains the global application instance. All descendents of TCustomApplication should, in addition to storing an instance pointer in some variable (most likely called "Application") store the instance pointer in this variable. This ensures that, whatever kind of application is being created, user code can access the application object.

See also

TCustomApplication

Ancestor class for TApplication classes.


Reference for unit 'CustApp'

Custom application class

uses

  System,

  sysutils,

  Classes;

Overview

The CustApp unit implements the TCustomApplication class, which serves as the common ancestor to many kinds of TApplication classes: a GUI application in the LCL, a CGI application in FPCGI, a daemon application in daemonapp. It introduces some properties to describe the environment in which the application is running (environment variables, program command-line parameters) and introduces some methods to initialize and run a program, as well as functionality to handle exceptions.

Typical use of a descendent class is to introduce a global variable Application and use the following code:

Application.Initialize;
  Application.Run;

Since normally only a single instance of this class is created, and it is a TComponent descendent, it can be used as an owner for many components, doing so will ensure these components will be freed when the application terminates.


Reference for unit 'CustApp': Types

TEventLogTypes | Set of TEventLogType
TExceptionEvent | Exception handling event prototype


Reference for unit 'CustApp': Classes

TCustomApplication

Ancestor class for TApplication classes.


Reference for unit 'CustApp': Variables

CustomApplication

Global application instance


Index of all identifiers in unit 'CustApp'

C T

C

CustomApplication

T

TCustomApplication TEventLogTypes TExceptionEvent


TEventLogTypes

Set of TEventLogType

Declaration

Source position: custapp.pp line 25

type TEventLogTypes = set of TEventType;

Description

TEventLogTypes is a set of TEventType, used in TCustomApplication.EventLogFilter to filter events that are sent to the system log.

See also

#rtl.sysutils.TEventType

TCustomApplication.EventLogFilter

Event to filter events, before they are sent to the system log


TExceptionEvent

Exception handling event prototype

Declaration

Source position: custapp.pp line 24

type TExceptionEvent = procedure(

  Sender: TObject;

  E: Exception

) of object;

Arguments

Sender | TCustomApplication instance.
E | Exception instance that should be handled.

Description

TExceptionEvent is the prototype for the exception handling events in TCustomApplication.

See also

TCustomApplication.HandleException | Handle an exception.
TCustomApplication.ShowException | Show an exception to the user


AppClass

Default class used when creating the application instance.

Declaration

Source position: daemonapp.pp line 430

var AppClass: TCustomDaemonApplicationClass;

Description

AppClass can be set to the class of a TCustomDaemonApplication descendant. When the Application function needs to create an application instance, this class will be used. If Application was already called, the value of AppClass will be ignored.

See also

Application | Application instance
TCustomDaemonApplication | Custom daemon application class


Daemon application architecture

[Still needs to be completed]


CurrentStatusNames

Names for various service statuses

Declaration

Source position: daemonapp.pp line 425

var CurrentStatusNames: array [TCurrentStatus] of = ('''Stopped''','''Start Pending''','''Stop Pending''','''Running''','''Continue Pending''','''Pause Pending''','''Paused''');


DefaultDaemonOptions

Default daemon options

Declaration

Source position: daemonapp.pp line 428

var DefaultDaemonOptions: TDaemonOptions = [doAllowStop,doAllowPause];

Description

DefaultDaemonOptions are the default options with which a daemon definition (TDaemonDef) is created.

See also

TDaemonDef

Daemon definition


Reference for unit 'daemonapp'

Daemon (service) application class

uses
System,
CustApp, | Custom application class
Classes,
sysutils,
eventlog, | Unit implementing system log class
rtlconsts; | Constant strings for messages

Overview

The daemonapp unit implements a TApplication class which encapsulates a daemon or service application. It handles installation where this is necessary, and does instantiation of the various daemons where necessary.

The unit consists of 3 separate classes which cooperate tightly:

TDaemon
This is a class that implements the daemon's functionality. One or more descendents of this class can be implemented and instantiated in a single daemon application. For more information, see TDaemon.
TDaemonApplication
This is the actual daemon application class. A global instance of this class is instantiated. It handles the command-line arguments, and instantiates the various daemons. For more information, see TDaemonApplication.
TDaemonDef
This class defines the daemon in the operation system. The TDaemonApplication class has a collection of TDaemonDef instances, which it uses to start the various daemons. For more information, see TDaemonDef.

As can be seen, a single application can implement one ore more daemons (services). Each daemon will be run in a separate thread which is controlled by the application class.

The classes take care of logging through the TEventLog class.

Many options are needed only to make the application behave as a windows service application on windows. These options are ignored in unix-like environment. The documentation will mention this.

Related topics

Architecture

Daemon application architecture


Reference for unit 'daemonapp': Resource strings

SErrNoServiceMapper
'No daemon mapper class registered.'

SErrOnlyOneMapperAllowed
'Not changing daemon mapper class %s with %s: Only 1 mapper allowed.'

SErrNothingToDo
'No command given, use ''%s -h'' for usage.'

SErrDuplicateName
'Duplicate daemon name: %s'

SErrUnknownDaemonClass
'Unknown daemon class name: %s'

SErrDaemonStartFailed
'Failed to start daemon %s : %s'

SDaemonStatus
'Daemon %s current status: %s'

SControlFailed
'Control code %s handling failed: %s'

SCustomCode
'[Custom code %d]'

SErrServiceManagerStartFailed
'Failed to start service manager: %s'

SErrNoDaemonForStatus
'%s: No daemon for status report'

SErrNoDaemonDefForStatus
'%s: No daemon definition for status report'

SErrWindowClass
'Could not register window class'

SErrApplicationAlreadyCreated
'An application instance of class %s was already created.'

SHelpUsage
'Usage: %s [command]'

SHelpCommand
'Where command is one of the following:'

SHelpInstall
'To install the program as a service'

SHelpUnInstall
'To uninstall the service'

SHelpRun
'To run the service'


Reference for unit 'daemonapp': Types

TCurrentStatus | Current daemon status
TCustomControlCodeEvent | Prototype for event to handle a custom control code
TCustomDaemonApplicationClass | Class pointer for TCustomDaemonApplication
TCustomDaemonClass | Class type for TCustomDaemon
TCustomDaemonMapperClass | Class of TCustomDaemonMapper
TDaemonClass | Class type of TDaemon
TDaemonEvent | Daemon event handler prototype
TDaemonOKEvent | Daemon acknowledgement event handler
TDaemonOption | Daemon options
TDaemonOptions | Set of TDaemonOption options.
TDaemonRunMode | Daemon application run mode
TErrorSeverity | Severity of a startup error (Windows only)
TGuiLoopEvent | GUI loop event mechanism
TServiceType | Type of service (Windows only)
TStartType | When should the daemon be started (windows only)


Reference for unit 'daemonapp': Classes

EDaemon | Exception used in all daemon application code
TCustomDaemon | Base daemon application class
TCustomDaemonApplication | Custom daemon application class
TCustomDaemonMapper | Daemon mapper
TDaemon | Daemon class for visual development
TDaemonApplication | Default descendent of CustomDaemonApplication
TDaemonController | Internal daemon controller class
TDaemonDef | Daemon definition
TDaemonDefs | Collection of daemon definitions.
TDaemonMapper | Daemon mapper for designing in IDE
TDaemonThread | Thread to run daemons in
TDependencies | Dependencies collection for a daemon
TDependency | Container to define depenencies on other services.
TWinBindings | Windows Daemon bindings (windows only)


Reference for unit 'daemonapp': Procedures and functions

Application | Application instance
DaemonError | Raise an EDaemon exception
RegisterDaemonApplicationClass | Register alternative TCustomDaemonApplication class.
RegisterDaemonClass | Register daemon
RegisterDaemonMapper | Register a daemon mapper class


Reference for unit 'daemonapp': Variables

AppClass | Default class used when creating the application instance.
CurrentStatusNames | Names for various service statuses
DefaultDaemonOptions | Default daemon options
SStatus | Status message


Index of all identifiers in unit 'daemonapp'

A C D E R S T

A

AppClass Application

C

csContinuePending | csRunning | csStopPending
csPaused | csStartPending | CurrentStatusNames
csPausePending | csStopped |

D

DaemonError | doAllowStop | drmRun
DefaultDaemonOptions | doInteractive | drmUninstall
doAllowPause | drmInstall | drmUnknown

E

EDaemon | esIgnore | esSevere
esCritical | esNormal |

R

RegisterDaemonApplicationClass RegisterDaemonClass RegisterDaemonMapper

S

SControlFailed | SErrOnlyOneMapperAllowed | stAuto
SCustomCode | SErrServiceManagerStartFailed | stBoot
SDaemonStatus | SErrUnknownDaemonClass | stDevice
SErrApplicationAlreadyCreated | SErrWindowClass | stDisabled
SErrDaemonStartFailed | SHelpCommand | stFileSystem
SErrDuplicateName | SHelpInstall | stManual
SErrNoDaemonDefForStatus | SHelpRun | stSystem
SErrNoDaemonForStatus | SHelpUnInstall | stWin32
SErrNoServiceMapper | SHelpUsage |
SErrNothingToDo | SStatus |

T

TCurrentStatus | TDaemonClass | TDaemonThread
TCustomControlCodeEvent | TDaemonController | TDependencies
TCustomDaemon | TDaemonDef | TDependency
TCustomDaemonApplication | TDaemonDefs | TErrorSeverity
TCustomDaemonApplicationClass | TDaemonEvent | TGuiLoopEvent
TCustomDaemonClass | TDaemonMapper | TServiceType
TCustomDaemonMapper | TDaemonOKEvent | TStartType
TCustomDaemonMapperClass | TDaemonOption | TWinBindings
TDaemon | TDaemonOptions |
TDaemonApplication | TDaemonRunMode |


SStatus

Status message

Declaration

Source position: daemonapp.pp line 427

var SStatus: array [1..5] of = ('''Stop''','''Pause''','''Continue''','''Interrogate''','''Shutdown''');


TCurrentStatus

Current daemon status

Declaration

Source position: daemonapp.pp line 38

type TCurrentStatus = (
csStopped, | The daemon is stopped, i.e. inactive.
csStartPending, | The daemon is starting, but not yet fully running.
csStopPending, | The daemon is stopping, but not yet fully stopped.
csRunning, | The daemon is running (it is operational).
csContinuePending, | The daemon is continuing, but not yet running
csPausePending, | The daemon is about to be paused.
csPaused | The daemon is paused: running but not active.
);

Description

TCurrentStatus indicates the current state of the daemon. It changes from one state to the next during the time the instance is active. The daemon application changes the state of the daemon, depending on signals it gets from the operating system, by calling the appropriate methods.


TCustomControlCodeEvent

Prototype for event to handle a custom control code

Declaration

Source position: daemonapp.pp line 74

type TCustomControlCodeEvent = procedure(

  Sender: TCustomDaemon;

  ACode: DWord;

  var Handled: Boolean

) of object;

Arguments

Sender | Daemon instance for which the control event was meant
ACode | Control code being sent to the daemon
Handled | Was the control code handled ?

Description

In case the system sends a non-standard control code to the daemon, an event handler is executed with this prototype.


TCustomDaemonClass

Class type for TCustomDaemon

Declaration

Source position: daemonapp.pp line 71

type TCustomDaemonClass = class of TCustomDaemon;

Description

The class type is needed in the TDaemonDef definition.

See also

TDaemonDef

Daemon definition


TDaemonClass

Class type of TDaemon

Declaration

Source position: daemonapp.pp line 138

type TDaemonClass = class of TDaemon;


TDaemonEvent

Daemon event handler prototype

Declaration

Source position: daemonapp.pp line 27

type TDaemonEvent = procedure(

  Sender: TCustomDaemon

) of object;

Arguments

Sender

Daemon instance

Description

TDaemonEvent is used in event handling. The Sender is the TCustomDaemon instance that has initiated the event.


TDaemonOKEvent

Daemon acknowledgement event handler

Declaration

Source position: daemonapp.pp line 28

type TDaemonOKEvent = procedure(

  Sender: TCustomDaemon;

  var OK: Boolean

) of object;

Arguments

Sender | Daemon instance
OK | Operation was successful

Description

TDaemonOKEvent is used in event handling, when a boolean result must be obtained, for instance, to see if an operation was performed succesfully.


TDaemonOption

Daemon options

Declaration

Source position: daemonapp.pp line 30

type TDaemonOption = (
doAllowStop, | The daemon can be stopped.
doAllowPause, | The daemon can be paused.
doInteractive | The daemon interacts with the desktop.
);

Description

Enumerated that enumerates the various daemon operation options.


TDaemonOptions

Set of TDaemonOption options.

Declaration

Source position: daemonapp.pp line 31

type TDaemonOptions = set of (
doAllowStop, | The daemon can be stopped.
doAllowPause, | The daemon can be paused.
doInteractive | The daemon interacts with the desktop.
);

Description

TDaemonOption enumerates the various options a daemon can have.


TDaemonRunMode

Daemon application run mode

Declaration

Source position: daemonapp.pp line 33

type TDaemonRunMode = (
drmUnknown, | Unknown mode
drmInstall, | Daemon install mode (windows only)
drmUninstall, | Daemon uninstall mode (windows only)
drmRun | Daemon is running normally
);

Description

TDaemonRunMode indicates in what mode the daemon application (as a whole) is currently running.

See also

RunMode

Application mode


TErrorSeverity

Severity of a startup error (Windows only)

Declaration

Source position: daemonapp.pp line 143

type TErrorSeverity = (
esIgnore, | Ignore startup errors
esNormal, | Error is logged, but startup continues
esSevere, | Error is logged, and startup is continued if last known good configuration is active, or system is restarted using last known good configuration
esCritical | Error is logged, and startup is stopped if last known good configuration is active, or system is restarted using last known good configuration
);

Description

TErrorSeverity determines what action windows takes when the daemon fails to start. It is used on windows only, and is ignored on other platforms.


TGuiLoopEvent

GUI loop event mechanism

Declaration

Source position: daemonapp.pp line 326

type TGuiLoopEvent = procedure of object;

Description

TGuiLoopEvent is the main GUI loop event procedure prototype. It is called by the application instance in case the daemon has a visual part, which needs to handle visual events. It is run in the main application thread.

See also

TCustomDaemonApplication.GUIMainLoop | GUI main loop callback
TCustomDaemonApplication.GUIHandle | Handle of GUI loop main application window handle


TServiceType

Type of service (Windows only)

Declaration

Source position: daemonapp.pp line 142

type TServiceType = (
stWin32, | Regular win32 service
stDevice, | Device driver
stFileSystem | File system driver
);

Description

The type of service. This type is used on windows only, to signal the operating system what kind of service is being installed or run.


TStartType

When should the daemon be started (windows only)

Declaration

Source position: daemonapp.pp line 144

type TStartType = (
stBoot, | During system boot
stSystem, | During load of device drivers
stAuto, | Started automatically by service manager during system startup
stManual, | Started manually by the user or other processes.
stDisabled | Service is not started, it is disabled
);

Description

TStartType can be used to define when the service must be started on windows. This type is not used on other platforms.


DefaultFieldClasses

Default field classes to use when creating a new TField instance.

Declaration

Source position: db.pas line 2042

const DefaultFieldClasses: array [TFieldType] of TFieldClass = (Tfield, TStringField, TSmallIntField, TLongintField, TWordField, TBooleanField, TFloatField, TCurrencyField, TBCDField, TDateField, TTimeField, TDateTimeField, TBytesField, TVarBytesField, TAutoIncField, TBlobField, TMemoField, TGraphicField, TBlobField, TBlobField, TBlobField, TBlobField, Nil, TStringField, TWideStringField, TLargeIntField, Nil, Nil, Nil, Nil, TBlobField, TMemoField, TVariantField, Nil, Nil, TGuidField, Nil, TFMTBCDField, TWideStringField, TWideMemoField);

Description

DefaultFieldClasses contains the TField descendent class to use when a TDataset instance needs to create fields based on the TFieldDefs field definitions when opening the dataset. The entries can be set to create customized TField descendents for certain field datatypes in all datasets.

See also

TFieldType | Field data type description
TField | Provide access to the contents of a single field in a record
TField.DataType | The data type of the field.


dsEditModes

Edit modes

Declaration

Source position: db.pas line 2085

const dsEditModes = [dsEdit, dsInsert, dsSetKey];

Description

dsEditModes contains the various values of TDataset.State for which the dataset is in edit mode, i.e. states in which it is possible to set field values for that dataset.

See also

TDatasetState | Current state of the dataset
TDataset.State | Current operational state of the dataset
TDataset.Edit | Set the dataset in editing mode.
TDataset.Insert | Insert a new record at the current position.


dsMaxBufferCount

Maximum data buffers count for dataset

Declaration

Source position: db.pas line 29

const dsMaxBufferCount = MAXINT div 8;


dsMaxStringSize

Maximum size of string fields

Declaration

Source position: db.pas line 30

const dsMaxStringSize = 8192;


dsWriteModes

Field write modes

Declaration

Source position: db.pas line 2086

const dsWriteModes = [dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsInternalCalc];

Description

dsWriteModes contains the various values of TDataset.State for which data can be written to the dataset buffer.

See also

TDatasetState | Current state of the dataset
TDataset.State | Current operational state of the dataset


Fieldtypenames

Human-readable names of field types

Declaration

Source position: db.pas line 1975

const Fieldtypenames: array [TFieldType] of = ('Unknown', 'String', 'Smallint', 'Integer', 'Word', 'Boolean', 'Float', 'Currency', 'BCD', 'Date', 'Time', 'DateTime', 'Bytes', 'VarBytes', 'AutoInc', 'Blob', 'Memo', 'Graphic', 'FmtMemo', 'ParadoxOle', 'DBaseOle', 'TypedBinary', 'Cursor', 'FixedChar', 'WideString', 'Largeint', 'ADT', 'Array', 'Reference', 'DataSet', 'OraBlob', 'OraClob', 'Variant', 'Interface', 'IDispatch', 'Guid', 'TimeStamp', 'FMTBcd', 'FixedWideChar', 'WideMemo');

Description

FieldTypeNames contains the names (in english) for the various field data types.

See also

TFieldType | Field data type description
TField.DataType | The data type of the field.


FieldTypetoVariantMap

Map field types on variant types

Declaration

Source position: db.pas line 1965

const FieldTypetoVariantMap: array [TFieldType] of Integer = (varError, varOleStr, varSmallint, varInteger, varSmallint, varBoolean, varDouble, varCurrency, varCurrency, varDate, varDate, varDate, varOleStr, varOleStr, varInteger, varOleStr, varOleStr, varOleStr, varOleStr, varOleStr, varOleStr, varOleStr, varError, varOleStr, varOleStr, varError, varError, varError, varError, varError, varOleStr, varOleStr, varVariant, varUnknown, varDispatch, varOleStr, varOleStr, varDouble, varOleStr, varOleStr);

Description

FieldTypetoVariantMap contains for each field datatype the variant value type that corresponds to it. If a field type cannot be expressed by a variant type, then varError is stored in the variant value.

See also

TFieldType | Field data type description
TField.Value | Value of the field as a variant value
TParam.Value | Value as a variant


Reference for unit 'db'

Database access layer

uses

  System,

  Classes,

  sysutils,

  Variants,

  FmtBCD,

  MaskUtils;

Overview

The db unit provides the basis for all database access mechanisms. It introduces abstract classes, on which all database access mechanisms are based: TDataset representing a set of records from a database, TField which represents the contents of a field in a record, TDatasource which acts as an event distributor on behalf of a dataset and TParams which can be used to parametrize queries. The databases connections themselves are abstracted in the TDatabase class.


Reference for unit 'db': Constants

DefaultFieldClasses | Default field classes to use when creating a new TField instance.
dsEditModes | Edit modes
dsMaxBufferCount | Maximum data buffers count for dataset
dsMaxStringSize | Maximum size of string fields
dsWriteModes | Field write modes
Fieldtypenames | Human-readable names of field types
FieldTypetoVariantMap | Map field types on variant types
SQLDelimiterCharacters | SQL statement delimiter token characters
YesNoChars | Array of characters mapping a boolean to Y/N


Reference for unit 'db': Types

LargeInt | Large (64-bit) integer
PBookmarkFlag | Pointer to TBookmarkflag type
PBufferList | Pointer to TBufferlist type
PDateTimeRec | Pointer to TDateTimeRec record
PLargeInt | Pointer to Large (64-bit) integer
PLookupListRec | Pointer to TLookupListRec record
TBlobData | Alias type to store blob data
TBlobStreamMode | Mode used when creating a blob stream
TBlobType | Valid BLOB fieldtypes
TBookmark | Bookmark type (deprecated)
TBookmarkFlag | Bookmark flags
TBookmarkStr | Bookmark type
TBufferArray | Pointer to an array of buffers
TBufferList | Array of PChar records
TDataAction | Action to take when a data manipulation operation has failed.
TDatabaseClass | Class pointer for TDatabase.
TDataChangeEvent | Event handler prototype when a field's data has changed.
TDataEvent | Various events that are sent to datasources
TDataOperation | Internal callback type
TDatasetClass | Class type for the TDataset class
TDataSetErrorEvent | Error handling callback
TDataSetNotifyEvent | Event handler prototype for dataset events
TDataSetState | Current state of the dataset
TDateTimeAlias | Alias for TDateTime type
TDateTimeRec | Date/Time record
TDBDatasetClass | Class of TDBDataset
TDBTransactionClass | Class of TDBTransaction
TFieldAttribute | Field attributes
TFieldAttributes | Set of TFieldAttribute values.
TFieldChars | Set of valid characters for the field contents
TFieldClass |
TFieldGetTextEvent | Event handler to get field content
TFieldKind | Kind of field
TFieldKinds | Set of TFieldKind values
TFieldMap | Array type with TFieldType as index type.
TFieldNotifyEvent | Noification handler prototype
TFieldRef | Pointer to a TField instance
TFieldSetTextEvent | Event handler to get field content
TFieldType | Field data type description
TFilterOption | Available filter options.
TFilterOptions | Set of filter options to use.
TFilterRecordEvent | Record filtering event handler prototype
TGetMode | Get new buffer mode
TGetResult | result of the GetRecord operation.
TIndexOption | Index description flags
TIndexOptions | Set of TIndexOption values
TLocateOption | Available options when locating a record in a dataset
TLocateOptions | Options to use when locating a record in a dataset
TLoginEvent | Login event handler
TLookupListRec | Record to store lookup results
TParamBinding | Auxiliary type, used when binding parameters.
TParamStyle | Style of parameter
TParamType | Parameter type
TParamTypes | Set of TParamType
TProviderFlag | What to odo with fields when applying updates
TProviderFlags | Set of TProviderFlag flags
TPSCommandType
TRecordBuffer
TRecordBufferBaseType
TResolverResponse | Resolver response code
TResyncMode | Internal flag for resynchronisiation
TStringFieldBuffer | Type to access string field content buffers as an array of characters
TUpdateAction | Action to perform when an update operation fails
TUpdateKind | Kind of update operation
TUpdateMode | Update mode
TUpdateStatus | Record update status
TUpdateStatusSet | Set of update states


Reference for unit 'db': Classes

EDatabaseError | Base class for all database-related errors
EUpdateError | Error raised when updating data during a post operation.
IProviderSupport
TAutoIncField | Field for auto-incremental, 32-bit signed integer data
TBCDField | Field class for Binary Coded Decimal (BCD) values
TBinaryField | Field class for working with binary field data
TBlobField | Base class for BLOB field data
TBooleanField | Boolean field class type
TBytesField | Field class for fixed size byte array values
TCheckConstraint | Record-level constraint definition
TCheckConstraints | Set of record-level constraints
TCurrencyField | Class for currency fields
TCustomConnection | Abstract class for connections to a server
TDatabase | Base class for connecting a FreePascal application to an external Database engine
TDataLink | Data event handling agent for controls
TDataSet | Base class for records-based data-access
TDataSource | Component representing the link between a local (GUI) component and a dataset
TDateField | Field class for date values
TDateTimeField | Field class for date/time/Datetime values
TDBDataset | Dataset connected to a database.
TDBTransaction | Encapsulate a transaction
TDefCollection | Definition collection
TDetailDataLink | Represents the link between a detail data source and a master datasource.
TField | Provide access to the contents of a single field in a record
TFieldDef | Class to describe one field in a record in a dataset
TFieldDefs | Collection of TFieldDef instances.
Tfields | Collection of #fcl.db.TField instances
TFieldsEnumerator | Default enumerator for the fields collection of a dataset.
TFloatField | Class for floating point values
TFMTBCDField
TGraphicField | Field class for graphical BLOB field data
TGuidField | Field class for native variant data
TIndexDef | Index definition
TIndexDefs | A class to keep a list of index definitions
TIntegerField | Alias for TLongintField
TLargeintField | Field class for 64-bit signed integer data
TLongintField | Field class for 32-bit signed integer data
TLookupList | Class to manage lookup list values
TMasterDataLink | Datalink for Master-Detail relationships between datasets.
TMasterParamsDataLink | Class to establish a master-detail relationship between dataset, based on parameters
TMemoField | Base class for MEMO (text BLOB) field data
TNamedItem | Named collection item
TNumericField | Base class for all numerical data field classe
TParam | Parameter description class
TParams | A collection of parameter values for SQL-based datasets
TSmallintField | Field class for smallint (16-bit signed integer) data
TStringField | Field class to handle ansistring fields
TTimeField | Field class for time values
TVarBytesField | Field class for variable size byte array values
TVariantField | Field class for native variant data
TWideMemoField | Field class for wide MEMO (widestring text BLOB) field data
TWideStringField | Field class for widestring data
TWordField | Field class for word (16-bit unsigned integer) data


Reference for unit 'db': Procedures and functions

BuffersEqual | Check whether 2 memory buffers are equal
DatabaseError | Raise an EDatabaseError exception.
DatabaseErrorFmt | Raise an EDatabaseError exception with a formatted message
DateTimeRecToDateTime | Convert TDateTimeRec record to a TDateTime value.
DateTimeToDateTimeRec | Convert TDateTime value to a TDateTimeRec record.
DisposeMem | Dispose of a heap memory block and Nil the pointer (deprecated)
ExtractFieldName | Extract the field name at position
SkipComments | Skip SQL comments


Index of all identifiers in unit 'db'

B C D E F G I L P R S T U Y

B

bfBOF | bfInserted | bmWrite
bfCurrent | bmRead | BuffersEqual
bfEOF | bmReadWrite |

C

ctDDL | ctQuery | ctTable
ctDelete | ctSelect | ctUnknown
ctInsert | ctStoredProc | ctUpdate

D

daAbort | deFieldListChange | dsEdit
daFail | deFocusControl | dsEditModes
daRetry | deLayoutChange | dsFilter
DatabaseError | deParentScroll | dsInactive
DatabaseErrorFmt | dePropertyChange | dsInsert
DateTimeRecToDateTime | deReconcileError | dsInternalCalc
DateTimeToDateTimeRec | deRecordChange | dsMaxBufferCount
deCheckBrowseMode | deUpdateRecord | dsMaxStringSize
deConnectChange | deUpdateState | dsNewValue
deDataSetChange | DisposeMem | dsOldValue
deDataSetScroll | dsBlockRead | dsOpening
deDisabledStateChange | dsBrowse | dsSetKey
DefaultFieldClasses | dsCalcFields | dsWriteModes
deFieldChange | dsCurValue |

E

EDatabaseError EUpdateError ExtractFieldName

F

faFixed | ftBlob | ftInterface
faHiddenCol | ftBoolean | ftLargeint
faLink | ftBytes | ftMemo
faReadonly | ftCurrency | ftOraBlob
faRequired | ftCursor | ftOraClob
faUnNamed | ftDataSet | ftParadoxOle
Fieldtypenames | ftDate | ftReference
FieldTypetoVariantMap | ftDateTime | ftSmallint
fkCalculated | ftDBaseOle | ftString
fkData | ftFixedChar | ftTime
fkInternalCalc | ftFixedWideChar | ftTimeStamp
fkLookup | ftFloat | ftTypedBinary
foCaseInsensitive | ftFMTBcd | ftUnknown
foNoPartialCompare | ftFmtMemo | ftVarBytes
ftADT | ftGraphic | ftVariant
ftArray | ftGuid | ftWideMemo
ftAutoInc | ftIDispatch | ftWideString
ftBCD | ftInteger | ftWord

G

gmCurrent | grBOF | grOK
gmNext | grEOF |
gmPrior | grError |

I

IProviderSupport | ixExpression | ixUnique
ixCaseInsensitive | ixNonMaintained |
ixDescending | ixPrimary |

L

LargeInt loCaseInsensitive loPartialKey

P

PBookmarkFlag | pfInWhere | ptInput
PBufferList | PLargeInt | ptInputOutput
PDateTimeRec | PLookupListRec | ptOutput
pfHidden | psInterbase | ptResult
pfInKey | psPostgreSQL | ptUnknown
pfInUpdate | psSimulated |

R

rrAbort | rrIgnore | rrSkip
rrApply | rrMerge |

S

SkipComments SQLDelimiterCharacters

T

TAutoIncField | TDBTransaction | TLocateOptions
TBCDField | TDBTransactionClass | TLoginEvent
TBinaryField | TDefCollection | TLongintField
TBlobData | TDetailDataLink | TLookupList
TBlobField | TField | TLookupListRec
TBlobStreamMode | TFieldAttribute | TMasterDataLink
TBlobType | TFieldAttributes | TMasterParamsDataLink
TBookmark | TFieldChars | TMemoField
TBookmarkFlag | TFieldClass | TNamedItem
TBookmarkStr | TFieldDef | TNumericField
TBooleanField | TFieldDefs | TParam
TBufferArray | TFieldGetTextEvent | TParamBinding
TBufferList | TFieldKind | TParams
TBytesField | TFieldKinds | TParamStyle
TCheckConstraint | TFieldMap | TParamType
TCheckConstraints | TFieldNotifyEvent | TParamTypes
TCurrencyField | TFieldRef | TProviderFlag
TCustomConnection | Tfields | TProviderFlags
TDataAction | TFieldsEnumerator | TPSCommandType
TDatabase | TFieldSetTextEvent | TRecordBuffer
TDatabaseClass | TFieldType | TRecordBufferBaseType
TDataChangeEvent | TFilterOption | TResolverResponse
TDataEvent | TFilterOptions | TResyncMode
TDataLink | TFilterRecordEvent | TSmallintField
TDataOperation | TFloatField | TStringField
TDataSet | TFMTBCDField | TStringFieldBuffer
TDatasetClass | TGetMode | TTimeField
TDataSetErrorEvent | TGetResult | TUpdateAction
TDataSetNotifyEvent | TGraphicField | TUpdateKind
TDataSetState | TGuidField | TUpdateMode
TDataSource | TIndexDef | TUpdateStatus
TDateField | TIndexDefs | TUpdateStatusSet
TDateTimeAlias | TIndexOption | TVarBytesField
TDateTimeField | TIndexOptions | TVariantField
TDateTimeRec | TIntegerField | TWideMemoField
TDBDataset | TLargeintField | TWideStringField
TDBDatasetClass | TLocateOption | TWordField

U

uaAbort | ukDelete | upWhereKeyOnly
uaApplied | ukInsert | usDeleted
uaFail | ukModify | usInserted
uaRetry | upWhereAll | usModified
uaSkip | upWhereChanged | usUnmodified

Y

YesNoChars


LargeInt

Large (64-bit) integer

Declaration

Source position: db.pas line 41

type LargeInt = Int64;


PBookmarkFlag

Pointer to TBookmarkflag type

Declaration

Source position: db.pas line 1248

type PBookmarkFlag = ^TBookmarkFlag;

Description

PBookmarkFlag is a convenience type, defined for internal use in TDataset or one of it's descendents.

See also

TBookmarkFlag

Bookmark flags


PBufferList

Pointer to TBufferlist type

Declaration

Source position: db.pas line 1260

type PBufferList = ^TBufferList;

Description

PBufferList is a pointer to a structure of type TBufferList. It is an internal type, and should not be used in end-user code.

See also

TBufferList

Array of PChar records


PDateTimeRec

Pointer to TDateTimeRec record

Declaration

Source position: db.pas line 125

type PDateTimeRec = ^TdateTimeRec;

See also

TDateTimeRec

Date/Time record


PLargeInt

Pointer to Large (64-bit) integer

Declaration

Source position: db.pas line 42

type PLargeInt = ^LargeInt;


PLookupListRec

Pointer to TLookupListRec record

Declaration

Source position: db.pas line 238

type PLookupListRec = ^TLookupListRec;

See also

TlookupListRec

Record to store lookup results


SQLDelimiterCharacters

SQL statement delimiter token characters

Declaration

Source position: db.pas line 36

const SQLDelimiterCharacters = [';', ',', ' ', '(', ')', #13, #10, #9];


TBlobData

Alias type to store blob data

Declaration

Source position: db.pas line 1104

type TBlobData = AnsiString;

Description

TBlobData should never be used directly in application code.

See also

TBlobField

Base class for BLOB field data


TBlobStreamMode

Mode used when creating a blob stream

Declaration

Source position: db.pas line 849

type TBlobStreamMode = (
bmRead, | Read blob data
bmWrite, | Write blob data
bmReadWrite | Read and write blob data
);

Description

TBlobStramMode is used when creating a stream for redaing BLOB data. It indicates what the data will be used for: reading, writing or both.


TBlobType

Valid BLOB fieldtypes

Declaration

Source position: db.pas line 850

type TBlobType = ftBlob..ftWideMemo;

Description

TBlobType is a subrange type, indicating the various datatypes of BLOB fields.

See also

TFieldType

Field data type description


TBookmark

Bookmark type (deprecated)

Declaration

Source position: db.pas line 1245

type TBookmark = Pointer;

Description

TBookMark is the type used by the TDataset.SetBookMark method. It is an opaque type, and should not be used any more, it is superseded by the TBookmarkStr type.

See also

TBookmarkStr

Bookmark type


TBookmarkFlag

Bookmark flags

Declaration

Source position: db.pas line 1249

type TBookmarkFlag = (
bfCurrent, | Buffer used for the current record
bfBOF, | First record in the dataset.
bfEOF, | Last record in the dataset
bfInserted | Buffer used for insert
);

Description

TBookmarkFlag is used internally by TDataset and it's descendent types to mark the internal memory buffers. It should not be used in end-user applications.

See also

PBookmarkFlag

Pointer to TBookmarkflag type


TBookmarkStr

Bookmark type

Declaration

Source position: db.pas line 1246

type TBookmarkStr = String;

Description

TBookmarkStr is the type used by the TDataset.Bookmark property. It can be used as a string, but should in fact be considered an opaque type.

See also

TDataset.Bookmark

Get or set the current cursor position


TBufferArray

Pointer to an array of buffers

Declaration

Source position: db.pas line 1262

type TBufferArray = ^TRecordBuffer;

Description

TBufferArray is an internally used type. It can change in future implementations, and should not be used in application code.

See also

TDataset

Base class for records-based data-access


TBufferList

Array of PChar records

Declaration

Source position: db.pas line 1261

type TBufferList = array [0..dsMaxBufferCount-1] of TRecordBuffer;

Description

TBufferList is used intenally by the TDataset class to manage the memory buffers for the data. It should not be necessary to use this type in end-user applications.


TDataAction

Action to take when a data manipulation operation has failed.

Declaration

Source position: db.pas line 1270

type TDataAction = (
daFail, | The operation should fail (an exception will be raised)
daAbort, | The operation should be aborted (edits are undone, and an EAbort exception is raised)
daRetry | Retry the operation.
);

Description

TDataAction is used by the TDataSetErrorEvent event handler prototype. The parameter Action of this event handler is of TDataAction type, and should indicate what action must be taken by the dataset.

See also

TDataSetErrorEvent | Error handling callback
TDataset.OnEditError | Event triggered when an edit operation fails.
TDataset.OnPosterror | Event triggered when a post operation fails.
TDataset.OnDeleteError | Event triggered when a delete operation fails.


TDataChangeEvent

Event handler prototype when a field's data has changed.

Declaration

Source position: db.pas line 1761

type TDataChangeEvent = procedure(

  Sender: TObject;

  Field: TField

) of object;

Arguments

Sender | Datasource that triggered the event
Field | Field that changed, or Nil if record changed.

Description

TDataChangeEvent is the event handler prototype for the TDatasource.OnDataChange event. The sender parameter is the TDatasource instance that triggered the event, and the Field parameter is the field whose data has changed. If the dataset has scrolled, then the Field parameter is Nil.

See also

TDatasource.OnDataChange

Called whenever data changes in the current record


TDataEvent

Various events that are sent to datasources

Declaration

Source position: db.pas line 53

type TDataEvent = (
deFieldChange, | A field value changed
deRecordChange, | The current record changed
deDataSetChange, | The dataset property changed
deDataSetScroll, | The dataset scrolled to another record
deLayoutChange, | The layout properties of one of the fields changed
deUpdateRecord, | The record is being updated
deUpdateState, | The dataset state is updated
deCheckBrowseMode, | The browse mode is being checked
dePropertyChange, | Unused
deFieldListChange, | Event sent when the list of fields of a dataset changes
deFocusControl, | Event sent whenever a control connected to a field should be focused
deParentScroll, | Unused
deConnectChange, | Unused
deReconcileError, | Unused
deDisabledStateChange | Unused
);

Description

TDataEvent describes the various events that can be sent to TDatasource instances connected to a TDataset instance.

See also

TDatasource | Component representing the link between a local (GUI) component and a dataset
TDataset | Base class for records-based data-access
TDataLink | Data event handling agent for controls


TDataOperation

Internal callback type

Declaration

Source position: db.pas line 1280

type TDataOperation = procedure of object;

Description

TDataOperation is a prototype handler used internally in TDataset. It can be changed at any time, so it should not be used in end-user code.

See also

TDatasetNotifyEvent

Event handler prototype for dataset events


TDateTimeAlias

Alias for TDateTime type

Declaration

Source position: db.pas line 124

type TDateTimeAlias = type TDateTime;

Description

TDateTimeAlias is no longer used.


TDateTimeRec

Date/Time record

Declaration

Source position: db.pas line 126

type TDateTimeRec = record
case TFieldType of
ftDate: (
Date: LongInt; | Date value
);
ftTime: (
Time: LongInt; | Time value
);
ftDateTime: (
DateTime: TDateTimeAlias; | Date/time value
);
end;

Description

TDateTimeRec was used by older TDataset implementations to store date/time values. Newer implementations use the TDateTime. This type should no longer be used.


TFieldGetTextEvent

Event handler to get field content

Declaration

Source position: db.pas line 232

type TFieldGetTextEvent = procedure(

  Sender: TField;

  var aText: ;

  DisplayText: Boolean

) of object;

Arguments

Sender | Field instance whose text should be returned.
aText | The result of the event handler should be returned in this parameter.
DisplayText | Is the result used for display purposes ?

Description

TFieldGetTextEvent is the prototype for the TField.OnGetText event handler. It should be used when the text of a field requires special formatting. The event handler should return the contents of the field in formatted form in the AText parameter. The DisplayText is True if the text is used for displaying purposes or is False if it will be used for editing purposes.

See also

TField.OnGetText | Event to format the field's content
TFieldSetTextEvent | Event handler to get field content


TFieldKind

Kind of field

Declaration

Source position: db.pas line 228

type TFieldKind = (
fkData, | Field represents actual data in the underlying data structure.
fkCalculated, | The field is calculated on the fly.
fkLookup, | The field is a lookup field.
fkInternalCalc | Field is calculated but stored in an underlying buffer.
);

Description

TFieldKind indicates the type of a TField instance. Besides TField instances that represent fields present in the underlying data records, there can also be calculated or lookup fields. To distinguish between these kind of fields, TFieldKind is introduced.

See also

TField.FieldKind

The kind of field.


TFieldKinds

Set of TFieldKind values

Declaration

Source position: db.pas line 229

type TFieldKinds = set of (
fkData, | Field represents actual data in the underlying data structure.
fkCalculated, | The field is calculated on the fly.
fkLookup, | The field is a lookup field.
fkInternalCalc | Field is calculated but stored in an underlying buffer.
);

Description

TFieldKinds is a set of TFieldKind values. It is used internally by the classes of the DB unit.

See also

TFieldKind

Kind of field


TFieldMap

Array type with TFieldType as index type.

Declaration

Source position: db.pas line 120

type TFieldMap = array [TFieldType] of Byte;

Description

TFieldMap is no longer used.

See also

TFieldType

Field data type description


TFieldNotifyEvent

Noification handler prototype

Declaration

Source position: db.pas line 231

type TFieldNotifyEvent = procedure(

  Sender: TField

) of object;

Arguments

Sender

Field that triggered the event.

Description

TFieldNotifyEvent is a prototype for the event handlers in the TField class. It's Sender parameter is the field instance that triggered the event.


TFieldRef

Pointer to a TField instance

Declaration

Source position: db.pas line 235

type TFieldRef = ^TField;


TFieldSetTextEvent

Event handler to get field content

Declaration

Source position: db.pas line 234

type TFieldSetTextEvent = procedure(

  Sender: TField;

  const aText:

) of object;

Arguments

Sender | Field which invoked the event handler
aText | User-supplied value for the field's contents

Description

TFieldSetTextEvent is the prototype for an event handler used to set the contents of a field based on a user-edited text. It should be used when the text of a field is entered with special formatting. The event handler should set the contents of the field based on the formatted text in the AText parameter.

See also

TField.OnGetText | Event to format the field's content
TFieldGetTextEvent | Event handler to get field content


TFieldType

Field data type description

Declaration

Source position: db.pas line 110

type TFieldType = (
ftUnknown, | Unknown data type
ftString, | String data value (ansistring)
ftSmallint, | Small integer value(1 byte, signed)
ftInteger, | Regular integer value (4 bytes, signed)
ftWord, | Word-sized value(2 bytes, unsigned)
ftBoolean, | Boolean value
ftFloat, | Floating point value (double)
ftCurrency, | Currency value (4 decimal points)
ftBCD, | Binary Coded Decimal value (DECIMAL and NUMERIC SQL types)
ftDate, | Date value
ftTime, | Time value
ftDateTime, | Date/Time (timestamp) value
ftBytes, | Array of bytes value, fixed size (unytped)
ftVarBytes, | Array of bytes value, variable size (untyped)
ftAutoInc, | Auto-increment integer value (4 bytes)
ftBlob, | Binary data value (no type, no size)
ftMemo, | Binary text data (no size)
ftGraphic, | Graphical data value (no size)
ftFmtMemo, | Formatted memo ata value (no size)
ftParadoxOle, | Paradox OLE field data (no size)
ftDBaseOle, | Paradox OLE field data
ftTypedBinary, | Binary typed data (no size)
ftCursor, | Cursor data value (no size)
ftFixedChar, | Fixed character array (string)
ftWideString, | Widestring (2 bytes per character)
ftLargeint, | Large integer value (8-byte)
ftADT, | ADT value
ftArray, | Array data
ftReference, | Reference data
ftDataSet, | Dataset data (blob)
ftOraBlob, | Oracle BLOB data
ftOraClob, | Oracle CLOB data
ftVariant, | Variant data value
ftInterface, | interface data value
ftIDispatch, | Dispatch data value
ftGuid, | GUID data value
ftTimeStamp, | Timestamp data value
ftFMTBcd, | Formatted BCD (Binary Coded Decimal) value.
ftFixedWideChar, | Fixed wide character date (2 bytes per character)
ftWideMemo | Widestring memo data
);

Description

TFieldType indicates the type of a TField underlying data, in the DataType property.


TFilterOption

Available filter options.

Declaration

Source position: db.pas line 1286

type TFilterOption = (
foCaseInsensitive, | Filter case insensitively.
foNoPartialCompare | Do not compare values partially, always compare completely.
);

Description

TFilterOption enumerates the various options available when filtering a dataset. The TFilterOptions set is used in the TDataset.FilterOptions property to indicate which of the options should be used when filtering the data.

See also

TFilterOptions | Set of filter options to use.
TDataset.FilterOptions | Options to apply when filtering
TDataset.Filter | Filter to apply to the data in memory.
TDataset.Filtered | Is the filter active or not.


TFilterOptions

Set of filter options to use.

Declaration

Source position: db.pas line 1287

type TFilterOptions = set of (
foCaseInsensitive, | Filter case insensitively.
foNoPartialCompare | Do not compare values partially, always compare completely.
);

Description

TFilterOption is the set of filter options to use when filtering a dataset. This set type is used in the TDataset.FilterOptions property. The available values are described in the TFilterOption type.

See also

TDataset.FilterOptions | Options to apply when filtering
TFilterOption | Available filter options.


TFilterRecordEvent

Record filtering event handler prototype

Declaration

Source position: db.pas line 1289

type TFilterRecordEvent = procedure(

  DataSet: TDataSet;

  var Accept: Boolean

) of object;

Arguments

DataSet | Dataset that triggered the event
Accept | Set to indicate whether the current record should be shown or not.

Description

TFilterRecordEvent is the prototype for the TDataset.OnFilterRecord event handler. The Dataset parameter indicates which dataset triggered the event, and the Accept parameter must be set to true if the current record should be shown, False should be used when the record should be hidden.

See also

TDataset.OnFilterRecord

Event triggered to filter records.


TGetMode

Get new buffer mode

Declaration

Source position: db.pas line 1264

type TGetMode = (
gmCurrent, | Retrieve the current record
gmNext, | Retrieve the next record.
gmPrior | Retrieve the previous record.
);

Description

TGetMode is used internally by TDataset when it needs to fetch more data for its buffers (using GetRecord). It tells the descendent dataset what operation must be performed.

See also

TDataset.Next | Go to the next record in the dataset.
TDataset.Prior | Go to the previous record
TGetResult | result of the GetRecord operation.


TGetResult

result of the GetRecord operation.

Declaration

Source position: db.pas line 1266

type TGetResult = (
grOK, | The operation was completed succesfully
grBOF, | The beginning of the recordset is reached
grEOF, | The end of the recordset is reached.
grError | An error occurred
);

Description

TGetResult is used by descendents of TDataset when they have to communicate the result of the GetRecord operation back to the TDataset record.

See also

TGetMode

Get new buffer mode


TIndexOption

Index description flags

Declaration

Source position: db.pas line 973

type TIndexOption = (
ixPrimary, | The index is the primary index for the data
ixUnique, | The index is a unique index, i.e. each index value can occur only once
ixDescending, | The values in the index are sorted descending.
ixCaseInsensitive, | The values in the index are sorted case-insensitively
ixExpression, | The values in the index are based on a calculated expression.
ixNonMaintained | The index is non-maintained, i.e. changing the data will not update the index.
);

Description

TIndexOption describes the various properties that an index can have. It is used in the TIndexOptions set type to describe all properties of an index definition as in TIndexDef.

See also

TIndexOptions

Set of TIndexOption values


TIndexOptions

Set of TIndexOption values

Declaration

Source position: db.pas line 975

type TIndexOptions = set of (
ixPrimary, | The index is the primary index for the data
ixUnique, | The index is a unique index, i.e. each index value can occur only once
ixDescending, | The values in the index are sorted descending.
ixCaseInsensitive, | The values in the index are sorted case-insensitively
ixExpression, | The values in the index are based on a calculated expression.
ixNonMaintained | The index is non-maintained, i.e. changing the data will not update the index.
);

Description

TIndexOptions contains the set of properties that an index can have. It is used in the TIndexDef.Options property to describe all properties of an index definition as in TIndexDef.

See also

TIndexDef.Options | Index options
TIndexDef | Index definition
TIndexOption | Index description flags


TLocateOption

Available options when locating a record in a dataset

Declaration

Source position: db.pas line 1277

type TLocateOption = (
loCaseInsensitive, | Perform a case-insensitive search
loPartialKey | Accept partial key matches
);

Description

TLocateOption is used in the TDataset.Locate call to enumerate the possible options available when locating a record in the dataset.

See also

TDataset.Locate | Locate a record based on some key values
TLocateOptions | Options to use when locating a record in a dataset


TLocateOptions

Options to use when locating a record in a dataset

Declaration

Source position: db.pas line 1278

type TLocateOptions = set of (
loCaseInsensitive, | Perform a case-insensitive search
loPartialKey | Accept partial key matches
);

Description

TLocateOptions is used in the TDataset.Locate call: It should contain the actual options to use when locating a record in the dataset.

See also

TDataset.Locate | Locate a record based on some key values
TLocateOption | Available options when locating a record in a dataset


TLoginEvent

Login event handler

Declaration

Source position: db.pas line 1853

type TLoginEvent = procedure(

  Sender: TObject;

  Username: ;

  Password:

) of object;

Arguments

Sender | TCustomConnection that is attempting a login
Username | Username used to log in
Password | Password used to log in.

Description

TLoginEvent is the prototype for a the the TCustomConnection.OnLogin event handler. It gets passed the TCustomConnection instance that is trying to login, and the initial username and password.

See also

TCustomConnection.OnLogin

Event triggered when a login prompt is shown.


TParamType

Parameter type

Declaration

Source position: db.pas line 1108

type TParamType = (
ptUnknown, | Unknown type
ptInput, | Input parameter
ptOutput, | Output paramete, filled on result
ptInputOutput, | Input/output parameter
ptResult | Result parameter
);

Description

TParamType indicates the kind of parameter represented by a TParam instance. it has one of the following values:

ptUnknown
Unknown type
ptInput
Input parameter
ptOutput
Output paramete, filled on result
ptInputOutput
Input/output parameter
ptResult
Result parameter

See also

TParam | Parameter description class
TParam.ParamType | Type of parameter


TParamTypes

Set of TParamType

Declaration

Source position: db.pas line 1109

type TParamTypes = set of (
ptUnknown, | Unknown type
ptInput, | Input parameter
ptOutput, | Output paramete, filled on result
ptInputOutput, | Input/output parameter
ptResult | Result parameter
);

Description

TParamTypes is defined for completeness: a set of TParamType values.

See also

TParam.ParamType | Type of parameter
TParamType | Parameter type


TProviderFlag

What to odo with fields when applying updates

Declaration

Source position: db.pas line 64

type TProviderFlag = (
pfInUpdate, | Changes to the field should be propagated to the database.
pfInWhere, | Field should be used in the WHERE clause of an update statement in case of upWhereChanged.
pfInKey, | Field is a key field and used in the WHERE clause of an update statement
pfHidden |
);

Description

TProviderFlag describes how the field should be used when applying updates from a dataset to the database. Each field of a TDataset has one or more of these flags.

See also

TProviderFlags

Set of TProviderFlag flags


TProviderFlags

Set of TProviderFlag flags

Declaration

Source position: db.pas line 65

type TProviderFlags = set of (
pfInUpdate, | Changes to the field should be propagated to the database.
pfInWhere, | Field should be used in the WHERE clause of an update statement in case of upWhereChanged.
pfInKey, | Field is a key field and used in the WHERE clause of an update statement
pfHidden |
);

Description

TProviderFlags is used for the TField.ProviderFlags property to describe the role of the field when applying updates to a database.

See also

TField.ProviderFlags

Flags for provider or update support


TPSCommandType

Declaration

Source position: db.pas line 1298

type TPSCommandType = (

  ctUnknown,

  ctQuery,

  ctTable,

  ctStoredProc,

  ctSelect,

  ctInsert,

  ctUpdate,

  ctDelete,

  ctDDL

);


TRecordBuffer

Declaration

Source position: db.pas line 1259

type TRecordBuffer = PAnsiChar;


TRecordBufferBaseType

Declaration

Source position: db.pas line 1258

type TRecordBufferBaseType = AnsiChar;


TResolverResponse

Resolver response code

Declaration

Source position: db.pas line 62

type TResolverResponse = (
rrSkip, | Skip the current update, leave it in the change log
rrAbort, | Abor the whole update process
rrMerge, | Merge the update with existing changes on the server
rrApply, | Replace the update with new values applied by the event handler
rrIgnore | Ignore the error and remove update from change log
);

Description

TResolverResponse is used to indicate what should happen to a pending change that could not be resolved. It is used in callbacks.


TResyncMode

Internal flag for resynchronisiation

Declaration

Source position: db.pas line 1268

type TResyncMode = set of (
rmExact, | Reposition at exact the same location in the buffer
rmCenter | Try to position the cursor in the middle of the buffer
);

Description

TResyncMode is used internally by various TDataset navigation and data manipulation methods such as the TDataset.Refresh method when they need to reset the cursor position in the dataset's buffer.

See also

TDataset

Base class for records-based data-access


TUpdateAction

Action to perform when an update operation fails

Declaration

Source position: db.pas line 1272

type TUpdateAction = (
uaFail, | Update operation should fail
uaAbort, | The whole update operation should abort
uaSkip, | The update of the current record should be skipped. (but not discarded)
uaRetry, | Retry the update operation
uaApplied | Consider the update as applied
);

Description

TUpdateAction indicates what action must be taken in case the applying of updates on the underlying database fails. This type is not used in the TDataset class, but is defined on behalf of TDataset descendents that implement caching of updates: It indicates what should be done when the (delayed) applying of the updates fails. This event occurs long after the actual post or delete operation.

See also

TDataAction

Action to take when a data manipulation operation has failed.


TUpdateKind

Kind of update operation

Declaration

Source position: db.pas line 1274

type TUpdateKind = (
ukModify, | Modify an existing record in the database.
ukInsert, | insert a new record in the database.
ukDelete | Delete a record in the database.
);

Description

TUpdateKind indicates what kind of update operation is in progress when applying updates.

See also

TUpdateAction | Action to perform when an update operation fails
TDataAction | Action to take when a data manipulation operation has failed.


TUpdateMode

Update mode

Declaration

Source position: db.pas line 61

type TUpdateMode = (
upWhereAll, | Use all old field values
upWhereChanged, | Use only old field values of modified fields
upWhereKeyOnly | Only use key fields in the where clause.
);

Description

TUpdateMode determines how the WHERE clause of update queries for SQL databases should be constructed.


TUpdateStatus

Record update status

Declaration

Source position: db.pas line 58

type TUpdateStatus = (
usUnmodified, | Record is unmodified
usModified, | Record exists in the database but is locally modified
usInserted, | Record does not yet exist in the database, but is locally inserted
usDeleted | Record exists in the database, but is locally deleted.
);

Description

TUpdateStatus determines the current state of the record buffer, if updates have not yet been applied to the database.

See also

TDataset.UpdateStatus

Get the update status for the current record


TUpdateStatusSet

Set of update states

Declaration

Source position: db.pas line 59

type TUpdateStatusSet = set of (
usUnmodified, | Record is unmodified
usModified, | Record exists in the database but is locally modified
usInserted, | Record does not yet exist in the database, but is locally inserted
usDeleted | Record exists in the database, but is locally deleted.
);

Description

TUpdateStatusSet is a set of TUpdateStatus values.


YesNoChars

Array of characters mapping a boolean to Y/N

Declaration

Source position: db.pas line 34

const YesNoChars: array [Boolean] of Char = ('N', 'Y');


Writing a debug server

Writing a debug server is relatively easy. It should instantiate a TSimpleIPCServer class from the SimpleIPC unit, and use the DebugServerID as ServerID identification. This constant, as well as the record containing the message which is sent between client and server is defined in the msgintf unit.

The dbugintf unit relies on the SimpleIPC mechanism to communicate with the debug server, hence it works on all platforms that have a functional version of that unit. It also uses TProcess to start the debug server if needed, so the process unit should also be functional.


Reference for unit 'dbugintf'

Unit to send commands to a debug server process

Overview

Use dbugintf to add debug messages to your application. The messages are not sent to standard output, but are sent to a debug server process which collects messages from various clients and displays them somehow on screen.

The unit is transparant in its use: it does not need initialization, it will start the debug server by itself if it can find it: the program should be called debugserver and should be in the PATH. When the first debug message is sent, the unit will initialize itself.

The FCL contains a sample debug server (dbugsvr) which can be started in advance, and which writes debug message to the console (both on Windows and Linux). The Lazarus project contains a visual application which displays the messages in a GUI.

The dbugintf unit relies on the SimpleIPC mechanism to communicate with the debug server, hence it works on all platforms that have a functional version of that unit. It also uses TProcess to start the debug server if needed, so the process unit should also be functional.

Related topics

debugservers

Writing a debug server


Reference for unit 'dbugintf': Resource strings

SProcessID
'Process %s'

SEntering
'> Entering '

SExiting
'< Exiting '

SSeparator
'>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<'

SServerStartFailed
'Failed to start debugserver. (%s)'


Reference for unit 'dbugintf': Constants

SendError

Last error in the debug system.


[Overview][Resource strings][Constants][Types][Procedures and functions][Index] Reference for unit 'dbugintf' (#fcl)

Reference for unit 'dbugintf': Types

TDebugLevel

Level of the message.


Reference for unit 'dbugintf': Procedures and functions

GetDebuggingEnabled | Check if sending of debug messages is enabled.
InitDebugClient | Initialize the debug client.
SendBoolean | Send the value of a boolean variable
SendDateTime | Send the value of a TDateTime variable.
SendDebug | Send a message to the debug server.
SendDebugEx | Send debug message other than informational messages
SendDebugFmt | Format and send a debug message
SendDebugFmtEx | Format and send message with alternate type
SendInteger | Send the value of an integer variable.
SendMethodEnter | Send method enter message
SendMethodExit | Send method exit message
SendPointer | Send the value of a pointer variable.
SendSeparator | Send a separator message
SetDebuggingEnabled | Temporary enables or disables debugging
StartDebugServer | Start the debug server


Index of all identifiers in unit 'dbugintf'

D G I S T

D

dlError dlInformation dlWarning

G

GetDebuggingEnabled

I

InitDebugClient

S

SendBoolean | SendInteger | SExiting
SendDateTime | SendMethodEnter | SProcessID
SendDebug | SendMethodExit | SSeparator
SendDebugEx | SendPointer | SServerStartFailed
SendDebugFmt | SendSeparator | StartDebugServer
SendDebugFmtEx | SEntering |
SendError | SetDebuggingEnabled |

T

TDebugLevel


SendError

Last error in the debug system.

Declaration

Source position: dbugintf.pp line 46

const SendError: = '';

Description

Whenever a call encounteres an exception, the exception message is stored in this variable.


TDebugLevel

Level of the message.

Declaration

Source position: dbugintf.pp line 23

type TDebugLevel = (
dlInformation, | Informational message
dlWarning, | Warning message
dlError | Error message
);

Description

TDebugLevel indicates the severity level of the debug message to be sent. By default, an informational message is sent.

See also

SendDebugFmtEx | Format and send message with alternate type
SendDebugEx | Send debug message other than informational messages


DebugServerID

System unique name

Declaration

Source position: dbugmsg.pp line 25

const DebugServerID: = 'fpcdebugserver';

Description

DebugServerID is a string which is used when creating the message protocol, it is used when identifying the server in the (platform dependent) client-server protocol.


Reference for unit 'dbugmsg'

Auxiliary unit for the dbugintf unit.

uses

  System,

  Classes;

Overview

dbugmsg is an auxialiary unit used in the dbugintf unit. It defines the message protocol used between the debug unit and the debug server.


Reference for unit 'dbugmsg': Constants

DebugServerID | System unique name
lctError | Error message
lctIdentify | Identification message
lctInformation | Informational message
lctStop | Stop message
lctWarning | Warning message


Reference for unit 'dbugmsg': Types

TDebugMessage

Structure describing a message


Reference for unit 'dbugmsg': Procedures and functions

DebugMessageName | Return the name of the debug message
ReadDebugMessageFromStream | Read a message from stream
WriteDebugMessageToStream | Write a message to stream


Index of all identifiers in unit 'dbugmsg'

D L R T W

D

DebugMessageName DebugServerID

L

lctError | lctInformation | lctWarning
lctIdentify | lctStop |

R

ReadDebugMessageFromStream

T

TDebugMessage

W

WriteDebugMessageToStream


lctError

Error message

Declaration

Source position: dbugmsg.pp line 30

const lctError = 2;

Description

lctError is the identification of error messages.


lctIdentify

Identification message

Declaration

Source position: dbugmsg.pp line 31

const lctIdentify = 3;

Description

lctIdentify is sent by the client to a server when it first connects. It's the first message, and contains the name of client application.


lctInformation

Informational message

Declaration

Source position: dbugmsg.pp line 28

const lctInformation = 0;

Description

lctInformation is the identification of informational messages.


lctStop

Stop message

Declaration

Source position: dbugmsg.pp line 27

const lctStop = -1;

Description

lctStop is sent by the client to a server when it disconnects.


lctWarning

Warning message

Declaration

Source position: dbugmsg.pp line 29

const lctWarning = 1;

Description

lctWarning is the identification of warning messages.


TDebugMessage

Structure describing a message

Declaration

Source position: dbugmsg.pp line 34

type TDebugMessage = record
MsgType: Integer; | Constant, identifying the type of message
MsgTimeStamp: TDateTime; | Time when the message was generated
Msg: ; | String containing the message text.
end;

Description

TDebugMessage is a record that describes the message passed from the client to the server. It should not be passed directly in shared memory, as the string containing the message is allocated on the heap. Instead, the WriteDebugMessageToStream and ReadDebugMessageFromStream can be used to read or write the message from/to a stream.

See also

ReadDebugMessageFromStream | Read a message from stream
WriteDebugMessageToStream | Write a message to stream


Reference for unit 'eventlog'

Unit implementing system log class

uses

  System,

  sysutils,

  Classes;

Overview

The EventLog unit implements the TEventLog component, which is a component that can be used to send log messages to the system log (if it is available) or to a file.


Reference for unit 'eventlog': Resource strings

SLogInfo
'Info'

SLogWarning
'Warning'

SLogError
'Error'

SLogDebug
'Debug'

SLogCustom
'Custom (%d)'

SErrLogFailedMsg
'Failed to log entry (Error: %s)'


Reference for unit 'eventlog': Types

TLogCategoryEvent | Callback type to return custom category code
TLogCodeEvent | Callback type to retrieve custom event codes
TLogType | Type of log


Reference for unit 'eventlog': Classes

ELogError | Exception raised on errors in the TEventLog component
TEventLog | Event logging class


Index of all identifiers in unit 'eventlog'

E L S T

E

ELogError

L

ltFile ltSystem

S

SErrLogFailedMsg | SLogDebug | SLogInfo
SLogCustom | SLogError | SLogWarning

T

TEventLog | TLogCodeEvent
TLogCategoryEvent | TLogType


TLogCategoryEvent

Callback type to return custom category code

Declaration

Source position: eventlog.pp line 28

type TLogCategoryEvent = procedure(

  Sender: TObject;

  var Code: Word

) of object;

Arguments

Sender | TEventLog instance that triggered the event
Code | OS category code

Description

TLogCategoryEvent is the event type for the TEventLog.OnGetCustomCategory event handler. It should return a OS event catagory code for the etCustom log event type in the Code parameter.

See also

TEventLog.OnGetCustomCategory | Event to retrieve custom message category
TLogCodeEvent | Callback type to retrieve custom event codes


TLogCodeEvent

Callback type to retrieve custom event codes

Declaration

Source position: eventlog.pp line 27

type TLogCodeEvent = procedure(

  Sender: TObject;

  var Code: DWord

) of object;

Arguments

Sender | TEventLog instance that triggered the event
Code | Code to return

Description

TLogCodeEvent is the event type for the OnGetCustomEvent and OnGetCustomEventID event handlers. It should return a OS system log code for the etCustom log event or event ID type in the Code parameter.

See also

TEventLog.OnGetCustomEvent | Event to retrieve custom event Code
TEventLog.OnGetCustomEventID | Event to retrieve custom event ID
TLogCategoryEvent | Callback type to return custom category code


TLogType

Type of log

Declaration

Source position: eventlog.pp line 26

type TLogType = (
ltSystem, | Use the system log
ltFile | Write to file
);

Description

TLogType determines where the log messages are written. It is the type of the TEventLog.LogType property. It can have 2 values:

ltFile
This is used to write all messages to file. if no system logging mechanism exists, this is used as a fallback mechanism.
ltSystem
This is used to send all messages to the system log mechanism. Which log mechanism this is, depends on the operating system.

See also

TEventLog.LogType

Log type


hexTable

Integer to hex code conversion table

Declaration

Source position: ezcgi.pp line 23

const hexTable = '0123456789ABCDEF';

Description

String constant used to convert a number to a hexadecimal code or back.


Reference for unit 'ezcgi'

Easy CGI unit

uses

  System,

  Classes,

  sysutils;

Overview

ezcgi, written by Michael Hess, provides a single class which offers simple access to the CGI environment which a CGI program operates under. It supports both GET and POST methods. It's intended for simple CGI programs which do not need full-blown CGI support. File uploads are not supported by this component.

To use the unit, a descendent of the TEZCGI class should be created and the DoPost or DoGet methods should be overidden.


Reference for unit 'ezcgi': Constants

hexTable

Integer to hex code conversion table


Reference for unit 'ezcgi': Classes

ECGIException | Exception raised by TEZcgi
TEZcgi | Easy CGI class


Index of all identifiers in unit 'ezcgi'

E H T

E

ECGIException

H

hexTable

T

TEZcgi


DefaultTimerDriverClass

Actual timer class to be used

Declaration

Source position: fptimer.pp line 85

var DefaultTimerDriverClass: TFPTimerDriverClass = nil;

Description

DefaultTimerDriverClass contains the TFPTimerDriver class pointer that should be used when a new instance of TFPCustomTimer is created. It is by default set to the system timer class.

Setting this class pointer to another descendent of TFPTimerDriver allows to customize the default timer implementation used in the entire application.

See also

TFPTimerDriver | Abstract driver class
TFPCustomTimer | Custom timer class


Reference for unit 'fpTimer'

Timer class

uses

  System,

  Classes;

Overview

The fpTimer unit implements a timer class TFPTimer which can be used on all supported platforms. The timer class uses a driver class TFPTimerDriver which does the actual work.

A default timer driver class is implemented on all platforms. It will work in GUI and non-gui applications, but only in the application's main thread.

An alternative driver class can be used by setting the DefaultTimerDriverClass variable to the class pointer of the driver class. The driver class should descend from TFPTimerDriver.


Reference for unit 'fpTimer': Types

TFPTimerDriverClass

Class of TFPTimerDriver


Reference for unit 'fpTimer': Classes

TFPCustomTimer | Custom timer class
TFPTimer | Timer class with published properties
TFPTimerDriver | Abstract driver class


Reference for unit 'fpTimer': Variables

DefaultTimerDriverClass

Actual timer class to be used


Index of all identifiers in unit 'fpTimer'

D T

D

DefaultTimerDriverClass

T

TFPCustomTimer | TFPTimerDriver
TFPTimer | TFPTimerDriverClass


Reference for unit 'gettext'

Unit implementing resource string translation using gettext files

uses

  System,

  sysutils,

  Classes;

Overview

The gettext unit can be used to hook into the resource string mechanism of Free Pascal to provide translations of the resource strings, based on the GNU gettext mechanism. The unit provides a class (TMOFile) to read the .mo files with localizations for various languages. It also provides a couple of calls to translate all resource strings in an application based on the translations in a .mo file.


Reference for unit 'gettext': Constants

MOFileHeaderMagic

file header bytes indicating a .mo file.


Reference for unit 'gettext': Types

PLongWordArray | Pointer to a TLongWordArray array.
PMOStringTable | Pointer to a TMOStringTable array.
PPCharArray | Pointer to a TPCharArray array.
TLongWordArray | Array of longword elements.
TMOFileHeader | Structure found at the head of a .mo file.
TMOStringInfo | Structure describing string
TMOStringTable | Array of TMOStringInfo records.
TPCharArray | Array of PChar elements


Reference for unit 'gettext': Classes

EMOFileError | Exception raised in case of an error.
TMOFile | Class providing access to a .mo file.


Reference for unit 'gettext': Procedures and functions

GetLanguageIDs | Return the current language IDs
TranslateResourceStrings | Translate the resource strings of the application.
TranslateUnitResourceStrings | Translate the resource strings of a unit.


Index of all identifiers in unit 'gettext'

E G M P T

E

EMOFileError

G

GetLanguageIDs

M

MOFileHeaderMagic

P

PLongWordArray PMOStringTable PPCharArray

T

TLongWordArray | TMOStringInfo | TranslateResourceStrings
TMOFile | TMOStringTable | TranslateUnitResourceStrings
TMOFileHeader | TPCharArray |


MOFileHeaderMagic

file header bytes indicating a .mo file.

Declaration

Source position: gettext.pp line 26

const MOFileHeaderMagic = $950412de;

Description

This constant is found as the first integer in a .mo

See also

TMOFileHeader

Structure found at the head of a .mo file.


PLongWordArray

Pointer to a TLongWordArray array.

Declaration

Source position: gettext.pp line 49

type PLongWordArray = ^TLongWordArray;


PMOStringTable

Pointer to a TMOStringTable array.

Declaration

Source position: gettext.pp line 45

type PMOStringTable = ^TMOStringTable;


PPCharArray

Pointer to a TPCharArray array.

Declaration

Source position: gettext.pp line 52

type PPCharArray = ^TPCharArray;


TLongWordArray

Array of longword elements.

Declaration

Source position: gettext.pp line 48

type TLongWordArray = array [0..(1shl30)divSizeOf(LongWord)] of LongWord;

Description

TLongWordArray is an array used to define the PLongWordArray pointer. A variable of type TLongWordArray should never be directly declared, as it would occupy too much memory. The PLongWordArray type can be used to allocate a dynamic number of elements.

See also

PLongWordArray

Pointer to a TLongWordArray array.


TMOStringInfo

Structure describing string

Declaration

Source position: gettext.pp line 39

type TMOStringInfo = packed record
length: LongWord; | Length of the string
offset: LongWord; | Offset in the file
end;

Description

This record is one element in the string tables describing the original and translated strings. It describes the position and length of the string. The location of these tables is stored in the TMOFileHeader record at the start of the file.

See also

TMOFileHeader

Structure found at the head of a .mo file.


TMOStringTable

Array of TMOStringInfo records.

Declaration

Source position: gettext.pp line 44

type TMOStringTable = array [0..(1shl30)divSizeOf(TMOStringInfo)] of TMOStringInfo;

Description

TMOStringTable is an array type containing TMOStringInfo records. It should never be used directly, as it would occupy too much memory.

See also

PMOStringTable

Pointer to a TMOStringTable array.


TPCharArray

Array of PChar elements

Declaration

Source position: gettext.pp line 51

type TPCharArray = array [0..(1shl30)divSizeOf(PChar)] of PChar;

Description

TLongWordArray is an array used to define the PPCharArray pointer. A variable of type TPCharArray should never be directly declared, as it would occupy too much memory. The PPCharArray type can be used to allocate a dynamic number of elements.

See also

PPCharArray

Pointer to a TPCharArray array.


DEFDIALECT

Default Interbase/Firebird dialect

Declaration

Source position: ibconnection.pp line 18

const DEFDIALECT = 3;

Description

Default dialect that will be used when connecting to databases. See Dialect for more details on dialects.

See also

TIBConnection.Dialect

Database dialect


Reference for unit 'IBConnection'

Firebird/Interbase database connection unit

uses

  System,

  Classes,

  sysutils,

  sqldb,

  db,

Database access layer

  dbconst,

  bufdataset,

  ibase60dyn;


Reference for unit 'IBConnection': Constants

DEFDIALECT

Default Interbase/Firebird dialect

MAXBLOBSEGMENTSIZE


Reference for unit 'IBConnection': Classes

EIBDatabaseError | Firebird/Interbase database error
TIBConnection | TIBConnection: Firebird/Interbase specific TSQLConnection
TIBConnectionDef | Describes TIBConnection class
TIBCursor | Firebird/Interbase cursor
TIBTrans | Firebird/Interbase transaction


Index of all identifiers in unit 'IBConnection'

D E M T

D

DEFDIALECT

E

EIBDatabaseError

M

MAXBLOBSEGMENTSIZE

T

TIBConnection | TIBCursor
TIBConnectionDef | TIBTrans


MAXBLOBSEGMENTSIZE

Declaration

Source position: ibconnection.pp line 19

const MAXBLOBSEGMENTSIZE = 65535;


IDEABLOCKSIZE

IDEA block size

Declaration

Source position: idea.pp line 53

const IDEABLOCKSIZE = 8;

See also

IDEAKEYSIZE

IDEA Key size constant.


IdeaCryptData

Alias for for TIDEACryptData

Declaration

Source position: idea.pp line 65

type IdeaCryptData = TIdeaCryptData;

Description

Provided for backward functionality.

See also

TIDEACryptData

Buffer type to hold encryption data.


IdeaCryptKey

Alias for for TIDEACryptKey

Declaration

Source position: idea.pp line 64

type IdeaCryptKey = TIdeaCryptKey;

Description

Provided for backward functionality.

See also

TIDEACryptKey

Type for holding an encyption/decryption IDEA key.


IDEAkey

Alias for TIDEAKey

Declaration

Source position: idea.pp line 63

type IDEAkey = TIDEAKey;

Description

Provided for backward functionality.

See also

TIDEAKey

Type for holding a user IDEA key


IDEAKEYSIZE

IDEA Key size constant.

Declaration

Source position: idea.pp line 52

const IDEAKEYSIZE = 16;

See also

IDEABLOCKSIZE

IDEA block size


Reference for unit 'idea'

The IDEA unit provides IDEA encryption support

uses

  System,

  sysutils,

  Classes;

Overview

Besides some low level IDEA encryption routines, the IDEA unit also offers 2 streams which offer on-the-fly encryption or decryption: there are 2 stream objects: A write-only encryption stream which encrypts anything that is written to it, and a decription stream which decrypts anything that is read from it.


Reference for unit 'idea': Constants

IDEABLOCKSIZE | IDEA block size
IDEAKEYSIZE | IDEA Key size constant.
KEYLEN | Key length
ROUNDS | Number of rounds to encrypt


Reference for unit 'idea': Types

IdeaCryptData | Alias for for TIDEACryptData
IdeaCryptKey | Alias for for TIDEACryptKey
IDEAkey | Alias for TIDEAKey
TIdeaCryptData | Buffer type to hold encryption data.
TIdeaCryptKey | Type for holding an encyption/decryption IDEA key.
TIDEAKey | Type for holding a user IDEA key


Reference for unit 'idea': Classes

EIDEAError | Exception for IDEA Stream errors.
TIDEADeCryptStream | IDEA Decryption stream.
TIDEAEncryptStream | IDEA encryption stream.
TIDEAStream | Ancestor stream for IDEA encryption/decryption streams.


Reference for unit 'idea': Procedures and functions

CipherIdea | Encrypt or decrypt a buffer.
DeKeyIdea | Create a decryption key from an encryption key.
EnKeyIdea | Create an IDEA encryption key from a user key.


Index of all identifiers in unit 'idea'

C D E I K R T

C

CipherIdea

D

DeKeyIdea

E

EIDEAError EnKeyIdea

I

IDEABLOCKSIZE | IdeaCryptKey | IDEAKEYSIZE
IdeaCryptData | IDEAkey |

K

KEYLEN

R

ROUNDS

T

TIdeaCryptData | TIDEADeCryptStream | TIDEAKey
TIdeaCryptKey | TIDEAEncryptStream | TIDEAStream


KEYLEN

Key length

Declaration

Source position: idea.pp line 55

const KEYLEN = 6 * ROUNDS + 4;

See also

IDEAKEYSIZE | IDEA Key size constant.
IDEABLOCKSIZE | IDEA block size
ROUNDS | Number of rounds to encrypt


ROUNDS

Number of rounds to encrypt

Declaration

Source position: idea.pp line 54

const ROUNDS = 8;


TIdeaCryptData

Buffer type to hold encryption data.

Declaration

Source position: idea.pp line 60

type TIdeaCryptData = array [0..3] of Word;

Description

TIdeaCryptData is an internal type, defined to hold data for encryption/decryption.

See also

TIdeaCryptKey | Type for holding an encyption/decryption IDEA key.
TIDEAKey | Type for holding a user IDEA key


TIdeaCryptKey

Type for holding an encyption/decryption IDEA key.

Declaration

Source position: idea.pp line 59

type TIdeaCryptKey = array [0..7] of Word;

Description

The actual encryption or decryption key for IDEA is 64-bit long. This type is used to hold such a key. It can be generated with the EnKeyIDEA or DeKeyIDEA algorithms depending on whether an encryption or decryption key is needed.

See also

EnKeyIDEA | Create an IDEA encryption key from a user key.
DeKeyIDEA | Create a decryption key from an encryption key.


TIDEAKey

Type for holding a user IDEA key

Declaration

Source position: idea.pp line 58

type TIDEAKey = array [0..keylen-1] of Word;

Description

The IDEA key should be filled by the user with some random data (say, a passphrase). This key is used to generate the actual encryption/decryption keys.

See also

TIdeaCryptKey | Type for holding an encyption/decryption IDEA key.
TIdeaCryptData | Buffer type to hold encryption data.


Reference for unit 'inicol'

Collection which can write itself to inifile.

uses

  System,

  sysutils,

  Classes,

  IniFiles;

Ini files support

Overview

inicol contains an implementation of TCollection and TCollectionItem descendents which cooperate to read and write the collection from and to a .ini file. It uses the TCustomIniFile class for this.


Reference for unit 'inicol': Constants

KeyCount | Name used for the count item
SGlobal | Default global section name


Reference for unit 'inicol': Classes

EIniCol | Exception used for error reporting.
TIniCollection | Collection which can write itself to an .ini file
TIniCollectionItem | Collection item with support for loading/saving from/to ini file
TNamedIniCollection | Collection of named collection items
TNamedIniCollectionItem | TIniCollectionItem with a name property


Index of all identifiers in unit 'inicol'

E K S T

E

EIniCol

K

KeyCount

S

SGlobal

T

TIniCollection | TNamedIniCollection
TIniCollectionItem | TNamedIniCollectionItem


KeyCount

Name used for the count item

Declaration

Source position: inicol.pp line 79

const KeyCount = 'Count';

Description

KeyCount is used as a key name when reading or writing the number of items in the collection from the global section.


SGlobal

Default global section name

Declaration

Source position: inicol.pp line 80

const SGlobal = 'Global';

Description

SGlobal is used as the default name of the global section when reading or writing the collection.


Reference for unit 'IniFiles'

Ini files support

uses

  System,

  Classes,

  sysutils,

  contnrs;

Various general purpose classes: stack, queue, objectlists

Overview

IniFiles provides support for handling .ini files. It contains an implementation completely independent of the Windows API for handling such files. The basic (abstract) functionality is defined in TCustomInifile and is implemented in TIniFile and TMemIniFile. The API presented by these components is Delphi compatible.


Reference for unit 'IniFiles': Classes

TCustomIniFile | Abstract ini file object
THashedStringList | String list with support for has values
TIniFile | Ini file implementation
TIniFileKey | Object representing a key=value pair in the ini file.
TIniFileKeyList | Key list object
TIniFileSection | Ini file section object
TIniFileSectionList | Section objects list
TMemIniFile | Inifile cached in memory


Index of all identifiers in unit 'IniFiles'

T

T

TCustomIniFile | TIniFileKey | TIniFileSectionList
THashedStringList | TIniFileKeyList | TMemIniFile
TIniFile | TIniFileSection |


Reference for unit 'iostream'

Implement streams for handling standard input, output and stderr

uses

  System,

  Classes;

Overview

The iostream implements a descendent of THandleStream streams that can be used to read from standard input and write to standard output and standard diagnostic output (stderr).


Reference for unit 'iostream': Types

TIOSType

Type of stream to create


Reference for unit 'iostream': Classes

EIOStreamError | Error thrown in case of an invalid operation on a TIOStream.
TIOStream | Stream which handles standard input/output and stderr.


Index of all identifiers in unit 'iostream'

E I T

E

EIOStreamError

I

iosError iosInput iosOutPut

T

TIOStream TIOSType


TIOSType

Type of stream to create

Declaration

Source position: iostream.pp line 22

type TIOSType = (
iosInput, | The stream can be used to read from standard input
iosOutPut, | The stream can be used to write to standard output
iosError | The stream can be used to write to standard diagnostic output
);

Description

TIOSType is passed to the Create constructor of TIOStream, it determines what kind of stream is created.

See also

TIOStream

Stream which handles standard input/output and stderr.


ALL_PERMISSIONS

Set with all permissions

Declaration

Source position: libtar.pp line 221

const ALL_PERMISSIONS = [tpReadByOwner, tpWriteByOwner, tpExecuteByOwner, tpReadByGroup, tpWriteByGroup, tpExecuteByGroup, tpReadByOther, tpWriteByOther, tpExecuteByOther];

Description

ALL_PERMISSIONS is a set constant containing all possible permissions (read/write/execute, for all groups of users) for an archive entry.

See also

TTarPermissions | Complete set of permissions for file
READ_PERMISSIONS | Set with all read permissions
WRITE_PERMISSIONS | Set with all write permissions
EXECUTE_PERMISSIONS | Set with all execute permissions


EXECUTE_PERMISSIONS

Set with all execute permissions

Declaration

Source position: libtar.pp line 226

const EXECUTE_PERMISSIONS = [tpExecuteByOwner, tpExecuteByGroup, tpExecuteByOther];

Description

WRITE_PERMISSIONS is a set constant containing all possible execute permissions set for an archive entry.

See also

TTarPermissions | Complete set of permissions for file
ALL_PERMISSIONS | Set with all permissions
READ_PERMISSIONS | Set with all read permissions
WRITE_PERMISSIONS | Set with all write permissions


FILETYPE_NAME

Names of filetypes

Declaration

Source position: libtar.pp line 217

const FILETYPE_NAME: array [TFileType] of = ('Regular', 'Link', 'Symbolic Link', 'Char File', 'Block File', 'Directory', 'FIFO File', 'Contiguous', 'Dir Dump', 'Multivol', 'Volume Header');

Description

FILETYPE_NAME can be used to get a textual description for each of the possible entry file types.

See also

TFileType

File type


Reference for unit 'libtar'

tar archive manipulation classes

uses

  System,

  UnixType,

  BaseUnix,

  Unix,

  Windows,

  sysutils,

  Classes;

Overview

The libtar units provides 2 classes to read and write .tar archives: TTarArchive class can be used to read a tar file, and the TTarWriter class can be used to write a tar file. The unit was implemented originally by Stefan Heymann.


Reference for unit 'libtar': Constants

ALL_PERMISSIONS | Set with all permissions
EXECUTE_PERMISSIONS | Set with all execute permissions
FILETYPE_NAME | Names of filetypes
READ_PERMISSIONS | Set with all read permissions
WRITE_PERMISSIONS | Set with all write permissions


Reference for unit 'libtar': Types

TFileType | File type
TTarDirRec | Tar Directory entry
TTarMode | Tar mode
TTarModes | Full set of modes
TTarPermission | File permissions
TTarPermissions | Complete set of permissions for file


Reference for unit 'libtar': Classes

TTarArchive | Class to examine and read tar archives
TTarWriter | Class to write tar archives


Reference for unit 'libtar': Procedures and functions

ClearDirRec | Initialize tar archive entry
ConvertFilename | Convert filename to archive format
FileTimeGMT | Extract filetime
PermissionString | Convert a set of permissions to a string


Index of all identifiers in unit 'libtar'

A C E F P R T W

A

ALL_PERMISSIONS

C

ClearDirRec ConvertFilename

E

EXECUTE_PERMISSIONS

F

FileTimeGMT | ftDirectory | ftNormal
FILETYPE_NAME | ftDumpDir | ftSymbolicLink
ftBlock | ftFifo | ftVolumeHeader
ftCharacter | ftLink |
ftContiguous | ftMultiVolume |

P

PermissionString

R

READ_PERMISSIONS

T

TFileType | tpReadByGroup | TTarDirRec
tmSaveText | tpReadByOther | TTarMode
tmSetGid | tpReadByOwner | TTarModes
tmSetUid | tpWriteByGroup | TTarPermission
tpExecuteByGroup | tpWriteByOther | TTarPermissions
tpExecuteByOther | tpWriteByOwner | TTarWriter
tpExecuteByOwner | TTarArchive |

W

WRITE_PERMISSIONS


READ_PERMISSIONS

Set with all read permissions

Declaration

Source position: libtar.pp line 224

const READ_PERMISSIONS = [tpReadByOwner, tpReadByGroup, tpReadByOther];

Description

READ_PERMISSIONS is a set constant containing all possible read permissions set for an archive entry.

See also

TTarPermissions | Complete set of permissions for file
ALL_PERMISSIONS | Set with all permissions
WRITE_PERMISSIONS | Set with all write permissions
EXECUTE_PERMISSIONS | Set with all execute permissions


TFileType

File type

Declaration

Source position: libtar.pp line 120

type TFileType = (
ftNormal, | Normal file
ftLink, | Hard link
ftSymbolicLink, | Symbolic link
ftCharacter, | Character device file
ftBlock, | Block device file
ftDirectory, | Directory
ftFifo, | FIFO file
ftContiguous, | Contiguous file
ftDumpDir, | List of files
ftMultiVolume, | Multi-volume file part
ftVolumeHeader | Volume header, can appear only as first entry in the archive
);

Description

TFileType describes the file type of a file in the archive. It is used in the FileType field of the TTarDirRec record.

See also

TTarDirRec | Tar Directory entry
TTarPermissions | Complete set of permissions for file
TTarModes | Full set of modes


TTarDirRec

Tar Directory entry

Declaration

Source position: libtar.pp line 138

type TTarDirRec = record
Name: AnsiString; | File name
Size: Int64; | File size
DateTime: TDateTime; | File time stamp
Permissions: TTarPermissions; | File permissions
FileType: TFileType; | File type
LinkName: AnsiString; | Symbolic link target name
UID: Integer; | Owner user ID
GID: Integer; | Owner group ID
UserName: AnsiString; | Owner username
GroupName: AnsiString; | Owner group name
ChecksumOK: Boolean; | Checksum OK ?
Mode: TTarModes; | Extra file mode bits
Magic: AnsiString; | ?
MajorDevNo: Integer; | Major device number
MinorDevNo: Integer; | Minor device number
FilePos: Int64; | Start position of file in archive
end;

Description

TTarDirRec describes an entry in the tar archive. It is similar to a directory entry as in TSearchRec, and is returned by the TTarArchive.FindNext call.

See also

TTarArchive.FindNext

Find next archive entry


TTarMode

Tar mode

Declaration

Source position: libtar.pp line 133

type TTarMode = (
tmSetUid, | File has SetUID bit set.
tmSetGid, | File has SetGID bit set
tmSaveText | Bit $200 is set
);

Description

TTarMode describes extra file modes. It is used in the Mode field of the TTarDirRec record.

See also

TTarDirRec | Tar Directory entry
TTarPermission | File permissions
TTarPermissions | Complete set of permissions for file
TTarModes | Full set of modes


TTarModes

Full set of modes

Declaration

Source position: libtar.pp line 134

type TTarModes = set of (
tmSetUid, | File has SetUID bit set.
tmSetGid, | File has SetGID bit set
tmSaveText | Bit $200 is set
);

Description

TTarModes denotes the full set of permission bits for the file in the field Mode field of the TTarDirRec record.

See also

TTarDirRec

Tar Directory entry


TTarPermission

File permissions

Declaration

Source position: libtar.pp line 114

type TTarPermission = (
tpReadByOwner, | Owner can read the file
tpWriteByOwner, | Owner can write the file
tpExecuteByOwner, | Owner can execute the file
tpReadByGroup, | Group can read the file
tpWriteByGroup, | Group can write the file
tpExecuteByGroup, | Group can execute the file
tpReadByOther, | Other people can read the file.
tpWriteByOther, | Other people can write the file
tpExecuteByOther | Other people can execute the file
);

Description

TTarPermission denotes part of a files permission as it it stored in the .tar archive. Each of these enumerated constants correspond with one of the permission bits from a unix file permission.

See also

TTarPermissions | Complete set of permissions for file
TTarMode | Tar mode
TTarModes | Full set of modes


TTarPermissions

Complete set of permissions for file

Declaration

Source position: libtar.pp line 117

type TTarPermissions = set of (
tpReadByOwner, | Owner can read the file
tpWriteByOwner, | Owner can write the file
tpExecuteByOwner, | Owner can execute the file
tpReadByGroup, | Group can read the file
tpWriteByGroup, | Group can write the file
tpExecuteByGroup, | Group can execute the file
tpReadByOther, | Other people can read the file.
tpWriteByOther, | Other people can write the file
tpExecuteByOther | Other people can execute the file
);

Description

TTarPermissions describes the complete set of permissions that a file has. It is used in the Permissions field of the TTarDirRec record.

See also

TTarDirRec | Tar Directory entry
TFileType | File type
TTarModes | Full set of modes


WRITE_PERMISSIONS

Set with all write permissions

Declaration

Source position: libtar.pp line 225

const WRITE_PERMISSIONS = [tpWriteByOwner, tpWriteByGroup, tpWriteByOther];

Description

WRITE_PERMISSIONS is a set constant containing all possible write permissions set for an archive entry.

See also

TTarPermissions | Complete set of permissions for file
ALL_PERMISSIONS | Set with all permissions
READ_PERMISSIONS | Set with all read permissions
EXECUTE_PERMISSIONS | Set with all execute permissions


DBLibLibraryName

Declaration

Source position: mssqlconn.pp line 152

var DBLibLibraryName: = DBLIBDLL;


Reference for unit 'mssqlconn'

Microsoft SQL Server and Sybase ASE database connectors

uses

  System,

  Classes,

  sysutils,

  sqldb,

  db,

Database access layer

  BufDataset,

  dblib;

Overview

Connector to Microsoft SQL Server databases. Needs FreeTDS dblib library.


Reference for unit 'mssqlconn': Types

TClientCharset


Reference for unit 'mssqlconn': Classes

EMSSQLDatabaseError | Sybase/MS SQL Server specific error
TMSSQLConnection | Microsoft SQL Server database connector
TMSSQLConnectionDef
TSybaseConnection | Sybase ASE database connector
TSybaseConnectionDef


Reference for unit 'mssqlconn': Variables

DBLibLibraryName


Index of all identifiers in unit 'mssqlconn'

C D E T

C

ccISO88591 | ccUnknown
ccNone | ccUTF8

D

DBLibLibraryName

E

EMSSQLDatabaseError

T

TClientCharset | TMSSQLConnectionDef | TSybaseConnectionDef
TMSSQLConnection | TSybaseConnection |


TClientCharset

Declaration

Source position: mssqlconn.pp line 47

type TClientCharset = (

  ccNone,

  ccUTF8,

  ccISO88591,

  ccUnknown

);


ENoSeekMsg

Constant used in EPipeSeek exception.

Declaration

Source position: pipes.pp line 58

const ENoSeekMsg = 'Cannot seek on pipes';


EPipeMsg

Constant used in EPipeCreation exception.

Declaration

Source position: pipes.pp line 57

const EPipeMsg = 'Failed to create pipe.';


Reference for unit 'Pipes'

Unit implementing pipe streams.

uses

  System,

  sysutils,

  Classes;

Overview

The Pipes unit implements streams that are wrappers around the OS's pipe functionality. It creates a pair of streams, and what is written to one stream can be read from another.


Reference for unit 'Pipes': Constants

ENoSeekMsg | Constant used in EPipeSeek exception.
EPipeMsg | Constant used in EPipeCreation exception.


Reference for unit 'Pipes': Classes

EPipeCreation | Exception raised when an error occurred during the creation of a pipe pair.
EPipeError | Exception raised when an invalid operation is performed on a pipe stream.
EPipeSeek | Exception raised when an invalid seek operation is attempted on a pipe.
TInputPipeStream | TStream descendent which wraps the read end of a pipe.
TOutputPipeStream | TStream descendent which wraps the write end of a pipe.


Reference for unit 'Pipes': Procedures and functions

CreatePipeHandles | Function to create a set of pipe handles
CreatePipeStreams | Create a pair of pipe stream.


Index of all identifiers in unit 'Pipes'

C E T

C

CreatePipeHandles CreatePipeStreams

E

ENoSeekMsg | EPipeError | EPipeSeek
EPipeCreation | EPipeMsg |

T

TInputPipeStream TOutputPipeStream


Reference for unit 'pooledmm'

Pooled memory manager implementation

uses

  System,

  Classes;

Overview

pooledmm is a memory manager class which uses pools of blocks. Since it is a higher-level implementation of a memory manager which works on top of the FPC memory manager, It also offers more debugging and analysis tools. It is used mainly in the LCL and Lazarus IDE.


Reference for unit 'pooledmm': Types

PPooledMemManagerItem | Pointer to TPooledMemManagerItem
TEnumItemsMethod | Callback for EnumerateItems.
TPooledMemManagerItem | Item used in a linked list


Reference for unit 'pooledmm': Classes

TNonFreePooledMemManager | Memory manager for fixed memory blocks which does not free any memory
TPooledMemManager | Pooled memory manager


Index of all identifiers in unit 'pooledmm'

P T

P

PPooledMemManagerItem

T

TEnumItemsMethod | TPooledMemManager
TNonFreePooledMemManager | TPooledMemManagerItem


PPooledMemManagerItem

Pointer to TPooledMemManagerItem

Declaration

Source position: pooledmm.pp line 33

type PPooledMemManagerItem = ^TPooledMemManagerItem;

Description

PPooledMemManagerItem is a pointer type, pointing to a TPooledMemManagerItem item, used in a linked list.

See also

TPooledMemManagerItem | Item used in a linked list
TPooledMemManager | Pooled memory manager


TEnumItemsMethod

Callback for EnumerateItems.

Declaration

Source position: pooledmm.pp line 71

type TEnumItemsMethod = procedure(

  Item: Pointer

) of object;

Arguments

Item

Pointer from the list in TNonFreePooledMemManager.

Description

TEnumItemsMethod is a prototype for the callback used in the TNonFreePooledMemManager.EnumerateItems call. The parameter Item will be set to each of the pointers in the item list of TNonFreePooledMemManager.

See also

TNonFreePooledMemManager.EnumerateItems

Enumerate all items in the list


Reference for unit 'process'

Unit implementing the TProcess component.

uses

  System,

  Classes,

  Pipes,

Unit implementing pipe streams.

  sysutils;

Overview

The Process unit contains the code for the TProcess component, a cross-platform component to start and control other programs, offering also access to standard input and output for these programs.

TProcess does not handle wildcard expansion, does not support complex pipelines as in Unix. If this behaviour is desired, the shell can be executed with the pipeline as the command it should execute.


Reference for unit 'process': Types

TProcessForkEvent | Prototype for TProcess.OnForkEvent event handler
TProcessOption | Options to be used when a process is started.
TProcessOptions | Set of TProcessOption.
TProcessPriority | type determining the priority of the newly started process.
TShowWindowOptions | Description of the main window of the new process.
TStartupOption | Options determining how the application is started.
TStartupOptions | Set of TStartUpOption.


Reference for unit 'process': Classes

EProcess | Exception raised when an error occurs in a TProcess routine.
TProcess | Class to start and control other processes.


Reference for unit 'process': Procedures and functions

CommandToList

DetectXTerm

Detect the terminal program.

RunCommand

RunCommandIndir


Reference for unit 'process': Variables

TryTerminals | A list of terminal programs to use (unix only)
XTermProgram | Default XTerm program to use


Index of all identifiers in unit 'process'

C D E P R S T X

C

CommandToList

D

DetectXTerm

E

EProcess

P

poDebugOnlyThisProcess | poNoConsole | ppHigh
poDebugProcess | poRunSuspended | ppIdle
poDefaultErrorMode | poStderrToOutPut | ppNormal
poNewConsole | poUsePipes | ppRealTime
poNewProcessGroup | poWaitOnExit |

R

RunCommand RunCommandIndir

S

suoUseCountChars | swoMaximize | swoShowMaximized
suoUseFillAttribute | swoMinimize | swoShowMinimized
suoUsePosition | swoNone | swoshowMinNOActive
suoUseShowWindow | swoRestore | swoShowNA
suoUseSize | swoShow | swoShowNoActivate
swoHIDE | swoShowDefault | swoShowNormal

T

TProcess | TProcessOptions | TShowWindowOptions
TProcessForkEvent | TProcessPriority | TStartupOption
TProcessOption | TryTerminals | TStartupOptions

X

XTermProgram


TryTerminals

A list of terminal programs to use (unix only)

Declaration

Source position: process.pp line 168

var TryTerminals: array of ;

Description

TryTerminals is used under unix to test for available terminal programs in the DetectXTerm function. If XTermProgram is empty, each item in this list will be searched in the path, and used as a terminal program if it was found.

See also

XTermProgram | Default XTerm program to use
DetectXTerm | Detect the terminal program.


TShowWindowOptions

Description of the main window of the new process.

Declaration

Source position: process.pp line 30

type TShowWindowOptions = (
swoNone, | Allow system to position the window.
swoHIDE, | The main window is hidden.
swoMaximize, | The main window is maximized.
swoMinimize, | The main window is minimized.
swoRestore, | Restore the previous position.
swoShow, | Show the main window.
swoShowDefault, | When showing Show the main window on
swoShowMaximized, | The main window is shown maximized
swoShowMinimized, | The main window is shown minimized
swoshowMinNOActive, | The main window is shown minimized but not activated
swoShowNA, | The main window is shown but not activated
swoShowNoActivate, | The main window is shown but not activated
swoShowNormal | The main window is shown normally
);

Description

This type describes what the new process' main window should look like. Most of these have only effect on Windows. They are ignored on other systems.

See also

TProcessOption

Options to be used when a process is started.


TStartupOption

Options determining how the application is started.

Declaration

Source position: process.pp line 34

type TStartupOption = (
suoUseShowWindow, | Use the Show Window options specified in TShowWindowOption
suoUseSize, | Use the window sizes as specified in TProcess
suoUsePosition, | Use the window sizes as specified in TProcess.
suoUseCountChars, | Use the console character width as specified in TProcess.
suoUseFillAttribute | Use the console fill attribute as specified in TProcess.
);

Description

These options are mainly for Win32, and determine what should be done with the application once it's started.

See also

TShowWindowOptions | Description of the main window of the new process.
TProcessOptions | Set of TProcessOption.


TStartupOptions

Set of TStartUpOption.

Declaration

Source position: process.pp line 40

type TStartupOptions = set of (
suoUseShowWindow, | Use the Show Window options specified in TShowWindowOption
suoUseSize, | Use the window sizes as specified in TProcess
suoUsePosition, | Use the window sizes as specified in TProcess.
suoUseCountChars, | Use the console character width as specified in TProcess.
suoUseFillAttribute | Use the console fill attribute as specified in TProcess.
);


XTermProgram

Default XTerm program to use

Declaration

Source position: process.pp line 169

var XTermProgram: ;

Description

XTermProgram is the terminal program that is used. If empty, it will be set the first time DetectXTerm is called.

See also

TryTerminals | A list of terminal programs to use (unix only)
DetectXTerm | Detect the terminal program.


FindGlobalComponentCallBack

Callback used when component references must be resolved.

Declaration

Source position: rttiutils.pp line 139

var FindGlobalComponentCallBack: TFindComponentEvent;

Description

FindGlobalComponentCallBack is called by UpdateStoredList whenever it needs to resolve component references. It should be set to a routine that locates a loaded component in the global list of loaded components.

See also

UpdateStoredList | Update a stringlist with object references
TPropsStorage.StoreObjectsProps | Store a list of component properties
TPropsStorage.LoadObjectsProps | Load a list of component properties


Reference for unit 'rttiutils'

RTTI utility functions

uses

  System,

  sysutils,

  Classes,

  typinfo,

  StrUtils;

String routines

Overview

The rttiutils unit is a unit providing simplified access to the RTTI information from published properties using the TPropInfoList class. This access can be used when saving or restoring form properties at runtime, or for persisting other objects whose RTTI is available: the TPropsStorage class can be used for this. The implementation is based on the apputils unit from RXLib by AO ROSNO and Master-Bank


Reference for unit 'rttiutils': Constants

sPropNameDelimiter

Separator used when constructing section/key names


Reference for unit 'rttiutils': Types

TEraseSectEvent | Clear a storage section
TFindComponentEvent | Event callback to locate a component instance
TReadStrEvent | Callback to read strings from storage
TWriteStrEvent | Write a string to storage


Reference for unit 'rttiutils': Classes

TPropInfoList | Class for keeping property information
TPropsStorage | Property storage mechanism


Reference for unit 'rttiutils': Procedures and functions

CreateStoredItem | Concatenates component and property name
ParseStoredItem | Split a property reference to component reference and property name
UpdateStoredList | Update a stringlist with object references


Reference for unit 'rttiutils': Variables

FindGlobalComponentCallBack

Callback used when component references must be resolved.


Index of all identifiers in unit 'rttiutils'

C F P S T U

C

CreateStoredItem

F

FindGlobalComponentCallBack

P

ParseStoredItem

S

sPropNameDelimiter

T

TEraseSectEvent | TPropInfoList | TReadStrEvent
TFindComponentEvent | TPropsStorage | TWriteStrEvent

U

UpdateStoredList


sPropNameDelimiter

Separator used when constructing section/key names

Declaration

Source position: rttiutils.pp line 131

const sPropNameDelimiter: = '_';


TEraseSectEvent

Clear a storage section

Declaration

Source position: rttiutils.pp line 64

type TEraseSectEvent = procedure(

  const ASection:

) of object;

Arguments

ASection

Section to erase

Description

TEraseSectEvent is used by TPropsStorage to clear a storage section, in a .ini file like fashion: The call should remove all keys in the section ASection, and remove the section from storage.

See also

TPropsStorage | Property storage mechanism
TReadStrEvent | Callback to read strings from storage
TWriteStrEvent | Write a string to storage


TFindComponentEvent

Event callback to locate a component instance

Declaration

Source position: rttiutils.pp line 134

type TFindComponentEvent = function(

  const Name:

):TComponent;

Arguments

Name

Name path of component to search for

Function result

Component instance

Description

TFindComponentEvent should return the component instance for the component with name path Name. The name path should be relative to the global list of loaded components.

See also

UpdateStoredList | Update a stringlist with object references
FindGlobalComponentCallBack | Callback used when component references must be resolved.


TReadStrEvent

Callback to read strings from storage

Declaration

Source position: rttiutils.pp line 62

type TReadStrEvent = function(

  const ASection: ;

  const Item: ;

  const Default:

): of object;

Arguments

ASection | Section to read value from
Item | Key name for value
Default | Default return value if none was found

Function result

Value of Item in section ASection

Description

TReadStrEvent is used by TPropsStorage to read strings from a storage mechanism, in a .ini file like fashion: The call should read the string in ASection with key Item, and if it does not exist, Default should be returned.

See also

TPropsStorage | Property storage mechanism
TWriteStrEvent | Write a string to storage
TEraseSectEvent | Clear a storage section


TWriteStrEvent

Write a string to storage

Declaration

Source position: rttiutils.pp line 63

type TWriteStrEvent = procedure(

  const ASection: ;

  const Item: ;

  const Value:

) of object;

Arguments

ASection | Section to write in
Item | Key name for value
Value | String value to write

Description

TWriteStrEvent is used by TPropsStorage to write strings to a storage mechanism, in a .ini file like fashion: The call should write the string Value in ASection with key Item. The section and key should be created if they didn't exist yet.

See also

TPropsStorage | Property storage mechanism
TReadStrEvent | Callback to read strings from storage
TEraseSectEvent | Clear a storage section


DefaultIPCClientClass

Default client communication class

Declaration

Source position: simpleipc.pp line 166

var DefaultIPCClientClass: TIPCClientCommClass = nil;

Description

DefaultIPCClientClass is filled with a class pointer indicating which kind of communication protocol class should be instantiated by the TSimpleIPCClient class. It is set to a default value by the default implementation in the SimpleIPC unit, but can be set to another class if another method of transport is desired. (it should match the communication protocol used by the server, obviously).

See also

TSimpleIPCClient | Simple IPC client component
TIPCClientComm | Internal client-side communication protocol


DefaultIPCServerClass

Default server communication class

Declaration

Source position: simpleipc.pp line 164

var DefaultIPCServerClass: TIPCServerCommClass = nil;

Description

DefaultIPCServerClass is filled with a class pointer indicating which kind of communication protocol class should be instantiated by the TSimpleIPCServer class. It is set to a default value by the default implementation in the SimpleIPC unit, but can be set to another class if another method of transport is desired.

See also

TSimpleIPCServer | Simple IPC server component
TIPCServerComm | Internal message communication component


Reference for unit 'simpleipc'

Simple one-way IPC protocol

uses

  System,

  Classes,

  sysutils;

Overview

The SimpleIPC unit provides classes to implement a simple, one-way IPC mechanism using string messages. It provides a TSimpleIPCServer component for the server, and a TSimpleIPCClient component for the client. The components are cross-platform, and should work both on Windows and unix-like systems.

The Unix implementation of the SimpleIPC unit uses file-based sockets. It will attempt to clean up any registered server socket files that were not removed cleanly.

It does this in the unit finalization code. It does not install a signal handler by itself, that is the task of the programmer. But program crashes (access violations and such) that are handled by the RTL will be handled gracefully.

This also means that if the process is killed with the KILL signal, it has no chance of removing the files (KILL signals cannot be caught), in which case socket files may remain in the filesystem.


Reference for unit 'simpleipc': Resource strings

SErrServerNotActive
'Server with ID %s is not active.'

SErrActive
'This operation is illegal when the server is active.'

SErrInActive
'This operation is illegal when the server is inactive.'


Reference for unit 'simpleipc': Constants

MsgVersion | Current version of the messaging protocol
mtString | String message type
mtUnknown | Unknown message type


Reference for unit 'simpleipc': Types

TIPCClientCommClass | Class reference for TIPCClientComm
TIPCServerCommClass | Class reference for TIPCServerComm
TMessageType | For backwards compatibility
TMsgHeader | Message header record


Reference for unit 'simpleipc': Classes

EIPCError | Error reporting exception
TIPCClientComm | Internal client-side communication protocol
TIPCServerComm | Internal message communication component
TSimpleIPC | Ancestor for client/server simple IPC classes
TSimpleIPCClient | Simple IPC client component
TSimpleIPCServer | Simple IPC server component


Reference for unit 'simpleipc': Variables

DefaultIPCClientClass | Default client communication class
DefaultIPCServerClass | Default server communication class


Index of all identifiers in unit 'simpleipc'

D E M S T

D

DefaultIPCClientClass DefaultIPCServerClass

E

EIPCError

M

MsgVersion mtString mtUnknown

S

SErrActive SErrInActive SErrServerNotActive

T

TIPCClientComm | TIPCServerCommClass | TSimpleIPC
TIPCClientCommClass | TMessageType | TSimpleIPCClient
TIPCServerComm | TMsgHeader | TSimpleIPCServer


MsgVersion

Current version of the messaging protocol

Declaration

Source position: simpleipc.pp line 26

const MsgVersion = 1;


mtString

String message type

Declaration

Source position: simpleipc.pp line 30

const mtString = 1;


mtUnknown

Unknown message type

Declaration

Source position: simpleipc.pp line 29

const mtUnknown = 0;


TMessageType

For backwards compatibility

Declaration

Source position: simpleipc.pp line 34

type TMessageType = LongInt;

Description

TMessageType is provided for backward compatibility with earlier versions of the simpleipc unit.


TMsgHeader

Message header record

Declaration

Source position: simpleipc.pp line 35

type TMsgHeader = packed record
Version: Byte; | Version number
MsgType: TMessageType; | Message data type
MsgLen: Integer; | Message length
end;

Description

TMsgHeader is used internally by the IPC client and server components to transmit data. The Version field denotes the protocol version. The MsgType field denotes the type of data (mtString for string messages), and MsgLen is the length of the message which will follow.

See also

TSimpleIPCServer | Simple IPC server component
TSimpleIPCClient | Simple IPC client component


Reference for unit 'streamcoll'

Collection which can stream itself

uses

  System,

  Classes,

  sysutils;

Overview

The streamcoll unit contains the implentation of a collection (and corresponding collection item) which implements routines for saving or loading the collection to/from a stream. The collection item should implement 2 routines to implement the streaming; the streaming itself is not performed by the TStreamCollection collection item.

The streaming performed here is not compatible with the streaming implemented in the Classes unit for components. It is independent of the latter and can be used without a component to hold the collection.

The collection item introduces mostly protected methods, and the unit contains a lot of auxiliary routines which aid in streaming.


Reference for unit 'streamcoll': Classes

EStreamColl | Exception raised when an error occurs when streaming the collection.
TStreamCollection | Collection with stream support
TStreamCollectionItem | Collection item with streaming support


Reference for unit 'streamcoll': Procedures and functions

ColReadBoolean | Read a boolean value from a stream
ColReadCurrency | Read a currency value from the stream
ColReadDateTime | Read a TDateTime value from a stream
ColReadFloat | Read a floating point value from a stream
ColReadInteger | Read a 32-bit integer from a stream.
ColReadString | Read a string from a stream
ColWriteBoolean | Write a boolean to a stream
ColWriteCurrency | Write a currency value to stream
ColWriteDateTime | Write a TDateTime value to stream
ColWriteFloat | Write floating point value to stream
ColWriteInteger | Write a 32-bit integer to a stream
ColWriteString | Write a string value to the stream


Index of all identifiers in unit 'streamcoll'

C E T

C

ColReadBoolean | ColReadInteger | ColWriteDateTime
ColReadCurrency | ColReadString | ColWriteFloat
ColReadDateTime | ColWriteBoolean | ColWriteInteger
ColReadFloat | ColWriteCurrency | ColWriteString

E

EStreamColl

T

TStreamCollection TStreamCollectionItem


Reference for unit 'streamex'

Stream extensions

uses

  System,

  Classes;

Overview

streamex implements some extensions to be used together with streams from the classes unit.


Reference for unit 'streamex': Classes

TBidirBinaryObjectReader | Binary component stream reader with BiDi support
TBidirBinaryObjectWriter | Binary component stream writer with BiDi support
TDelphiReader | Stream reader with BiDi Support
TDelphiWriter | Stream writer with BiDi Support


Index of all identifiers in unit 'streamex'

T

T

TBidirBinaryObjectReader | TDelphiReader
TBidirBinaryObjectWriter | TDelphiWriter


Reference for unit 'StreamIO'

Streams for standard text files.

uses

  System,

  Classes,

  sysutils;

Overview

The StreamIO unit implements a call to reroute the input or output of a text file to a descendents of TStream.

This allows to use the standard pascal Read and Write functions (with all their possibilities), on streams.


Reference for unit 'StreamIO': Procedures and functions

AssignStream | Assign a text file to a stream.
GetStream | Return the stream, associated with a file.


Index of all identifiers in unit 'StreamIO'

A G

A

AssignStream

G

GetStream


Reference for unit 'syncobjs'

Synchronization objects

uses

  System,

  sysutils;

Overview

The syncobjs unit implements some classes which can be used when synchronizing threads in routines or classes that are used in multiple threads at once. The TCriticalSection class is a wrapper around low-level critical section routines (semaphores or mutexes). The TEventObject class can be used to send messages between threads (also known as conditional variables in Posix threads).


Reference for unit 'syncobjs': Constants

INFINITE

Infinite waiting time


Reference for unit 'syncobjs': Types

PSecurityAttributes | Dummy type
TEvent | Alias for TEventObject
TEventHandle | Handle type
TWaitResult | Unix wait result


Reference for unit 'syncobjs': Classes

TCriticalSection | Critical section
TEventObject | Event propagation object
THandleObject | Class encapsulating an operating system handle
TSimpleEvent | Simple, anonymous event
TSynchroObject | Abstract synchronization object


Index of all identifiers in unit 'syncobjs'

I P T W

I

INFINITE

P

PSecurityAttributes

T

TCriticalSection | TEventObject | TSynchroObject
TEvent | THandleObject | TWaitResult
TEventHandle | TSimpleEvent |

W

wrAbandoned | wrSignaled
wrError | wrTimeout


INFINITE

Infinite waiting time

Declaration

Source position: syncobjs.pp line 28

const INFINITE = (-1);

Description

Constant denoting an infinite timeout.


PSecurityAttributes

Dummy type

Declaration

Source position: syncobjs.pp line 24

type PSecurityAttributes = Pointer;

Description

PSecurityAttributes is a dummy type used in non-windows implementations, so the calls remain Delphi compatible.

See also

TEventObject.Create

Create a new event object


TEvent

Alias for TEventObject

Declaration

Source position: syncobjs.pp line 74

type TEvent = TEventObject;

Description

TEvent is a simple alias for the TEventObject class.

See also

TEventObject

Event propagation object


TEventHandle

Handle type

Declaration

Source position: syncobjs.pp line 25

type TEventHandle = Pointer;

Description

TEventHandle is an opaque type and should not be used in user code.


TWaitResult

Unix wait result

Declaration

Source position: syncobjs.pp line 31

type TWaitResult = (
wrSignaled, | Event was signaled (triggered)
wrTimeout, | Time-out period expired
wrAbandoned, | Wait operation was abandoned.
wrError | An error occurred during the wait operation.
);

Description

TWaitResult is used to report the result of a wait operation.

See also

TEventObject.WaitFor

Wait for the event to be set.


Reference for unit 'URIParser'

URI Parsing routines

Overview

The URIParser unit contains a basic type (TURI) and some routines for the parsing (ParseURI) and construction (EncodeURI) of Uniform Resource Indicators, commonly referred to as URL: Uniform Resource Location. It is used in various other units, and in itself contains no classes. It supports all protocols, username/password/port specification, query parameters and bookmarks etc..


Reference for unit 'URIParser': Types

TURI

Record containing all possible parts of a URI


Reference for unit 'URIParser': Procedures and functions

EncodeURI | Form a string representation of the URI
FilenameToURI | Construct a URI from a filename
IsAbsoluteURI | Check whether a URI is absolute.
ParseURI | Parse a URI and split it into its constituent parts
ResolveRelativeURI | Return a relative link
URIToFilename | Convert a URI to a filename


Index of all identifiers in unit 'URIParser'

E F I P R T U

E

EncodeURI

F

FilenameToURI

I

IsAbsoluteURI

P

ParseURI

R

ResolveRelativeURI

T

TURI

U

URIToFilename


TURI

Record containing all possible parts of a URI

Declaration

Source position: uriparser.pp line 26

type TURI = record
Protocol: ; | Protocol of the URI (http, ftp, file, mailto etc.)
Username: ; | Username part of the URI
Password: ; | Password part of the URI
Host: ; | Hostname part of the URI
Port: Word; | Port part of the URI
Path: ; | Path (directory) part of the URI
Document: ; | Document (filename) part of the URI
Params: ; | Query parameter part of the URI
Bookmark: ; | Bookmark part of the URI
HasAuthority: Boolean; | Indicates whether an 'Authority' part was present in the URI
end;

Description

TURI is the basic record that can be filled by the ParseURI call. It contains the contents of a URI, parsed out in it's various pieces.

See also

ParseURI | Parse a URI and split it into its constituent parts
EncodeURI | Form a string representation of the URI


Reference for unit 'zstream'

Support for compression streams

uses

  System,

  Classes,

  zbase,

  gzio;

Overview

The ZStream unit implements a TStream descendent (TCompressionStream) which uses the deflate algorithm to compress everything that is written to it. The compressed data is written to the output stream, which is specified when the compressor class is created.

Likewise, a TStream descendent is implemented which reads data from an input stream (TDecompressionStream) and decompresses it with the inflate algorithm.


Reference for unit 'zstream': Types

Tcompressionlevel | Compression level for the deflate algorithm
Tgzopenmode | Open mode for gzip file.


Reference for unit 'zstream': Classes

Ecompressionerror | Errors in the TCompressionStream class are signaled with this exception
Edecompressionerror | Errors in the TDeCompressionStream class are signaled with this exception
Egzfileerror | Exception class used in Tgzfilestream class
Ezliberror | Base exception for exceptions in the ZStream unit
Tcompressionstream | Write-only stream class which compresses data written to it.
Tcustomzlibstream | Ancestor for compression and decompression classes
Tdecompressionstream | Reads and decompresses data from a compressed data stream.
TGZFileStream | Stream to read/write from a gzip file.


Index of all identifiers in unit 'zstream'

C E G T

C

cldefault | clmax
clfastest | clnone

E

Ecompressionerror | Egzfileerror
Edecompressionerror | Ezliberror

G

gzopenread gzopenwrite

T

Tcompressionlevel | Tcustomzlibstream | TGZFileStream
Tcompressionstream | Tdecompressionstream | Tgzopenmode


Tcompressionlevel

Compression level for the deflate algorithm

Declaration

Source position: zstream.pp line 31

type Tcompressionlevel = (
clnone, | Do not use compression, just copy data.
clfastest, | Use fast (but less) compression.
cldefault, | Use default compression
clmax | Use maximum compression
);


Tgzopenmode

Open mode for gzip file.

Declaration

Source position: zstream.pp line 38

type Tgzopenmode = (
gzopenread, | Open file for reading
gzopenwrite | Open file for writing
);