Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

FUNCTION xpfAggregateToString(aggrIdOrInstanceHashTableIndex : GENERIC;
                              options                        : INTEGER;
                              attributeIdOrAttributeName     : GENERIC;
                              stringDelimiter                : STRING;
                              defaultStringForUnsetValue     : STRING; 
                              integerAndInstancePrintFormat  : STRING;    
                              stringPrefix                   : STRING;
                              stringSuffix                   : STRING;
                              elementIndex                   : INTEGER;
                              elements                       : INTEGER)
                              resultString                   : STRING;
                

This function constructs (concatenates) a string from a given set of elements. The actual elements can be in an aggregate or in an EDMinstanceHashTable. This function will perform the "string concatenation" operation with better performance and "less consumption" of virtual memory than using ordinary string concatenation operations (str1 + str2). This function may be invoked with a variable number of arguments, i.e., it may be invoked with 1 to 10 number of arguments.

 

Arguments


1TypeNameComment
2
GENERIC
aggrIdOrInstanceHashTableIndex
 This argument defines the elements that should be used to construct the resulting string. It can be an aggregateId or an instanceHashTableIndex. When an aggregateId is specified, the actual aggregate elements must be either INSTANCE, INTEGER or STRING. When the aggregate elements are INTEGER data type it will be transferred to a string by a "printf" operation. INSTANCE elements value can be handled exactly like an INTEGER value, or by specifying an attributeName or attributeId in the "attributeIdOrAttributeName" argument, the actual instance attribute value will be used to construct the result string. The legal data types of such an attribute are STRING, INSTANCE or INTEGER. When an INTEGER or INSTANCE value is transferred to a string, the actual "format specification" can be specified in the "integerAndInstancePrintFormat" argument. The default for this "format specification" is "%lu", when the "aggrIdOrInstanceHashTableIndex" is specified as an instanceHashTableIndex, the operation will behave in the same way as for an aggregate of instances.
3
INTEGER
optionsOptional argument. Default value is INDETERMINATE (?). All the available options are only valid when the actual value is an instance attribute value
4
GENERIC
attributeIdOrAttributeNameOptional argument. Default value is INDETERMINATE (?). Specifies an attribute of the instances that constituteds the elements that are used to construct the result string. The data type of the actual attribute data value must be STRING, INSTANCE or INTEGER. The "attributeIdOrAttributeName" can be specified by the attribute name or by the attributeId.
5
STRING
stringDelimiterOptional argument. Default value is " " (white space). Defines the delimiter string that is appended after each string that constitutes the result string. When no delimiter is wanted, an empty string ('') must be specified,
6
STRING
defaultStringForUnsetValueOptional argument. Default value is INDETERMINATE (?). Defines the string that will be the actual string value when the actual instance's attribute value is unset.
7
STRING
integerAndInstancePrintFormatOptional argument. The defult value is "%lu". Defines the "format specification" used in the "printf" operation when the actual element is an INSTANCE or an INTEGER.
8
STRING
stringPrefixOptional argument. Default value is INDETERMINATE (?). This argument defines the prefix that will be pretended to all strings that constitutes the result string
9
STRING
stringSuffixOptional argument. Default value is INDETERMINATE (?) This argument defines the suffix string that will be appended to all strings that constitutes the result string
10
INTEGER
elementIndexOptional argument. Default value is 1 meaning first element in the specified aggregate. Specifies the first element in the actual aggregate that is used to construct the result string.This argument has no effect when the  "aggrIdOrInstanceHashTableIndex" argument specifies an EDMinstanceHashTable.
11
INTEGER
elementsOptional argument. Default value is INDETERMINATE (?) meaning "include last element" in the specified aggregate specifies the last element in the actual aggregate that is used to construct the result string. This argument has no effect when the  "aggrIdOrInstanceHashTableIndex" argument specifies an EDMinstanceHashTable.

Return Value


 

TypeNameComment
STRINGresultStringThe constructed (concatenated) string will be return when the function is successfully performed. When the function fails,INDETERMINATE (?) will be returned. Exception handling should be used to handle error conditions in the actual xpfAggregateToString() operation.

Options


 OptionComment
1xpxSKIP_UNSET_VALUEInstances with the actual attribute value unset will be skipped
2xpxERROR_ON_UNSET_VALUEThe xpfDefineLongString() or xpxAddToLongString() functions will fail with an error condition when the actual instance's attribute value is unset.
3xpxINSTANCEID_FOR_UNSET_VALUEThe actual instanceId (transferred to a string) will be used as the string when the actual instance's attribute value is unset.
4xpxDELIMITER_FOR_UNSET_VALUEThe defined "stringDelimiter" value will be used as the string when the actual instance's attribute value is unset.
5xpxSKIP_PREFIX_FOR_UNSET_VALUEThe defined "stringPrefix" will be skipped for unset attribute values
6xpxSKIP_SUFFIX_FOR_UNSET_VALUE

The defined "stringSuffix" will be skipped for unset attribute values

 

 

 

Example


<Missing Example>

 

See also

Filter by label

There are no items with the selected labels at this time.

 

  • No labels