CX_DICTIONARY
Attention: This class is obsolete and should no longer be used. Please use CX_OBJECT_DICTIONARY_ML instead.
Class hierarchy
- CX_CLASS
- CX_DICTIONARY
Description:
The CX_DICTIONARY class allows objects to be registered under any multilingual designations. An object can have any number of identifiers, and any number of objects can be registered in the dictionary under one identifier.
The objects can be retrieved very quickly by means of the names assigned to them.
The dictionary also manages a back-reference, so that you can obtain all the names under which an object was entered.
When searching the dictionary, a distinction is made between upper and lower case letters (case sensitive).
CX_DICTIONARY belongs to the family of dictionary classes.
Code example:
CreatePersObject(CX_DICTIONARY) -> dict, "D1" dict Put(name) Prompt(RED, FONT(0), 235, 22, "Key:") String(key, 306, 22, 300) [ SELECT: 0 GetValue 1 dict Call(Query) GetElement Dup if FillWindow // find object in dictionary ] .................................... Button(bk, 600, 22, "s_ready.bmp") [ SELECT: GetValue(, key) object dict Call(Enter) // (key, object) into dictionary ] ................................... ObjectList(dict, AUTO_POSITION, 11, 11, 620, 80) [ INITIALIZE: // display dictionary entries "CX_KEYWORD::LanguageKey(0)" SetFormat // key in 0th language "CX_KEYWORD::LanguageKey(1)" SetFormat // key in 1st language [ "CX_KEYWORD::GetObject()" NO_DRAIN, COLOR CYAN ] SetFormat // the object dict Call(GetAllKeys) FillObox DOUBLE_CLICK: [] OboxEdit // edit dictionary entry ]
Function | MA* | Parameters | Return | Brief description | |
---|---|---|---|---|---|
Cardinalities | INTEGER | ||||
CountBadKeys | INTEGER | ||||
Enter | STRING, OBJECT | insert new entry for the object, if exactly this entry (term, object) already exists -> error message | Specify term in the current language | ||
EnterAlways | STRING, OBJECT | for test purposes only ! like Enter, but without test, double entries possible | |||
EnterIfNotThere | STRING, OBJECT | like Enter, if exactly this entry (term, object) already exists -> no operation | |||
EnterML | MULTIPLE_STRING, OBJECT | like Enter | Specify terms for all languages | ||
EnterMLIfNotThere | MULTIPLE_STRING, OBJECT | like EnterIfNotThere | |||
Exists | STRING, OBJECT | INTEGER | Tests whether the object is entered in the dictionary under the term | Specify term in the current language | |
Export | STRING | ||||
GetAllKeys | COLLECTION | Return: all dictionary entries as CX_KEYWORDs | |||
GetDuplicateKeys | COLLECTION | Return: all duplicate entries as CX_KEYWORDs | |||
GetLonelyKeys | COLLECTION | Return: all entries without relation to the object | |||
GetNames | OBJECT | COLLECTION | Return: all entries for an object as CX_KEYWORDs | ||
Name | * | force unique input for data field name | |||
NewKey | OBJECT | OBJECT | new entry = create new object CX_KEYWORD | ||
Query | STRING, INTEGER | COLLECTION | find all objects for a search term | Search argument in the current language | |
QueryByType | STRING, STRING, INTEGER, INTEGER | COLLECTION | like query, filter result by class | Search argument in the current language | |
RebuildReverseRelation | Restore backward links. | ||||
Remove | MULTIPLE_STRING, OBJECT | Delete entry for the object | |||
RemoveDuplicateKeys | Delete all duplicated entries | ||||
RemoveLonelyKeys | delete all entries without relation to the object | ||||
RemoveNames | OBJECT | delete all entries for the object | |||
RemoveNamesOfDeletedObjects | delete all entries that refer to a logically deleted object | ||||
Clone | INTEGER | OBJECT | Creates a new dictionary with the same entries for the same objects | ||
string | INTEGER | CX_STRING | Returns the string representation of the object |
- MA = Member Access function,
grey background = inherited function
- I = Indexable data field,
grey background = inherited data field
Module | Brief description |
---|---|