Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Building Class Reference
[ACS Components Examples]

#include <acsexmplBuildingImpl.h>

Inheritance diagram for Building:

Inheritance graph
[legend]
Collaboration diagram for Building:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Building (const ACE_CString &name, maci::ContainerServices *containerServices)
virtual ~Building ()
virtual void openFrontDoor ()
virtual void closeFrontDoor ()
virtual ACS::ROstring_ptr version ()
virtual void execute ()
virtual void cleanUp ()

Private Member Functions

void operator= (const Building &)

Private Attributes

baci::SmartPropertyPointer<
baci::ROstring
m_version_sp
acsexmplBuilding::Door_var m_door_p

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 $"


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.

virtual Building::~Building  )  [virtual]
 

Destructor


Member Function Documentation

virtual 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

Reimplemented from acscomponent::ACSComponentImpl.

virtual void Building::closeFrontDoor  )  [virtual]
 

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

Returns:
void

virtual 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

Reimplemented from acscomponent::ACSComponentImpl.

virtual void Building::openFrontDoor  )  [virtual]
 

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

Returns:
void

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

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

virtual 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


Member Data Documentation

acsexmplBuilding::Door_var Building::m_door_p [private]
 

The door that belongs to this building.

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

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


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:35:59 2009 for ACS C++ API by doxygen 1.3.8