Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Development Utilities

The entities defined in this section are targeted to help development and testing instead of representing usual classes embedded in your application.

Deprecation Management

ELM provides a small macro found in <elm/deprecated.h>, called DEPRECATED.

When put at the start of a function body, it displays a warning deprecation message the first time it is called.

#include <elm/deprecated.h>
class MyClass {
public:
void myDeprecatedFunction(void) {
DEPRECATED
// body of the function
}

Helper Methods

ELM provides several helper method for using the different classes. They are prefixed by a double underscore and all only compiled if a matching define is not provided.

Testing

This module provides a poor, but existing, solution to unit testing in C++. It provides macros and classes to perform statistics on unit testing and makes automatic some test procedures.

The example show how the module works:

#include <elm/util/test.h>
void my_test(void) {
CHECK_BEGIN("my test")
// test 1
CHECK(result1 == expected1);
// test 2
CHECK(result2 == expected2);
...
}

The test must be enclosed in CHECK_BEGIN / CHECK_END pair and the test case name must be given. Then the test are performed ending with a call to a macro allowing to test and record result of the test.

The existing macro are:

There are also some useful macros as: