Home2L - C/C++ API  v0.9-0-gde86* (2018-11-30)
Clever Tools for a Private Smart Home
Home2L - C/C++ API Documentation

This is the documentation of the C/C++ API of the Home2L suite. It is meant as a reference for developers of

The main documentation of the Home2L project can be found in the Home2L Book. Automatition rules are best written using the Python API.

To get started, navigate to the Modules page.


Coding Conventions

Obviously, the source files are no pure C, but have a C++ suffix, are compiled with a C++ compiler, and contain classes. However, for portability, efficiency and readability reasons, C++ language features are used only in a limited way. The reason for using C++ at all instead of pure C are the base classes and the UI modules, where operand overloading (base classes) and inheritance with virtual mathods (UI classes) are very helpful to improve the readability of code.

For these reasons, the following conventions apply:

  1. All C code is C99-compliant and C++-compliant. All C++ code complies to C++98 (the GCC default in before GCC 6.1).
  2. No classes or templates from standard C++ libraries are used (STL/libstdc++).
  3. From C++, only the following syntax constructs are generally used:
    • classes with constructors, destructors, methods, either virtual or not
    • operators 'new' and 'delete'
    • no reference arguments to methods (unless for copy constructors)
  4. Only in module Base, the following additional constructs may occur:
    • overloaded operator []
    • templates (to be used very carefully)