Introduction to C++ Express API

The EDM C++ EXPRESS API is a C++ library for handling EXPRESS modeled data stored in an EDM database. The main characteristics of the API are:

  • Early binding data definitions - EDMsupervisorâ„¢ has a generator that generates C++ classes that represent the entity and defined types in the EXPRESS schema in question.
  • Designed to handle simple as well as the most comprehensive EXPRESS schemas defined so far.
  • Two different memory models:
    • C++ Objects in memory (OIM). The C++ class representations of the EDM database instances must be read into memory before they can be used by the program. New objects are created in memory and written to the database later by the method writeAllObjectsToDatabase. Programs must declare:   
         using namespace OID; 
    • C++ Objects in the database (OID). The C++ Objects are handles to objects in the database. The get and put methods for the attributes of the objects are using EDMinterfaceâ„¢ to read and write attribute values. To use this memory model one must compile the project with the preprocessor directive USE_EDMI. Programs must declare:

using namespace OIM;


  • The use of a memory allocator (CMemoryAllocator) that provides efficient memory management is mandatory.
  • The generated C++ classes do not have destructors. This implies that it is not possible to delete (release memory ) of single objects. Objects are released collectively by deleting the CMemoryAllocator object or by executing the Reset method of the CMemoryAllocator class. The benefit of this way of deleting objects is better performance and almost no probability for memory fragmentation.


A project using the C++ EXPRESS API is started with generating a C++ header file (.hpp) and a corresponding implementation (.cpp) file from the EXPRESS schema that shall be used in the project.
The EDMsupervisorâ„¢ has the command Schemata->Generate Interface->Cpp 2010 for this purpose. The header file will contain one C++ class for each entity and one type definition for each type in the EXPRESS schema.