company logo

PropertyHandle :: AddGlobal - Add instance globally to collection

Return value:  Instance Handle (   )

The instance handle refers to an instance according to the structure defined in the property handle.

Implementation details

  1. 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
  2. to list
  3. 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
  4. to list
  5. 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
  6. to list
  7. 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
  8. to list