C++ programming guidelines

Follow these rules and guidelines when you edit the source code for your C++ client and server projects:
  • Use the following sets of methods in your code to ensure that your code is portable between the client and server projects:

    For additional functionality, use the DataBlade® API. For information, see the HCL OneDB™ DataBlade API Programmer's Guide.

  • In the server project, use C++ only to implement the opaque type support routines that you intend to encapsulate as ActiveX value objects. Do not use C++ to implement any other DataBlade module objects.
  • Do not use the HCL OneDB Object Interface for C++ Programmer's Guide in server code.
  • Do not change the function headers or parameter lists of any of the support routines for the opaque type.
  • Do not use virtual methods or virtual base classes (either direct or inherited).
  • In the server project, check for routine arguments with null values. The server does not call a routine that has an argument with a null value.
  • In the client project, if your project does not need to handle null values, you can remove all calls to IsNull(), SetNull(), and SetNullFlag() in the generated code. Then make sure all constructor functions call SetNotNull().
For a list of restrictions on the C++ code you can generate with BladeSmith, see Opaque type limitations for C++/ActiveX.
Important: It is recommended that developers create DataBlade modules in C++ only for client projects and for server projects that use HCL OneDB on Windows™ only.