Overview
Warnings
  • You should never include the Component Interface brahms-component.h directly, but one of the bindings (even if the almost-transparent C binding). This will allow future changes to remain transparent to your code, and future bug-fixes to be applied to your code without you having to change it.

The Component Interface, specified in C, defines the interface between Components (Process, Data or Utility) and the Engine (see Anatomy). The Component Interface is, therefore, the only part of the BRAHMS framework that the component developer needs to (or can) interact with, and all the reference material the developer needs to begin authoring components is in this section. Correspondingly, there is no part of BRAHMS that can be built without including the Component Interface.

Interaction with the Component Interface should, however, be made via one of the Component Bindings. These provide the same interface (functionally) but in a different language. Authoring in C, you should use the 1266 binding, even though it adds only a few macros on top of the Component Interface. Authoring in C++, you could just use the C binding, but the 1199 C++ binding provides the interface in a format that is much more natural for the C++ developer (or, the 2510 binding provides a simplified interface for straightforward processes).

Notes
  • If compiling in C++, all of the Component Interface (except the numeric types for compatibility reasons) is placed in the namespace brahms, so you will need to access the symbols accordingly.

Constants

The following build-control symbols must be defined to use the Component Interface.

  1. __WIN__, __GLN__, __OSX__=Exactly one of these must be defined before the Component Interface is included.
  2. BRAHMS_BUILD_TARGET=Must be defined, but does not matter to what. Is defined differently by each binding, for instance, and by the engine, etc. Is used to help persuade the user not to include brahms-component.h directly.
  3. BRAHMS_BUILDING_ENGINE=Must be defined when building the BRAHMS engine so that imports/exports get hooked up correctly.

The following build-control symbols are defined in the Component Interface.

  1. __NIX__=Defined if __GLN__ or __OSX__ is defined.
  2. BRAHMS_COMPONENT_INTERFACE_REVISION=Equal to the integer revision number of the Component Interface. All other parts adopt this as their revision number when compiled, so it is effectively a single number indicating the revision of the entire framework.
  3. BRAHMS_ARCH_BITS=32 or 64, accordingly. If this does not define correctly automatically, you can define it in your makefile.