Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
titleC++ Imports
#ifndef _<FILENAME>_H
#define _<FILENAME>_H

#ifndef __cplusplus
#error This is a C++ include file and cannot be used from plain C
#endif

//Base component implementation, including container services and component lifecycle infrastructure
#include <acscomponentImpl.h>


//Skeleton interface for server implementation
#include <<Interface>S.h>


//Error definitions for catching and raising exceptions
#include <ServiceErr<SYSTEMErr.h>
#include <<Interface>Err.h>

...


#endif

...

Code Block
languagecpp
titleC++ Component Interaction
//Shared
import#include alma.<Module>.<Interface>;
import alma.<Module>.<Interface>Helper<IDLName>C.h;

//By Name
<Module>::<Interface>_var comp = this->getContainerServices()->getComponent<<Module>::<Interface>>("<Name>");

//By Interface. Must be at least one component configured as default!
<Module>::<Interface>_var comp = this->getContainerServices()->getDefaultComponent<<Module>::<Interface>>("IDL:alma/<Module>/<Interface>:1.0");

//Release Components
this->getContainerServices()->releaseComponent(comp->name());

...