PocoCapsule is an inversion of control (IoC) container, a.k.a dependency injection (DI) framework, as well as a domain specific modeling (DSM) engine. The main goals of PocoCapsule are to support declarative assemblying/deploying/configuring of component-based C/C++ applications and also to provide a platform that can easily be used even by domain users to quickly build other component frameworks in a descriptive modeling approach.
PocoCapsule is non-invasive and enforces neither a proprietary component programming model (such as their base classes or a set of pre-defined methods) nor any component-container couplings (such as registry or context lookup). It accepts container-agnostic plain-old C/C++ objects (POCO) as components. Examples of such components include instances of arbitrary C++ classes, template classes (such as all STL container classes), K&R structs, arrays, and even functions (as function pointers).
PocoCapsule supports almost all useful IoC invocation scenarios regardless the numbers of their value/reference inject arguments (in various types, aggregated types, and even user defined types). These invocations include:
- Constructors (and destructors in lifecycle control) of arbitrary C++ classes/structs/unions/arrays.
- Global C or C++ functions, operators, and variables.
- Non-static member functions and operators of C++ classes/structs.
- Static member functions of C++ classes/structs.
- Non-static data members of C++ classes/structs.
- Static data members of C++ classes/structs.
- Union field accesses.
- Array (as well as C++ classes/structs with index operator) indexed accesses.
- constructors of C++ classes/structs/unions/arrays
- global or static factory methods
- non-static factory methods of factory-beans
- global or static ref duplicate methods
- non-static duplicate methods of the beans themselves
- global or static ref release/destroy methods (and destructors)
- non-static ref release/destroy methods of destroy-beans.
- non-static release/destroy methods of the beans themselves.
PocoCapsule seamlessly supports user-defined domain specific modeling schemas through model transformations. These DSM schemas describe applications architectures at higher abstraction levels. This mechanism not only largely avoids problems of the verbose, error-prone, and primitive core IoC schema but also makes the PocoCapsule a framework that can be used by domain users to quickly and easily build other user-defined or committee-designed component frameworks. Several such DSM frameworks are presented in PocoCapsule out-of-the-box or from third parties, such as:
- PocoCapsule for WebServices: supports wiring and deployment of component-based WebServices applications. It also includes an implementation of the OpenSOA's SCA (now OASIS OpenCSA) assembly container (SCA as a DSM). See the article and examples.
- PocoCapsule for robotic systems: supports wiring and configuring of robotic component applications. It also includes an assembly model for OMG-RTC applications. See the article and examples in user-defined component model and OMG-RTC component model.
- PocoCapsule for SDR: supports wiring and configuring of software defined radio (SDR) waveform applications. It also includes an implementation of the assembly container of JTRS-SCA core framework (CF). See the article and examples in both non-CORBA non-JTRS-SCA models and JTRS-SCA (CF) component and assembly models.
- PocoCapsule for OMG-DDS: A deployment model for component based OMG Data Distribution Service (OMG-DDS) applications. See the example.
- PocoCapsule for CORBA: (available from Pocomatic Software) supports assembly and deployment of component-based CORBA server and OMG-Event/Notification applications. See examples