TNTFSDiskNode

From Ultibo.org
Jump to: navigation, search

Return to Unit NTFSClass


Description


To be documented

Class definitions



TNTFSDiskNode = class(TListObject)

Note: Represents an INDX record header.
 
constructor Create(ALocalLock:TMutexHandle; AIndex:TNTFSDiskIndex);  
destructor Destroy; override;  
private
FLocalLock:TMutexHandle;  
 
FStatus:LongWord;  
 
FIndexFlags:Word; Flags (See Consts)
FIndexSize:LongWord; Total size of the Index Entries
FIndexAllocated:LongWord; Allocated size of the Index Entries
FEntryOffset:LongWord; Offset to first Index Entry
 
FRecordNumber:Int64; Number of this INDX record in the Index Allocation
FUpdateSequenceOffset:Word; Offset to the Update Sequence Record
FUpdateSequenceLength:Word; Size in words of the Update Sequence Record
 
FUpdateSequenceNumber:Word; Update Sequence Number
FLogFileSequenceNumber:Int64; LogFile sequence number
 
FIndex:TNTFSDiskIndex; Index owning this node
FBlank:TNTFSDiskKey; Blank key of this node (Blank keys do not move)
 
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
 
function GetAdded:Boolean;  
procedure SetAdded(AValue:Boolean);  
function GetDeleted:Boolean;  
procedure SetDeleted(AValue:Boolean);  
function GetChanged:Boolean;  
procedure SetChanged(AValue:Boolean);  
 
function GetModified:Boolean;  
procedure SetModified(AValue:Boolean);  
 
function GetIsRoot:Boolean;  
 
function GetHasSubNodes:Boolean;  
procedure SetHasSubNodes(AValue:Boolean);  
 
function GetStart:TNTFSDiskKey;  
public
property Added:Boolean read GetAdded write SetAdded; Index record to be allocated
property Deleted:Boolean read GetDeleted write SetDeleted; Index record to be deallocated
property Changed:Boolean read GetChanged write SetChanged; Index record to be updated
 
property Modified:Boolean read GetModified write SetModified; Index record has been added, deleted or changed
 
property IsRoot:Boolean read GetIsRoot;  
 
property HasSubNodes:Boolean read GetHasSubNodes write SetHasSubNodes;  
 
property IndexFlags:Word read FIndexFlags write FIndexFlags;  
property IndexSize:LongWord read FIndexSize write FIndexSize;  
property IndexAllocated:LongWord read FIndexAllocated write FIndexAllocated;  
property EntryOffset:LongWord read FEntryOffset write FEntryOffset;  
 
property RecordNumber:Int64 read FRecordNumber write FRecordNumber;  
property UpdateSequenceOffset:Word read FUpdateSequenceOffset write FUpdateSequenceOffset;  
property UpdateSequenceLength:Word read FUpdateSequenceLength write FUpdateSequenceLength;  
 
property UpdateSequenceNumber:Word read FUpdateSequenceNumber write FUpdateSequenceNumber;  
property LogFileSequenceNumber:Int64 read FLogFileSequenceNumber write FLogFileSequenceNumber;  
 
property Index:TNTFSDiskIndex read FIndex;  
property Blank:TNTFSDiskKey read FBlank write FBlank;  
property Start:TNTFSDiskKey read GetStart;  
 
function KeyCount:Integer;  
 
function IndexFree:LongWord;  
 
function UpdateKeys(AVersion:Word):Boolean; virtual;  
 
function CalculatedSize(AVersion:Word):LongWord;  
function CalculatedOffset(AVersion:Word):LongWord;  
function CalculatedAllocated(AVersion:Word):LongWord;  
function CalculatedSequenceOffset(AVersion:Word):Word;  
function CalculatedSequenceLength(ASectorSize:Word):Word;  
 
function WriteEmpty(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word; var AUpdateSequenceOffset,AUpdateSequenceLength:Word):Boolean;  
 
function ReadRecord(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;  
function WriteRecord(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;  
 
function ReadHeader(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;  
function WriteHeader(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;  


Function declarations



constructor TNTFSDiskNode.Create(ALocalLock:TMutexHandle; AIndex:TNTFSDiskIndex);
Description: To be documented
Note None documented


destructor TNTFSDiskNode.Destroy;
Description: To be documented
Note None documented


function TNTFSDiskNode.AcquireLock:Boolean;
Description: To be documented
Note None documented


function TNTFSDiskNode.ReleaseLock:Boolean;
Description: To be documented
Note None documented


function TNTFSDiskNode.GetAdded:Boolean;
Description: To be documented
Note None documented


procedure TNTFSDiskNode.SetAdded(AValue:Boolean);
Description: To be documented
Note None documented


function TNTFSDiskNode.GetDeleted:Boolean;
Description: To be documented
Note None documented


procedure TNTFSDiskNode.SetDeleted(AValue:Boolean);
Description: To be documented
Note None documented


function TNTFSDiskNode.GetChanged:Boolean;
Description: To be documented
Note None documented


procedure TNTFSDiskNode.SetChanged(AValue:Boolean);
Description: To be documented
Note None documented


function TNTFSDiskNode.GetModified:Boolean;
Description: To be documented
Note None documented


procedure TNTFSDiskNode.SetModified(AValue:Boolean);
Description: To be documented
Note None documented


function TNTFSDiskNode.GetIsRoot:Boolean;
Description: To be documented
Note None documented


function TNTFSDiskNode.GetHasSubNodes:Boolean;
Description: To be documented
Note None documented


procedure TNTFSDiskNode.SetHasSubNodes(AValue:Boolean);
Description: To be documented
Note None documented


function TNTFSDiskNode.GetStart:TNTFSDiskKey;
Description: To be documented
Note Includes the blank key which may be the only key


function TNTFSDiskNode.KeyCount:Integer;
Description: To be documented
Note Includes the blank key which may be the only key


function TNTFSDiskNode.IndexFree:LongWord;
Description: Determine the free space remaining in the node
Note None documented


function TNTFSDiskNode.UpdateKeys(AVersion:Word):Boolean;
Description: Update Flags and Sub Node Number on all keys
Note None documented


function TNTFSDiskNode.CalculatedSize(AVersion:Word):LongWord;
Description: To be documented
Note Calculated Size includes any rounding required for alignment


function TNTFSDiskNode.CalculatedOffset(AVersion:Word):LongWord;
Description: Determine the entry offset for this node based on version
Note Will be different for root node versus other nodes


function TNTFSDiskNode.CalculatedAllocated(AVersion:Word):LongWord;
Description: Determine the index allocated for this node based on version
Note Will be different for root node versus other nodes


function TNTFSDiskNode.CalculatedSequenceOffset(AVersion:Word):Word;
Description: Determine the update sequence offset for this node based on version
Note Root node will have a sequence offset of zero


function TNTFSDiskNode.CalculatedSequenceLength(ASectorSize:Word):Word;
Description: Determine the update sequence length for this node based on sector size
Note Sequence Length is the number of Words in the update sequence array

Root node will have a sequence length of zero


function TNTFSDiskNode.WriteEmpty(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word; var AUpdateSequenceOffset,AUpdateSequenceLength:Word):Boolean;
Description: Write an empty index record, index header and index entry to the supplied buffer at the supplied offset
Note None documented


function TNTFSDiskNode.ReadRecord(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Read the index record and index header from the supplied buffer at the supplied offset
Note None documented


function TNTFSDiskNode.WriteRecord(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Write the index record and index header to the supplied buffer at the supplied offset
Note None documented


function TNTFSDiskNode.ReadHeader(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Read the index header from the supplied buffer at the supplied offset
Note None documented


function TNTFSDiskNode.WriteHeader(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Write the index header to the supplied buffer at the supplied offset
Note None documented


Return to Unit Reference