ALMA Computing Group

Building Class Reference
[ACS Components Examples]

Implements an hierarchical device using Door Door. More...

#include <acsexmplBuildingImpl.h>

List of all members.

Public Member Functions

 Building (const ACE_CString &name, maci::ContainerServices *containerServices)
 Constructor.
virtual ~Building ()
 Destructor.
virtual void openFrontDoor ()
 Opens the FRONTDOOR Implementation of the IDL openFrontDoor() interface.
virtual void closeFrontDoor ()
 Closes the FRONTDOOR Implementation of the IDL closeFrontDoor() interface.
virtual ACS::ROstring_ptr version ()
 Returns a reference to the version property Implementation of IDL interface for the property.
virtual void execute ()
 Called after initialize to tell the component that it has to be ready to accept incoming functional calls any time.
virtual void cleanUp ()
 Called after the last functional call to the component has finished.

Private Member Functions

void operator= (const Building &)
 ALMA C++ coding standards state copy operators should be disabled.

Private Attributes

baci::SmartPropertyPointer<
baci::ROstring > 
m_version_sp
 m_version_sp is a string which shows the version of class Building being used.
acsexmplBuilding::Door_var m_door_p
 The door that belongs to this building.


Detailed Description

Implements an hierarchical device using Door Door.

This class implements an example device "Building". The purpose is to show the implementation of hierarchical devices. Building has two methods: openFrontDoor() and closeFrontDoor(). It also provides one property, version, which is just the version of Building being used. Building does not have any Door members, but instead uses the ContainerServices to activate a door whenever calls to these methods are made. Since this device has only synchronous methods, we do not inherit from the ActionImplementator class and we do not implement the invokeAction method.

Version:
"@(#) $Id: acsexmplBuildingImpl.h,v 1.108 2008/10/09 08:41:11 cparedes Exp $"

Definition at line 119 of file acsexmplBuildingImpl.h.


Constructor & Destructor Documentation

Building::Building const ACE_CString &  name,
maci::ContainerServices *  containerServices
 

Constructor.

Parameters:
poa Poa which will activate this and also all other components.
name component's name. This is also the name that will be used to find the configuration data for the component in the Configuration Database.
Definition at line 58 of file acsexmplBuildingImpl.cpp.

Building::~Building  )  [virtual]
 

Destructor.

Definition at line 127 of file acsexmplBuildingImpl.cpp.


Member Function Documentation

void Building::cleanUp  )  [virtual]
 

Called after the last functional call to the component has finished.

The component should then orderly release resources etc.

As required by the CharacteristicComponentImpl class, I call first explicitly the cleanUp() of the parent class. This makes sure that all threads are stopped and the Component's state set. Depending on what resources are used by a class implementing a Component and by the implementation of the parent class (if it does not inherit directly from acscomponent::ACSComponentImpl or baci:: CharacteristicComponentImpl) it might be necessary to call the cleanuUp() method of the base class AFTER having released resources allocated by the current class. For an example, see the FridgeControl class Always check the documentation of the parent class and consider what resources are allocated by this class to extablish the requirements for the execution of lifecycle chained methods.

Returns:
void

Definition at line 105 of file acsexmplBuildingImpl.cpp.

References m_door_p.

void Building::closeFrontDoor  )  [virtual]
 

Closes the FRONTDOOR Implementation of the IDL closeFrontDoor() interface.

Returns:
void

Definition at line 162 of file acsexmplBuildingImpl.cpp.

References m_door_p.

void Building::execute  )  [virtual]
 

Called after initialize to tell the component that it has to be ready to accept incoming functional calls any time.

Must be implemented as a synchronous (blocking) call (can spawn threads though).

Exceptions:
ACSErr::ACSbaseExImpl 
Returns:
void

Definition at line 70 of file acsexmplBuildingImpl.cpp.

References m_door_p, and m_version_sp.

void Building::openFrontDoor  )  [virtual]
 

Opens the FRONTDOOR Implementation of the IDL openFrontDoor() interface.

Returns:
void

Definition at line 140 of file acsexmplBuildingImpl.cpp.

References m_door_p.

void Building::operator= const Building  )  [private]
 

ALMA C++ coding standards state copy operators should be disabled.

ACS::ROstring_ptr Building::version  )  [virtual]
 

Returns a reference to the version property Implementation of IDL interface for the property.

Returns:
A pointer to the string containing the version number

Definition at line 183 of file acsexmplBuildingImpl.cpp.

References m_version_sp.


Member Data Documentation

acsexmplBuilding::Door_var Building::m_door_p [private]
 

The door that belongs to this building.

Definition at line 225 of file acsexmplBuildingImpl.h.

Referenced by cleanUp(), closeFrontDoor(), execute(), and openFrontDoor().

baci::SmartPropertyPointer<baci::ROstring> Building::m_version_sp [private]
 

m_version_sp is a string which shows the version of class Building being used.

Definition at line 220 of file acsexmplBuildingImpl.h.

Referenced by execute(), and version().


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