PropertyHandle :: AddGlobal - Add instance globally to collection
The instance handle refers to an instance according to the structure defined in the property handle.
Implementation overview
- Add instance
PropertyHandle :: AddGlobal ( newinst, set_pos0_w=AUTO ) - Add instance by key value
PropertyHandle :: AddGlobal ( sortkey, identkey_w=Key(), init_inst=YES ) - Add instance by key and position
PropertyHandle :: AddGlobal ( set_pos0, sortkey, identkey_w=Key(), init_inst=YES ) - Create instance at position
PropertyHandle :: AddGlobal ( set_pos0_w=AUTO, init_inst=YES )
Implementation details
-
Add instance
::Instance PropertyHandle  :: AddGlobal ( ::Instance newinst, int32 set_pos0_w=AUTO )
- newinst
- New instance
The new instance refers to the data area of the instance to be added to a collection. The instance contains a reference to a properly structured area.
You can pass the instance as (void *) which will be automatically converted into an instance handle. Only attributes of the new instance are added to the database. References or relationships in the new instance will be ignored (if there are any).
- set_pos0_w
- Position in collection
The position of an instance in a collection depends on the selected index. if the collection is unsorted the position is the only way for accessing the instance.
For sorted collections the position is determined according to the instance key. If is a contradiction between position and key value the position will be ignored.
Special positions are
CUR_INSTANCE (-1) refers to the currently selected instance. If no instance is selected it refers to the first instance.
FIRST_INSTANCE (0) refers to the first instance in a collection according to the selected index (sort order).
FIRST_INSTANCE (0x7fffffff) refers to the last instance in a collection according to the selected index (sort order).
Default: AUTO
to list
- newinst
- New instance
-
Add instance by key value
::Instance PropertyHandle  :: AddGlobal ( ::Key sortkey, ::Key identkey_w=Key(), logical init_inst=YES )
- sortkey
- Sort key value
The key is provided in the internal key format. When necessary the key value can be converted from a string into the internal format using the ({.r pib.StringToKey}()) function. Regardless on the type key values are passed as (char *) areas.
- identkey_w
- Ident key value
The key is provided in the internal key format. When necessary the key value can be converted from a string into the internal format using the ({.r pib.StringToKey}()) function. Regardless on the type key values are passed as (char *) areas. NULL indicates that no key value has passed.
Default: Key()
- init_inst
- Add initialized instance
The option forces the function to use the internal instance area for creating a new instance in the collection. This instance has been provided using the GetInitInstance() function and has to be filled by the application before calling the Add() function.
Default: YES
to list
- sortkey
- Sort key value
-
Add instance by key and position
::Instance PropertyHandle  :: AddGlobal ( int32 set_pos0, ::Key sortkey, ::Key identkey_w=Key(), logical init_inst=YES )
- set_pos0
- Position in collection
The position of an instance in a collection depends on the selected index. if the collection is unsorted the position is the only way for accessing the instance.
For sorted collections the position is determined according to the instance key. If is a contradiction between position and key value the position will be ignored.
Special positions are
CUR_INSTANCE (-1) refers to the currently selected instance. If no instance is selected it refers to the first instance.
FIRST_INSTANCE (0) refers to the first instance in a collection according to the selected index (sort order).
FIRST_INSTANCE (0x7fffffff) refers to the last instance in a collection according to the selected index (sort order).
- sortkey
- Sort key value
The key is provided in the internal key format. When necessary the key value can be converted from a string into the internal format using the ({.r pib.StringToKey}()) function. Regardless on the type key values are passed as (char *) areas.
- identkey_w
- Ident key value
The key is provided in the internal key format. When necessary the key value can be converted from a string into the internal format using the ({.r pib.StringToKey}()) function. Regardless on the type key values are passed as (char *) areas. NULL indicates that no key value has passed.
Default: Key()
- init_inst
- Add initialized instance
The option forces the function to use the internal instance area for creating a new instance in the collection. This instance has been provided using the GetInitInstance() function and has to be filled by the application before calling the Add() function.
Default: YES
to list
- set_pos0
- Position in collection
-
Create instance at position
::Instance PropertyHandle  :: AddGlobal ( int32 set_pos0_w=AUTO, logical init_inst=YES )
- set_pos0_w
- Position in collection
The position of an instance in a collection depends on the selected index. if the collection is unsorted the position is the only way for accessing the instance.
For sorted collections the position is determined according to the instance key. If is a contradiction between position and key value the position will be ignored.
Special positions are
CUR_INSTANCE (-1) refers to the currently selected instance. If no instance is selected it refers to the first instance.
FIRST_INSTANCE (0) refers to the first instance in a collection according to the selected index (sort order).
FIRST_INSTANCE (0x7fffffff) refers to the last instance in a collection according to the selected index (sort order).
Default: AUTO
- init_inst
- Add initialized instance
The option forces the function to use the internal instance area for creating a new instance in the collection. This instance has been provided using the GetInitInstance() function and has to be filled by the application before calling the Add() function.
Default: YES
to list
- set_pos0_w
- Position in collection