Advanced C++ concepts

Many of the more advanced concepts and keywords of C++ have no real equivalent in C object code. In particular, scope controls (such as protected members and private inheritance) and const methods exist mainly to tell the C++ compiler how things are supposed to be used; in the PODS C environment, you must enforce such rules yourself.

The closest equivalent to a namespace is a careful partitioning of header files. Features such as function overloading (including default parameters), templates, and operator overloading, are not available in C. In particular, methods with the same name but different signatures, on different objects, can cause problems that might not be caught because of all the casting. This problem is much worse when IDL-generated macros are involved, because the result is conflicting macro definitions.

The PODSExceptionMgr provides a very basic level of exception handling, much closer to Windows Structured Exception Handling or the C exception handling implemented by compilers like Borland C for 16-bit Windows. This mechanism is primarily provided as a way to interface with JavaScript exception handling, not as a replacement for C++ exceptions.

Caution

Because C does not provide destructors, you must explicitly control the proper destruction of objects in try/catch/finally blocks, specifically guaranteeing that no memory will be leaked in any code path.