2024 April Release

Interface CooDictionary Permanent link for this heading

This interface describes methods available when working with dictionaries.

Methods Permanent link for this heading

Return Type

Signature

string

Backup(
  optional  reserved)

void

ClearEntry(
  string key)

boolean

Compare(
  dictionary dictionary)

dictionary

Copy()

void

CopyEntry(
  string key,
  optional dictionary target,
  optional string targetkey)

any[]

GetEntry(
  string key)

integer

GetEntryCount()

string

GetEntryKey(
  integer inx)

string

GetEntryString(
  transaction transaction,
  string key,
  optional object language)

string

GetEntryStringEx(
  transaction transaction,
  string key,
  optional object language,
  optional object[] attributedefinitionlist,
  optional integer flags)

any

GetEntryValue(
  string key,
  optional integer inx)

integer

GetEntryValueCount(
  string key)

object

GetTypeOrAttributeDefinition(
  string key)

boolean

HasEntry(
  string key)

boolean

HasEntryValue(
  string key,
  optional integer inx)

boolean

IsModified()

void

IsMultiple(
  string key)

void

Reset()

void

Restore(
  string data)

void

SetEntry(
  string key,
  optional any[] valuelist)

void

SetEntryValue(
  string key,
  optional integer inx,
  optional any value)

void

SetMultiple(
  string key,
  optional boolean multiple)

void

SetTypeOrAttributeDefinition(
  string key,
  object typeorattributedefinition)

void

Split()

boolean

TestEntry(
  string key)

Methods Permanent link for this heading


Backup Permanent link for this heading

Creates a backup of the dictionary to a string. In case of COMINTERFACE values only well-known interfaces can be backed up/restored. The supported interfaces are CooRuntime, CooAggregate, CooDictionary, CooObject and CooSearchResult. In case of a CooSearchResult only instances which have been created using CooRuntime::SearchObjectsAsync are supported.

string Backup(
  optional  reserved)

Name

Description

reserved

Reserved for later use.

ClearEntry Permanent link for this heading

Clears the entry.

void ClearEntry(
  string key)

Name

Description

key


Compare Permanent link for this heading

Returns true if this dictionary has the same identity as the passed dictionary.
Note: This method does not compare the dictionary values.

boolean Compare(
  dictionary dictionary)

Name

Description

dictionary


Copy Permanent link for this heading

Copies a dictionary.

dictionary Copy()


CopyEntry Permanent link for this heading

Copies an entry to another dictionary.

void CopyEntry(
  string key,
  optional dictionary target,
  optional string targetkey)

Name

Description

key

target

targetkey


GetEntry Permanent link for this heading

Retrieves all values of the entry.

any[] GetEntry(
  string key)

Name

Description

key


GetEntryCount Permanent link for this heading

Retrieves the number of entries.

integer GetEntryCount()


GetEntryKey Permanent link for this heading

Retrieves the key of an entry.

string GetEntryKey(
  integer inx)

Name

Description

inx


GetEntryString Permanent link for this heading

Retrieves the value of the entry as string.

string GetEntryString(
  transaction transaction,
  string key,
  optional object language)

Name

Description

transaction

key

language


GetEntryStringEx Permanent link for this heading

Retrieves the value of the entry as string.

string GetEntryStringEx(
  transaction transaction,
  string key,
  optional object language,
  optional object[] attributedefinitionlist,
  optional integer flags)

Name

Description

transaction

key

language

attributedefinitionlist

flags


GetEntryValue Permanent link for this heading

Retrieves a specific value of the entry.

any GetEntryValue(
  string key,
  optional integer inx)

Name

Description

key

inx


GetEntryValueCount Permanent link for this heading

Retrieves the number of values of the entry.

integer GetEntryValueCount(
  string key)

Name

Description

key


GetTypeOrAttributeDefinition Permanent link for this heading

Retrieves the type or attribute definition of the entry.

object GetTypeOrAttributeDefinition(
  string key)

Name

Description

key


HasEntry Permanent link for this heading

Tests whether the entry has a value.

boolean HasEntry(
  string key)

Name

Description

key


HasEntryValue Permanent link for this heading

Tests whether the entry has a value.

boolean HasEntryValue(
  string key,
  optional integer inx)

Name

Description

key

inx


IsModified Permanent link for this heading

Tests whether the dictionary contains modifications.

boolean IsModified()


IsMultiple Permanent link for this heading

Check an entry for multiple values.

void IsMultiple(
  string key)

Name

Description

key


Reset Permanent link for this heading

Clear all entries of the dictionary.

void Reset()


Restore Permanent link for this heading

Restores the dictionary from a string.

void Restore(
  string data)

Name

Description

data

A Base64-encoded dictionary dump.

SetEntry Permanent link for this heading

Sets all values of the entry.

void SetEntry(
  string key,
  optional any[] valuelist)

Name

Description

key

valuelist


SetEntryValue Permanent link for this heading

Sets a specific value of the entry.

void SetEntryValue(
  string key,
  optional integer inx,
  optional any value)

Name

Description

key

inx

value


SetMultiple Permanent link for this heading

Set an entry to multiple.

void SetMultiple(
  string key,
  optional boolean multiple)

Name

Description

key

multiple


SetTypeOrAttributeDefinition Permanent link for this heading

Sets the type or attribute definition of the entry.

void SetTypeOrAttributeDefinition(
  string key,
  object typeorattributedefinition)

Name

Description

key

typeorattributedefinition


Split Permanent link for this heading

Disables copy-on-write for this instance and existing/new dictionary values by copying them if other references exist.
By default, an instance is copied whenever it is modified and other references exist so that those references remain unaffected and still refer to an unmodified instance. By splitting the instance, references created after the split operation keep referring to this instance even if it is modified. Consequently, splitting an instance is desirable if instance modifications should be visible to other references (instance sharing).

In expressions, all variables are split by default because expression scopes based on dictionaries or aggregates are guaranteed to be split. Therefore, this method is more relevant for other programming languages that do not perform auto-splitting.

void Split()


TestEntry Permanent link for this heading

Tests whether the entry is defined.

boolean TestEntry(
  string key)

Name

Description

key