Public Member Functions

HelloWorld Class Reference
[ACS Components Examples]

#include <acsexmplHelloWorldImpl.h>

Inheritance diagram for HelloWorld:
Inheritance graph
[legend]
Collaboration diagram for HelloWorld:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HelloWorld (const ACE_CString &name, maci::ContainerServices *containerServices)
virtual ~HelloWorld ()
virtual void displayMessage ()
virtual void badMethod ()
 HelloWorld (const ACE_CString &name, maci::ContainerServices *containerServices)
virtual ~HelloWorld ()
virtual void displayMessage ()

Detailed Description

This class shows how to make an ACS Hello World component. It provides one synchronous method: displayMessage() which just prints "Hello World" to the command-line where the container that activated an instance of this component was started from. badMethod() is a trivial method showing developers how to raise ACS (i.e., CORBA) exceptions.

All components should inherit from CharacteristicComponentImpl or it's superclass, ACSComponentImpl, to remain compatible with ACS tools such as objexp (i.e., a GUI used to manipulate components). This class also derives from POA_acsexmplHelloWorld::HelloWorld which is a class automatically generated by CORBA from HelloWorld's IDL file.

Version:
"@(#) $Id: acsexmplHelloWorldImpl.h,v 1.99 2010/10/22 14:10:30 rbourtem Exp $"

This example is unique because it is derived from CharacteristicComponent's superclass, ACSComponent. This is the CORBA stub client header for ACSErrTypeCommon.idl where the definition of the CORBA exception is found. The empty CORBA servant interface, POA_acsexmplHelloWorld::HelloWorld, is obtained from this header file and is automatically generated from HelloWorld's Interface Definition File (i.e., acsexmplHelloWorld.idl) by CORBA. This class define an IDL module for ttesting persistence of CORMA references


Constructor & Destructor Documentation

HelloWorld::HelloWorld ( const ACE_CString &  name,
maci::ContainerServices containerServices 
)

Constructor

Parameters:
poa Poa which will activate this and also all other components. Developers need not be concerned with what a PortableServer does...just pass it to the superclass's constructor.
name component's name. All components have a name associated with them so other components and clients can access them.
HelloWorld::HelloWorld ( const ACE_CString &  name,
maci::ContainerServices containerServices 
)

Constructor

virtual HelloWorld::~HelloWorld (  )  [virtual]

Destructor


Member Function Documentation

virtual void HelloWorld::displayMessage (  )  [virtual]

Displays "Hello World" to the console.


The documentation for this class was generated from the following files: