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:
- The object methods that are made available as ActiveX custom methods; see Add project-specific logic to the source code
- The internal object methods that are not made available as ActiveX custom methods; see Internal object methods
- The generated C++ support library; see C++ support library
For additional functionality, use the DataBlade® API. For information, see the Informix® 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 Informix® 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 Informix® on Windows™ only.