CAST II Game Engine |
||||||||
![]() |
MAIN | FEATURES | SCREENSHOTS | FORUMS | MANUAL | DOWNLOADS | CONTACTS | |
type TProperties = class
| Name | Description | |
|---|---|---|
![]() | Changed | This field becomes True with any change of properties or values |
![]() | FTotalProperties | Number of properties |
![]() | Properties | Set of properties |
![]() | destructor Destroy; override; |
![]() | function Add(const AName: AnsiString; const AValueType: Integer; const AOptions: TPOptions; const AValue, AEnumeration: AnsiString; const ADescription: AnsiString = ''): Integer; |
![]() | function AddBinary(const AName: AnsiString; const AOptions: TPOptions; AData: Pointer; DataSize: Integer): Integer; |
![]() | function AddEnumerated(const AName: AnsiString; const AOptions: TPOptions; AValue: Integer; const AEnumeration: AnsiString): Integer; |
![]() | procedure AddSetProperty(const Name: AnsiString; Value, VisibleMembers: TSet32; ValuesEnum: TAnsiStringArray; const ADescription: AnsiString); overload; |
![]() | procedure AddSetProperty(const Name: AnsiString; Value, VisibleMembers: TSet32; const ValuesEnum, ADescription: AnsiString); overload; |
![]() | procedure Clear; virtual; |
![]() | procedure DoForEach(Action: TPropertyDelegate; var CustomData: Integer); |
![]() | function Exists(const Name: AnsiString): Boolean; |
![]() | function FindAndFreeTemp(Data: Pointer): Boolean; |
![]() | function GetAsInteger(const Name: AnsiString): Integer; virtual; |
![]() | function GetAsXML: AnsiString; virtual; |
![]() | function GetBinPropertySize(const PropName: AnsiString; ElementSize: Integer): Integer; |
![]() | function GetIndex(const Name: AnsiString): Integer; virtual; |
![]() | function GetNameByIndex(const Index: Integer): AnsiString; virtual; |
![]() | function GetOptions(const Name: AnsiString): TPOptions; virtual; |
![]() | function GetProperty(const Name: AnsiString): PProperty; virtual; |
![]() | function GetPropertyByIndex(const Index: Integer): PProperty; virtual; |
![]() | function GetType(const Name: AnsiString): TPropertyValueType; virtual; |
![]() | function GetTypeAsString(Index: Integer): AnsiString; virtual; |
![]() | function GetValue(const Name: AnsiString): AnsiString; |
![]() | function GetValueByIndex(Index: Integer): AnsiString; virtual; |
![]() | function IsEqual(const Props: TProperties): Boolean; |
![]() | function IsEqualProperty(const Prop1, Prop2: TProperty): Boolean; |
![]() | procedure Merge(const Props: TProperties; OverrideExisting: Boolean); |
![]() | function Read(Stream: TStream): Boolean; virtual; |
![]() | function RetrieveBinPropertyData(const PropName: AnsiString; Dest: Pointer): Integer; |
![]() | procedure SetEnumeratedValueByIndex(Index, ValueIndex: Integer); |
![]() | function SetSetProperty(const Name: AnsiString; var Res: TSet32; const ValuesEnum: AnsiString): Boolean; overload; |
![]() | function SetSetProperty(const Name: AnsiString; var Res: TSet32; ValuesEnum: TAnsiStringArray): Boolean; overload; |
![]() | function SetValue(const Name, Value: AnsiString): Integer; virtual; |
![]() | procedure SetValueByIndex(Index: Integer; const Value: AnsiString); |
![]() | function TempCopy(Src: Pointer; Size: Integer): Pointer; |
![]() | function Valid(const Name: AnsiString): Boolean; virtual; |
![]() | function ValueToFloat(const Value: AnsiString): Extended; virtual; |
![]() | function ValueToInteger(ValueType: Integer; const Value, Enumeration: AnsiString): Int32; virtual; |
![]() | function Write(Stream: TStream): Boolean; virtual; |
![]() | destructor Destroy; override; |
![]() | function Add(const AName: AnsiString; const AValueType: Integer; const AOptions: TPOptions; const AValue, AEnumeration: AnsiString; const ADescription: AnsiString = ''): Integer; |
Adds a new property to the set and returns its index
![]() | function AddBinary(const AName: AnsiString; const AOptions: TPOptions; AData: Pointer; DataSize: Integer): Integer; |
Adds a new binary property to the set and returns its index. AData should stay valid during the properties lifetime. if RetrieveBinPropertyData function is used to retrieve the data, no part of dynamic array or other managed memory can be passed in AData
![]() | function AddEnumerated(const AName: AnsiString; const AOptions: TPOptions; AValue: Integer; const AEnumeration: AnsiString): Integer; |
Adds a new enumerated property to the set and returns its index
![]() | procedure AddSetProperty(const Name: AnsiString; Value, VisibleMembers: TSet32; ValuesEnum: TAnsiStringArray; const ADescription: AnsiString); overload; |
Adds a variable of a set type as a set of boolean values to the current property set.
VisibleMembers is a set of members which should be added. If it's empty all members will be added.
![]() | procedure AddSetProperty(const Name: AnsiString; Value, VisibleMembers: TSet32; const ValuesEnum, ADescription: AnsiString); overload; |
Adds a variable of a set type as a set of boolean values to the current property set.
VisibleMembers is a set of members which should be added. If it's empty all members will be added.
![]() | procedure Clear; virtual; |
Clear the current property set as well as temporal memory storage
![]() | procedure DoForEach(Action: TPropertyDelegate; var CustomData: Integer); |
Calls the Action delegate for each property
![]() | function Exists(const Name: AnsiString): Boolean; |
Returns True if a property with the specified name exists in the set
![]() | function FindAndFreeTemp(Data: Pointer): Boolean; |
Finds and frees a previously created temporary memory buffer and returns True if it was found and freed
![]() | function GetAsInteger(const Name: AnsiString): Integer; virtual; |
Returns an integer representation of the properties value
![]() | function GetAsXML: AnsiString; virtual; |
Returns the properties in XML format
![]() | function GetBinPropertySize(const PropName: AnsiString; ElementSize: Integer): Integer; |
Returns size of the specified binary property in elements of the specified size
![]() | function GetIndex(const Name: AnsiString): Integer; virtual; |
Returns the index of the specified property
![]() | function GetNameByIndex(const Index: Integer): AnsiString; virtual; |
Returns property name by its index
![]() | function GetOptions(const Name: AnsiString): TPOptions; virtual; |
Returns property option set
![]() | function GetProperty(const Name: AnsiString): PProperty; virtual; |
Returns a pointer to property by its name or nil if it is not found
![]() | function GetPropertyByIndex(const Index: Integer): PProperty; virtual; |
Returns a pointer to the property data structure by property index
![]() | function GetType(const Name: AnsiString): TPropertyValueType; virtual; |
Returns property value type
![]() | function GetTypeAsString(Index: Integer): AnsiString; virtual; |
Returns property value type as string
![]() | function GetValue(const Name: AnsiString): AnsiString; |
Returns the value of the specified property
![]() | function GetValueByIndex(Index: Integer): AnsiString; virtual; |
Returns the value of the specified by index property
![]() | function IsEqual(const Props: TProperties): Boolean; |
Returns True if both property sets are equal
![]() | function IsEqualProperty(const Prop1, Prop2: TProperty): Boolean; |
Returns True if both properties are equal
![]() | procedure Merge(const Props: TProperties; OverrideExisting: Boolean); |
Adds a properties set specified by Props to the current set. If OverrideExisting existing values will be overridden by the new ones
![]() | function Read(Stream: TStream): Boolean; virtual; |
Reads the properties from a stream and return True if success
![]() | function RetrieveBinPropertyData(const PropName: AnsiString; Dest: Pointer): Integer; |
Moves a binary property data to a previously allocated Dest and frees memory referenced by property value. Returns size of the binary property in elements or zero if no property or data found.
![]() | procedure SetEnumeratedValueByIndex(Index, ValueIndex: Integer); |
Sets the value index of the specified by index enumerated property
![]() | function SetSetProperty(const Name: AnsiString; var Res: TSet32; const ValuesEnum: AnsiString): Boolean; overload; |
Sets a set of boolean properties added by AddSetProperty with the specified set variable
![]() | function SetSetProperty(const Name: AnsiString; var Res: TSet32; ValuesEnum: TAnsiStringArray): Boolean; overload; |
Sets a set of boolean properties added by AddSetProperty with the specified set variable
![]() | function SetValue(const Name, Value: AnsiString): Integer; virtual; |
Sets the value of the specified property
![]() | procedure SetValueByIndex(Index: Integer; const Value: AnsiString); |
Sets the value of the specified by index property
![]() | function TempCopy(Src: Pointer; Size: Integer): Pointer; |
Creates temporary copy of memory buffer or a new memory buffer if Src is nil and returns a pointer to the copy. The copy will be automatically destroyed when used by RetrieveBinPropertyData or while clearing or destroying TProperties instance. Should be used with binary properties to pass in AddBinary()-like methods.
![]() | function Valid(const Name: AnsiString): Boolean; virtual; |
Returns True if a property with the specified name exists and has a valid value
![]() | function ValueToFloat(const Value: AnsiString): Extended; virtual; |
Returns a floating-point representation of the value with the specified type and enumeration
![]() | function ValueToInteger(ValueType: Integer; const Value, Enumeration: AnsiString): Int32; virtual; |
Returns an integer representation of the value with the specified type and enumeration
![]() | function Write(Stream: TStream): Boolean; virtual; |
Writes the properties to a stream and return True if success
![]() | property TotalProperties: Integer; |
![]() | property Values[const Name: AnsiString]: AnsiString; |
![]() | property TotalProperties: Integer; |
![]() | property Values[const Name: AnsiString]: AnsiString; |
Property values by names
|
Last modified: Jan 6, 2010 |