C++ applications use the same eXtremeDB DDL processor as C applications to define the database schema. Please refer to the C Schema Definition page for details.
For C++ applications, the
mcocomp
-hpp
or-cpp
option can be specified to cause generation of C++ "wrapper" class implementations in file<db_name>.hpp
in addition to the C header and implementation files<db_name>.h
and<db_name>.c
.Please refer to the C++ Quick Start page for a brief description of the steps of Database Definition, and the DDL pages for a detailed explanation of the eXtremeDB Data Definition language.
C++ Wrapper Classes
As explained in the C++ Quick Start, the C++ API is a "thin" wrapper around the C API. In fact, the generated C++ implementation file (
<db_name>.hpp
) defines a namespace<db_name>
and a C++ class for each database class defined in the schema file.C++ SQL Classes
Often the eXtremeDB C++ API is chosen, in preference to the C API, for eXtremeSQL applications. The C++ API provides convenient encapsulation of the low-level C SQL API in the form of class McoSqlEngine. Please refer to the C++ Embedded SQL Quick Start for a brief introduction to the use of McoSqlEngine.