IHYCrossPlatformStringList
Overview
The IHYCrossPlatformStringList interface represents a list of strings that can be used in a cross platform environment.
Currently, this interface is not implemented by Hydra classes, so in order to use this interface in your plugins, you need to provide your own implementation. On the Delphi side, you can use the THYFakeIDispatch as a base class, as demonstrated in the following example:
THYStringList = class (THYFakeIDispatch, IHYCrossPlatformStringList)
private
function get_Count: LongInt; safecall;
function get_Strings(aIndex: LongInt): WideString; safecall;
procedure set_Strings(aIndex: LongInt; const value: WideString); safecall;
public
procedure Add(const aString: WideString); safecall;
procedure Insert(aIndex: LongInt; const aString: WideString); safecall;
procedure Remove(aIndex: LongInt); safecall;
property Count: LongInt read get_Count;
end;
Location
- Unit: Hydra.Core.Interfaces.pas
- Ancestry: IHYCrossPlatformInterface | IHYCrossPlatformStringList
Add safecall
Adds a new string to the list.
procedure Add(const aString: WideString)
Parameters:
- aString: String to be added
Count
Gets the number of items in the list.
property Count: Integer read
get_Count safecall
Returns the number of strings.
function get_Count: Integer
get_Strings safecall
Returns a string with specified index.
function get_Strings(aIndex: Integer): WideString
Parameters:
- aIndex: Index of the item.
Insert safecall
Inserts a string to the list at the position specified by the aIndex
paramenter.
procedure Insert(aIndex: Integer; const aString: WideString)
Parameters:
- aIndex: Index of the item
- aString: String to be added
Remove safecall
Removes the string specified by the aIndex
parameter.
procedure Remove(aIndex: Integer)
Parameters:
- aIndex: Index of the item
set_Strings safecall
Sets a value of the item with specified index.
procedure set_Strings(aIndex: Integer; const value: WideString)
Parameters:
- aIndex: Index of the item.
- value: New value of the item.
Count
Gets the number of items in the list.
property Count: Integer read
Add safecall
Adds a new string to the list.
procedure Add(const aString: WideString)
Parameters:
- aString: String to be added
get_Count safecall
Returns the number of strings.
function get_Count: Integer
get_Strings safecall
Returns a string with specified index.
function get_Strings(aIndex: Integer): WideString
Parameters:
- aIndex: Index of the item.
Insert safecall
Inserts a string to the list at the position specified by the aIndex
paramenter.
procedure Insert(aIndex: Integer; const aString: WideString)
Parameters:
- aIndex: Index of the item
- aString: String to be added
Remove safecall
Removes the string specified by the aIndex
parameter.
procedure Remove(aIndex: Integer)
Parameters:
- aIndex: Index of the item
set_Strings safecall
Sets a value of the item with specified index.
procedure set_Strings(aIndex: Integer; const value: WideString)
Parameters:
- aIndex: Index of the item.
- value: New value of the item.
- THYFakeIDispatch
-
IHYCrossPlatformStringList Interface
- .NET
- Delphi