Home Units Hierarchy Routines All identifiers

Unit unaClasses

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Contains base classes, such as lists, threads and events, which are often used by other classes and components.

2.5.2008.03

2.5.2009.12 - removed old critical section/asm stuff from gates' implementation

2.5.2010.01 - compatiblity with D4/D5 restored; some cleanup

2.5.2010.01.26 - unaIniFile now supports unicode values

2.5.2010.12 - acquire()/release() added to unaObject

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class unaAbstractGate Abstract class for all gates (critical sections) objects.
Class unaAbstractStream Simple First In First Out (FIFO) stream.
Class unaAbstractTimer This is an abstract timer.
Class unaConsoleApp This class encapsulates basic Windows console application.
Class unaEvent This is a wrapper class for Windows Events.
Class unaFileList List of file names.
Class unaFileStream This stream is stored in a file.
Class unaIdList This list is usefull when you wish to access items by their IDs rather than by indexes.
Class unaIniAbstractStorage Manages values stored in "INI" format.
Class unaIniFile Manages values stored in Windows INI files.
Class unaIniMemory Manages values stored in memory in INI format.
Class unaIniMemorySection Manages values stored in Windows INI files.
Class unaInProcessGate2 Only one thead at a time can enter this gate.
Class unaIntfObjectList List of objects implementing interfaces.
Class unaList This is general purpose list of items.
packed record unaListStorage  
packed record unaListStringItem  
Class unaMappedFile This is wrapper class for the Windows mapped files mechanism.
Class unaMappedMemory This is wrapper class for the Windows mapped memory mechanism.
Class unaMemoryData This stream is stored in memory.
Class unaMemoryStream Stream is stored in memory.
Class unaObject Base class for all objects defined in this unit.
Class unaObjectList List of objects.
Class unaOutProcessGate This class is useful when you wish to ensure some block of code to be executed only by one thread at a time.
Class unaRandomGenThread This thread produces random values from HPRC and other hard-predictable sources.
Class unaRecordList List of records (pointers).
Class unaRegistry Registry access class.
Class unaResourceStream This stream is stored in resource.
Class unaSleepyThread – unaSleepyThread –
Class unaStreamChunk – unaStreamChunk –
Class unaStringList List of strings.
Class unaThread unaThread
Class unaThreadedTimer Base clss: thread wrapper for thread-based timers.
Class unaThreadManager This class manages one or more threads.
Class unaThreadTimer This timer uses thread to tick periodically.
Class unaTimer Message-based timer.
Class unaTimerThread  
Class unaWaitableTimer This timer uses waitable timers to tick periodically.
Class unaWideStringList List of wide strings.

Functions and Procedures

function lockNonEmptyList_r(list: unaList; ro: bool; timeout: tTimeout = -1002 ): bool;
function lockList_r(list: unaList; ro: bool; timeout: tTimeout = -1002 ): bool;
procedure unlockListRO(list: unaList);
procedure unlockListWO(list: unaList);
function sameFiles(const fileName1, fileName2: wString): bool;
function getFolderSize(const folder: wString; includeSubFolders: bool = true): int64;

Types

unaListCopyOpEnum = (...);
unaListOnItemReleaseEvent = procedure(index: int; var doFree: unsigned) of object;
unaListOnItemBeforeRemoveEvent = procedure(index: int) of object;
unaListDataType = (...);
punaListStringItem = ˆunaListStringItem;
WIN32_FIND_DATAA = WIN32_FIND_DATA;
unaThreadStatus = (...);
unaThreadOnExecuteMethod = function(thread: unaThread): int of object;
onTimerEvent = procedure(sender: tObject) of object;
unaAbstractStreamClass = class of unaAbstractStream;

Constants

c_max_threads = 1024;
c_VC_reg_core_section_name = 'VC2.5';
c_VC_reg_DSP_section_name = 'VC2.5 DSP';
c_VC_reg_IP_section_name = 'VC2.5 IP';
c_VC_reg_RTP_section_name = 'VC2.5 RTP';
REG_QWORD = 11;

Description

Functions and Procedures

function lockNonEmptyList_r(list: unaList; ro: bool; timeout: tTimeout = -1002 ): bool;

Locks a list if it is not nil and contains at least one element. list.Unlock() must be called if this function returns true.

Parameters
list
List to be locked.
ro
RO or WO lock
timeout
Timeout for locking gate. Default value is -1002, which means the routine will use list.timeout property instead.
Returns

True if list contains at least one element and was locked, or False if list is nil, empty or timeout expired.

function lockList_r(list: unaList; ro: bool; timeout: tTimeout = -1002 ): bool;

Locks a list.

Parameters
list
List to lock
ro
RO or WO lock
timeout
Timeout, default is -1002, which means it will take the timeout from list.timeout property
procedure unlockListRO(list: unaList);

Unlocks the list locked as RO

Parameters
list
List to unlock
procedure unlockListWO(list: unaList);

Unlocks the list locked as WO

Parameters
list
List to unlock
function sameFiles(const fileName1, fileName2: wString): bool;

Returns true if files' content is the same. Uses mapped file class.

Parameters
fileName1
Name of first file.
fileName2
Name of second file.
Returns

True if files are same.

function getFolderSize(const folder: wString; includeSubFolders: bool = true): int64;

Returns size of files in specifed folder (and optionally all subfolders).

Parameters
folder
Path.
includeSubFolders
Process files in subfolders (default is True).
Returns

Total size of all files.

Types

unaListCopyOpEnum = (...);

– –

Values
  • unaco_add:  
  • unaco_replaceExisting:  
  • unaco_insert:  
  • unaco_assign:  
unaListOnItemReleaseEvent = procedure(index: int; var doFree: unsigned) of object;

Fires when list item is needed to be released. NOTE: item[index] could be nil.

unaListOnItemBeforeRemoveEvent = procedure(index: int) of object;

Fires when list item is about to be removed from the list.

unaListDataType = (...);

NOTE: When adding new types, make sure all cases (dataType) will be aware of them.

Values
  • uldt_int32:  
  • uldt_int64:  
  • uldt_ptr:  
  • uldt_string:  
  • uldt_record:  
  • uldt_obj:  
punaListStringItem = ˆunaListStringItem;
 
WIN32_FIND_DATAA = WIN32_FIND_DATA;
 
unaThreadStatus = (...);

max number of threads

– threads –

Values
  • unatsStopped:  
  • unatsStopping:  
  • unatsPaused:  
  • unatsRunning:  
  • unatsBeforeRunning:  
unaThreadOnExecuteMethod = function(thread: unaThread): int of object;

Event used for thread execution.

onTimerEvent = procedure(sender: tObject) of object;
 
unaAbstractStreamClass = class of unaAbstractStream;

– unaAbstractStream –

Constants

c_max_threads = 1024;
 
c_VC_reg_core_section_name = 'VC2.5';
 
c_VC_reg_DSP_section_name = 'VC2.5 DSP';
 
c_VC_reg_IP_section_name = 'VC2.5 IP';
 
c_VC_reg_RTP_section_name = 'VC2.5 RTP';
 
REG_QWORD = 11;
 

Author

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09