Class TDSSClass

Unit

Declaration

type TDSSClass = class(TObject)

Description

Base for all collection classes

Hierarchy

Overview

Nested Types

Public THashListType = TAltHashList;

Fields

Protected ActiveElement: Integer;
Protected ActiveProperty: Integer;
Protected ElementNameList: THashListType;
Public DSS: TDSSContext;
Public ClassParents: TStringList;
Public Class_Name: String;
Public CommandList: TCommandlist;
Public NumProperties: Integer;
Public PropertyName: pStringArray;
Public PropertyRedundantWith: pIntegerArray;
Public PropertySource: pStringArray;
Public PropertyScale: pDoubleArray;
Public PropertyValueOffset: pDoubleArray;
Public PropertyTrapZero: pDoubleArray;
Public PropertyInverse: pBooleanArray;
Public PropertyType: pPropertyTypeArray;
Public PropertyWriteFunction: PPointerArray;
Public PropertyReadFunction: PPointerArray;
Public PropertyOffset: pPtrIntArray;
Public PropertyOffset2: pPtrIntArray;
Public PropertyOffset3: pPtrIntArray;
Public PropertyStructArrayIndexOffset: PtrUint;
Public PropertyStructArrayIndexOffset2: PtrUint;
Public PropertyStructArrayOffset: PtrUint;
Public PropertyStructArrayStep: PtrUint;
Public PropertyStructArrayCountOffset: PtrUint;
Public PropertyFlags: Array of TPropertyFlags;
Public DSSClassType: Integer;
Public ElementList: TDSSPointerList;
Public ElementNamesOutOfSynch: Boolean;
Public Saved: Boolean;

Methods

Protected Function AddObjectToList(Obj:Pointer; Activate: Boolean = True):Integer;
Protected Function Get_FirstPropertyName:String;
Protected Function Get_NextPropertyName:String;
Protected Procedure CountPropertiesAndAllocate; virtual;
Protected procedure DefineProperties; virtual;
Protected procedure PopulatePropertyNames(PropOffset: Integer; NumProps: Integer; EnumInfo: Pointer; ReplacePct: Boolean = True; PropSource: String = '');
Public constructor Create(dssContext: TDSSContext; DSSClsType: Integer; DSSClsName: String);
Public destructor Destroy; override;
Public Procedure ReallocateElementNameList;
Public function BeginEdit(ptr: Pointer; SetActive: Boolean=True): Pointer; virtual;
Public function EndEdit(ptr: Pointer; const NumChanges: integer): Boolean; virtual;
Public function Edit(Parser: TDSSParser): Integer;
Public function NewObject(const ObjName: String; Activate: Boolean = True):Pointer; Virtual; overload;
Public function NewObject(const ObjName: String; Activate: Boolean; out Idx: Integer):Pointer; overload;
Public Function SetActive(const ObjName:String):Boolean;
Public Function GetActiveObj:Pointer;
Public Function Find(const ObjName:String; const ChangeActive: Boolean=True): Pointer; virtual;
Public Function PropertyIndex(Const Prop:String):Integer;
Public function GetPropertyHelp(idx: Integer): String;
Protected procedure DoErrorMsg(Const S, Emsg, ProbCause: String; ErrNum: Integer); inline;
Protected procedure DoSimpleMsg(Const S: String; ErrNum:Integer); inline; overload;
Protected procedure DoSimpleMsg(Const S: String; fmtArgs: Array of Const; ErrNum:Integer); inline; overload;

Properties

Public property FirstPropertyName: String read Get_FirstPropertyName;
Public property NextPropertyName: String read Get_NextPropertyName;
Public property Active: Integer read ActiveElement write Set_Active;
Public property ElementCount: Integer read Get_ElementCount;
Public property First: Integer read Get_First;
Public property Next: Integer read Get_Next;
Public property Name: String read Class_Name;

Description

Nested Types

Public THashListType = TAltHashList;
 

Fields

Protected ActiveElement: Integer;
 
Protected ActiveProperty: Integer;

index of present ActiveElement

Protected ElementNameList: THashListType;
 
Public DSS: TDSSContext;
 
Public ClassParents: TStringList;
 
Public Class_Name: String;
 
Public CommandList: TCommandlist;
 
Public NumProperties: Integer;
 
Public PropertyName: pStringArray;

TODO: move to array of records

Public PropertyRedundantWith: pIntegerArray;
 
Public PropertySource: pStringArray;
 
Public PropertyScale: pDoubleArray;
 
Public PropertyValueOffset: pDoubleArray;
 
Public PropertyTrapZero: pDoubleArray;
 
Public PropertyInverse: pBooleanArray;
 
Public PropertyType: pPropertyTypeArray;
 
Public PropertyWriteFunction: PPointerArray;
 
Public PropertyReadFunction: PPointerArray;
 
Public PropertyOffset: pPtrIntArray;
 
Public PropertyOffset2: pPtrIntArray;

For most simple properties

Public PropertyOffset3: pPtrIntArray;

For separate complex quantities, double-on-array, ...

Public PropertyStructArrayIndexOffset: PtrUint;

For setters in e.g. object refs

Public PropertyStructArrayIndexOffset2: PtrUint;

For setters in e.g. object refs

Public PropertyStructArrayOffset: PtrUint;

For setters in e.g. object refs

Public PropertyStructArrayStep: PtrUint;

For setters in e.g. object refs

Public PropertyStructArrayCountOffset: PtrUint;

For setters in e.g. object refs

Public PropertyFlags: Array of TPropertyFlags;
 
Public DSSClassType: Integer;

TODO: 0 is unused until things are migrated later

Public ElementList: TDSSPointerList;
 
Public ElementNamesOutOfSynch: Boolean;
 
Public Saved: Boolean;

When device gets renamed

Methods

Protected Function AddObjectToList(Obj:Pointer; Activate: Boolean = True):Integer;
 
Protected Function Get_FirstPropertyName:String;

Used by NewObject

Protected Function Get_NextPropertyName:String;
 
Protected Procedure CountPropertiesAndAllocate; virtual;
 
Protected procedure DefineProperties; virtual;
 
Protected procedure PopulatePropertyNames(PropOffset: Integer; NumProps: Integer; EnumInfo: Pointer; ReplacePct: Boolean = True; PropSource: String = '');
 
Public constructor Create(dssContext: TDSSContext; DSSClsType: Integer; DSSClsName: String);
 
Public destructor Destroy; override;
 
Public Procedure ReallocateElementNameList;
 
Public function BeginEdit(ptr: Pointer; SetActive: Boolean=True): Pointer; virtual;

function CustomParse(ptr: Pointer; Idx: Integer; Param: String): Boolean; virtual;

Public function EndEdit(ptr: Pointer; const NumChanges: integer): Boolean; virtual;
 
Public function Edit(Parser: TDSSParser): Integer;
 
Public function NewObject(const ObjName: String; Activate: Boolean = True):Pointer; Virtual; overload;
 
Public function NewObject(const ObjName: String; Activate: Boolean; out Idx: Integer):Pointer; overload;
 
Public Function SetActive(const ObjName:String):Boolean;

for compatibility, when the index is required

Public Function GetActiveObj:Pointer;
 
Public Function Find(const ObjName:String; const ChangeActive: Boolean=True): Pointer; virtual;

Get address of active obj of this class

Public Function PropertyIndex(Const Prop:String):Integer;

Find an obj of this class by name

Public function GetPropertyHelp(idx: Integer): String;
 
Protected procedure DoErrorMsg(Const S, Emsg, ProbCause: String; ErrNum: Integer); inline;

DSSContext convenience functions

Protected procedure DoSimpleMsg(Const S: String; ErrNum:Integer); inline; overload;
 
Protected procedure DoSimpleMsg(Const S: String; fmtArgs: Array of Const; ErrNum:Integer); inline; overload;
 

Properties

Public property FirstPropertyName: String read Get_FirstPropertyName;
 
Public property NextPropertyName: String read Get_NextPropertyName;
 
Public property Active: Integer read ActiveElement write Set_Active;
 
Public property ElementCount: Integer read Get_ElementCount;
 
Public property First: Integer read Get_First;
 
Public property Next: Integer read Get_Next;
 
Public property Name: String read Class_Name;
 

Generated by PasDoc 0.16.0.