Versions Compared

Key

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

...

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteEmptyContainer(SdaiServerContext serverContextId,
                                     SdaiContainer     containerId, 
                                     SdaiInvocationId  *edmiInvocationId);

Removes all instances from an instance container identified by its containerId. The removed instances will not be removed from the edmModel.

...

Arguments

...

TypeNameComment
 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

 SdaiContainer

containerId

A numeric containerID that uniquely identifies the container to empty within the remote _EDMdatabase{_}remote  EDMdatabase.

 SdaiInvocationId

edmiInvocationId

Currently not used.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiModel modelId;
 SdaiContainer contId;
 SdaiServerContext myContext;
 SdaiQueryResult queryResult;
 SdaiInteger index = 0, nHits = 10000;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",

...


 "Johnny", "Supervisor", "cf37ftr",

...

 
 "TCP", "9090", "MyServerHost",

...

 
 NULL, NULL, NULL, NULL, NULL, &myContext);

...

 
  
 /* Create a lock container */

...


 rstat = edmiRemoteCreateInstanceContainer(myContext,

...


 modelId, LOCK_CONTAINER, "FLOOR01",

...

 
 "Check out of first floor", &contId, NULL);

...

 
  
 /* Select instances to lock */

...


 rstat = edmiRemoteSelectInstances(myContext,

...


 "DataRepository", "GeneralHospital",

...

 
 "CONSTRUCTION_ELEMENT", "FLOOR = 1",

...

  
 SUBTYPES | ONLY_INSTANCE_IDS,

...

  
 NULL, NULL, NULL, &index, &nHits, &queryResult,

...

  
 NULL, NULL, NULL, NULL);

...

 
  
 /* Put first floor in the container */

...


 rstat = edmiRemoteInstancesToContainer(myContext, 0, contId,

...


 0, queryResult->instanceIds, NULL);

...

 
 edmiFreeQueryResult(queryResult);

...


  
 /* Check out the container */

...


 rstat = edmiRemoteProtectInstance(myContext, contId,

...


 (PUBLIC_READ | GROUP_READ | OWNER_WRITE), NULL);

...

 
 rstat = edmiRemoteSetContainerCheckedout(myContext, contId, NULL);

...


  
 . . .
 /* Manipulate data here */
 . . .
  
 /* Check in the container */
 rstat = edmiRemoteUnsetContainerCheckedout(myContext, contId, NULL);

...


 rstat = edmiRemoteProtectInstance(myContext, contId,

...


 (PUBLIC_READ | GROUP_WRITE | OWNER_WRITE), NULL);

...

 
  
 /* Empty and delete the container */

...


 rstat = edmiRemoteEmptyContainer(myContext, contId, NULL);

...


 rstat = edmiRemoteDeleteInstanceContainer(myContext, contId, NULL);

...


 . . .

 

See also

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