CINOSContainer declaration file.
More...
#include <inos.h>
#include <inos_lib.h>
#include <cinoseventlogger.h>
Go to the source code of this file.
|
#define | ER_INOS_CONTAINER_OK 0x00000000 |
|
#define | ER_INOS_CONTAINER_REJECTED 0x00000001 |
|
#define | ER_INOS_CONTAINER_FAILED 0x00000002 |
|
#define | ER_INOS_CONTAINER_TYPE_UNKNOWN 0x00000003 |
|
#define | ER_INOS_CONTAINER_CHECK_FAILED 0x00000004 |
|
#define | INOS_CONTAINER_CLASS(aClass, aType, aBase) |
|
#define | INOS_CONTAINER_CLASS_CHECK(aClass, aType, aBase) |
|
#define | INOS_CONTAINER_CLASS_MI(aClass, aBaseClass, aType, aBase) |
|
|
typedef void *(* | TCreateEntity) (const char *apName, const char *apParam) |
|
typedef bool(* | TCheckCheckTarget) (const char *apParam) |
|
CINOSContainer declaration file.
- Author
- Ch. Hirzel
- Copyright
- Copyright © 2016 Indel AG. All rights reserved.
-
This software is licensed on a non-exclusive basis for use on Indel products only. If the Source Code has been provided by Indel, the software may be modified or further developed, exclusively for the use on Indel's products. For evaluation purposes of the aforementioned development or modification of the software, the software may temporarily be used on third party products. Any further use of this software, its modification or development on non-Indel products is strictly prohibited.
Declaration of the CINOSContainer class that handles the base functionality of a container.
◆ INOS_CONTAINER_CLASS
#define INOS_CONTAINER_CLASS |
( |
|
aClass, |
|
|
|
aType, |
|
|
|
aBase |
|
) |
| |
Value: void* Create##aClass(const char* apName, const char* apParam) \
{ return new aClass(apName, apParam);}; \
Definition cinoscontainer.h:220
Used to register a container element class 'aClass'. Registering a class by this macro allows the creation of instances at runtime just by defining aType. E.g. new instances of aClass can be created at runtime by performing INCO calls.
- Parameters
-
aClass | The class to instantiate |
aType | The "name" of the class. This name must be passed when an instance of this class shall be created. |
aBase | The "base type" of this element class. The base type is used to make aClass part of a "family of classes". E.g. A concrete machine implementation, say "McRobotExample" specifies which "base classes" it allows to become modules of this machine. Therefore, the McRobotExample machine may define the string "McExBase". Then, a request to create an instance of a submodule for that machine, will only allow the creation of classes which's aBase matches "McExBase". Commonly used generic values are "StBase" and "McBase". |
◆ INOS_CONTAINER_CLASS_CHECK
#define INOS_CONTAINER_CLASS_CHECK |
( |
|
aClass, |
|
|
|
aType, |
|
|
|
aBase |
|
) |
| |
Value: void* Create##aClass(const char* apName, const char* apParam) \
{ return new aClass(apName, apParam);}; \
◆ INOS_CONTAINER_CLASS_MI
#define INOS_CONTAINER_CLASS_MI |
( |
|
aClass, |
|
|
|
aBaseClass, |
|
|
|
aType, |
|
|
|
aBase |
|
) |
| |
Value: template <typename T> \
void* Create##aClass(const char* apName, const char* apParam) \
\
{ return static_cast<T*>(new aClass(apName, apParam));}; \
Like INOS_CONTAINER_CLASS (see above), but for types using multiple inheritance. E.g. if aClass derives from more than one base class, it must be registered by this macro instead of INOS_CONTAINER_CLASS. Otherwise, the behavior when creating an object will be undefined and will usually result in a trap. Note that this macro can be used even if aClass doesn't use multiple inheritance.
- Parameters
-
aBaseClass | The base class used by the container. E.g. CINOSMcRobot, CINOSMcModule, CINOSTaskEx, etc. |