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

Version 1 Current »


 
Returns the folders aggregate of the model contents instance in the scratch model. The scratch model can contain instances of any available type (any entity definition) in an EDMdatabase. All scratch instances in an EDMdatabase are located in the scratch model.
The folders aggregates contains all scratch entity extent instances in an EDMserver session.
The scratch model belongs to an EDMserver session, hence the scratch model (and all scratch instances are not persistent in an EDMdatabase. The scratch model will be deleted when the open EDMserver session is closed and a new empty scratch model will be created when a new EDMserver session is opened.
All EDMinterface read access operations that are applicable on SET aggregates are applicable to the returned aggregate.
EXPRESS:
ENTITY sdai_model_contents; 
instances : SET OF entity_instance; 
folders : SET OF entity_extent;
populated_folders : SET OF entity_extent; 
END_ENTITY; 
 
Related functions: edmiGetScratchEntityExtent , edmiGetScratchEntityExtentBN , edmiGetScratchInstances , edmiGetScratchPopulatedFolders
Header:
#include "sdai.h"
Prototype:
SdaiAggr edmiGetScratchFolders(void);
Arguments:
Returns:
A numeric aggregateID of datatype SdaiAggr that uniquely identifies the created aggregate in the EDMdatabase is the returned function value. The aggregateID has the following values:
aggregateID !=0 : Operation successfully performed.
aggregateID = 0: Error in operation. Use sdaiErrorQuery to get error code and edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiAggr scratchFoldersId;
SdaiErrorCode rstat;
SdaiInstance id;
SdaiInteger index, members;
. . .
scratchFoldersId = edmiGetScratchFolders();
if (! scratchFoldersId) {
/* Error in operation */ 
printf("\nError: %s in edmiGetScratchFolders\n", 
edmiGetErrorText(sdaiErrorQuery())); 
goto error; 
}
members = sdaiGetMemberCounts(scratchFoldersId);
/* Print instanceID of all scratch entity extent instances */
for (index = 0; index < members; index++) {
edmiGetAggrElement(scratchFoldersId, index, sdaiINSTANCE, &id); 
rstat = sdaiErrorQuery(); 
if (rstat) { 
/* Error in operation */ 
printf("\nError: %s in edmiGetAggrElement\n", 
edmiGetErrorText(sdaiErrorQuery())); 
goto error; 

printf ("\nScratchEntityExtentID: %lu", id); 
}
. . .

  • No labels