The C++ wrapper is a rather thin layer around the netpp C library. More...
Data Structures | |
class | Value |
A runtime value class. More... | |
class | Property |
Property class. More... | |
class | Device |
The NETPP device class. More... |
It introduces three classes, listed with their C equivalents:
Some functions return an error code, some don't, but throw exceptions. The reason for this difference and a somewhat missing beauty of the API: Functions that can cause an exception are normally called at initialization of the program, for example when the GUI is initialized. Thus, each GUI element (text controller, etc.) is assigned a Property, or the property token. If a failure occurs during this initialization, it is mostly considered a reason to break early.
During the program, Property::setValue() and Property::getValue() actions normally occur. Therefore, these return error codes instead of throwing exceptions, as these errors are less critical. Thus, for stability over longer terms, it is rather desired to evaluate errors instead of using an exception. This is debatable.
Note that for scripting functionality, a python wrapper is available. See python/ folder of the netpp distribution.