Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

Code Block
languagecpp
themeConfluence
EdmiError edmiCopyAggr (SdaiAggr    sourceAggrId,
                        SdaiInteger sourceIndex, 
                        SdaiAggr    targetAggrId, 
                        SdaiInteger targetIndex, 
                        SdaiInteger maxElementsToCopy); 


Copies the specified number of elements in one (source) aggregate to another (target) aggregate. The target aggregate must be located in a data model element of data type SdaiAggr cannot be copied by this operation. Hence, to copy a nested aggregate, several invocations of the edmiCopyAggr operation are required.
The model that locates the source aggregate must be open for any access and the data model that locates the target model must be open for write access before this operation can be successfully performed. Header:
#include "sdai.h"
Prototype:
EdmiError edmiCopyAggr (SdaiAggr    sourceAggrId,
                        SdaiInteger sourceIndex, 
                        SdaiAggr    targetAggrId, 
                        SdaiInteger targetIndex, 
                        SdaiInteger maxElementsToCopy); 
Arguments:

 

Arguments

...

TypeNameComment
SdaiAggr

sourceAggrId

A numeric aggregateID that uniquely identifies the source aggregate instance in the operation.
The aggregateID is returned when the aggregate is created or it can be retrieved by an EDMinterface get operation.

SdaiInteger

sourceIndex

Specifies the index of the first element to copy from the source aggregate. The index range is:

  • For ARRAY:  lowerBound <= sourceIndex <= upperBound
  • For all other aggregates:

  •    0<= sourceIndex < members in aggregate 
SdaiAggr

targetAggrId

A numeric aggregateID that uniquely identifies the target aggregate instance in the operation.
The aggregateID is returned when the aggregate is created or it can be retrieved by an EDMinterface get operation..

SdaiInteger

targetIndex

Specifies the lower index in the target aggregate to receive the first element from the source aggregate.
This argument is only valid for ARRAY aggregates.
The edmiCopyAggr operation works as an append operation on LIST aggregates.

SdaiInteger

maxElementsToCopy

Specifies the maximum number of elements to copy.
  When <maxElementsToCopy> = 0 then all elements in the source aggregate with an index >= <sourceIndex> will be copied.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
EdmiError rstat;
 SdaiAggr sourceAggrId, targetAggrId;
 ...
 if (rstat = edmiCopyAggr (sourceAggrId,
 0, 
 targetAggrId, 
 0, 
 0)) { 
 /* Error in operation */ 
 printf("\nError in edmiCopyAggr: %s", 
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 ...

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"