Class TNFIVarRec (unit NFILists) |
Inherits from
TObject
constructor Create;
- =======================================================================} { ** TNFIVarRec CODE } {=======================================================================
function Append(Source: Pointer; ASize: LongInt): Boolean;
As with the move above, but uses a TNFIRecordItem object as the source.
function AppendBlob(Source: Pointer; ASize: LongInt): Boolean;
APPEND: Appends SOURCE to the end of the current information } { THESE BLOBS ARE NOT TRADITIONAL DELPHI DATABASE BLOB OBJECTS.
function AppendPChar(Source: PChar): Boolean;
READBLOBEX: Creates a new memory buffer of the appropriate size and copies the } { contents of the BLOB into this new buffer.
destructor Destroy;
function LoadFromFile(AFileName: String): Boolean;
procedure LoadFromStream(AStream: TStream);
Clears out all information prior to loading and points to START!
procedure Move(Source: Pointer; ASize: LongInt);
procedure MoveItem(AnItem: TNFIRecordItem);
MOVE: Move converts the buffer to SOURCE, and over-writes existing information
function ReadBlob(var Buffer: Pointer): LongInt;
APPENDBLOB: Appends SOURCE to the end of the current information storing the size of the BLOB Please read the associated notes located at the class definition
function ReadBlobEx(var Buffer: Pointer): LongInt;
READBLOB: Reads a BLOB record from the current position within the file.
procedure ReadPChar(Buffer: PChar);
Include the terminating #0
procedure Reset;
procedure ResetPointer;
procedure SaveToFile(AFileName: String);
procedure SaveToStream(var AStream: TStream);
NOT RESET! We want to keep all information!
function GetByte: Byte;
function GetInteger: Integer;
function GetLongInt: LongInt;
function GetMemory: Pointer;
function GetShortInt: ShortInt;
function GetSize: LongInt;
function GetString: String;
function GetTimeStamp: TDateTime;
function GetWord: Word;
procedure SetByte(AByte: Byte);
procedure SetInteger(AInteger: Integer);
procedure SetLongInt(ALongInt: LongInt);
procedure SetMemorySize(ASize: LongInt);
Ident is used as a "Contents Information" identifier } { -- As in "What in the heck did I store in this record ?"
procedure SetShortInt(AShortInt: ShortInt);
procedure SetString(AString: String);
procedure SetTimeStamp(ATime: TDateTime);
procedure SetWord(AWord: Word);
property Capacity : LongInt
property Data : Pointer
property ID : Integer
property Size : LongInt
property vByte : Byte
property vInteger : Integer
property vLong : LongInt
property vLongInt : LongInt
property vShortInt : ShortInt
property vString : String
property vTime : TDateTime
property vWord : Word
Ident : Integer;
Memory : TMemoryStream;
MemorySize : LongInt;
constructor Create;
=======================================================================} { ** TNFIVarRec CODE } {=======================================================================
function Append(Source: Pointer; ASize: LongInt): Boolean;
As with the move above, but uses a TNFIRecordItem object as the source.
function AppendBlob(Source: Pointer; ASize: LongInt): Boolean;
APPEND: Appends SOURCE to the end of the current information } { THESE BLOBS ARE NOT TRADITIONAL DELPHI DATABASE BLOB OBJECTS. BLOB REFERS TO ANY GENERIC } { BINARY OBJECT THAT CAN ONLY BE READ AND WRITTEN FROM MEMORY! IF YOU NEED TO STORE A } { BITMAP (FOR INSTANCE), YOU CAN READ AND WRITE IT USING APPENDBLOB AND READBLOBEX! NOTE } { THAT TNFIVARREC AUTOMATICALLY STORES THE BLOB SIZE SO WHEN READ THE EQUIVALENT AMOUNT } { OF MEMORY IS ALLOCATED. MAXIMUM BLOB SIZE IS 2 GB.
THESE BLOBS ARE NOT TRADITIONAL DELPHI DATABASE BLOB OBJECTS. BLOB REFERS TO ANY GENERIC } { BINARY OBJECT THAT CAN ONLY BE READ AND WRITTEN FROM MEMORY! IF YOU NEED TO STORE A } { BITMAP (FOR INSTANCE), YOU CAN READ AND WRITE IT USING APPENDBLOB AND READBLOB! NOTE } { THAT TNFIVARREC AUTOMATICALLY STORES THE BLOB SIZE SO WHEN READ THE EQUIVALENT AMOUNT } { OF MEMORY IS ALLOCATED. MAXIMUM BLOB SIZE IS 2 GB.
function AppendPChar(Source: PChar): Boolean;
READBLOBEX: Creates a new memory buffer of the appropriate size and copies the } { contents of the BLOB into this new buffer. This allows the programmer } { to directly perform read/write operations on the buffer, unlike READBLOB
destructor Destroy;
function LoadFromFile(AFileName: String): Boolean;
procedure LoadFromStream(AStream: TStream);
Clears out all information prior to loading and points to START!
procedure Move(Source: Pointer; ASize: LongInt);
procedure MoveItem(AnItem: TNFIRecordItem);
MOVE: Move converts the buffer to SOURCE, and over-writes existing information
function ReadBlob(var Buffer: Pointer): LongInt;
APPENDBLOB: Appends SOURCE to the end of the current information storing the size of the BLOB
Please read the associated notes located at the class definition
function ReadBlobEx(var Buffer: Pointer): LongInt;
READBLOB: Reads a BLOB record from the current position within the file. } { Buffer SHOULD NOT be assigned as ReadBlob will change it's location !!! } { Buffer is in fact set to point to the internal storage area, so prior } { to making any changes make sure that you have copied this information } { out!
Please read the associated notes located at the class definition
procedure ReadPChar(Buffer: PChar);
Include the terminating #0
procedure Reset;
procedure ResetPointer;
procedure SaveToFile(AFileName: String);
procedure SaveToStream(var AStream: TStream);
NOT RESET! We want to keep all information!
function GetByte: Byte;
function GetInteger: Integer;
function GetLongInt: LongInt;
function GetMemory: Pointer;
function GetShortInt: ShortInt;
function GetSize: LongInt;
function GetString: String;
function GetTimeStamp: TDateTime;
function GetWord: Word;
procedure SetByte(AByte: Byte);
procedure SetInteger(AInteger: Integer);
procedure SetLongInt(ALongInt: LongInt);
procedure SetMemorySize(ASize: LongInt);
Ident is used as a "Contents Information" identifier } { -- As in "What in the heck did I store in this record ?"
procedure SetShortInt(AShortInt: ShortInt);
procedure SetString(AString: String);
procedure SetTimeStamp(ATime: TDateTime);
procedure SetWord(AWord: Word);
property Capacity : LongInt
property Data : Pointer
property ID : Integer
property Size : LongInt
property vByte : Byte
property vInteger : Integer
property vLong : LongInt
property vLongInt : LongInt
property vShortInt : ShortInt
property vString : String
property vTime : TDateTime
property vWord : Word
Ident : Integer;
Memory : TMemoryStream;
MemorySize : LongInt;