rci::ControlMode Class Reference

Domain object indicating control mode of a controller / controlled device. More...

#include <ControlMode.h>

Collaboration diagram for rci::ControlMode:

List of all members.

Public Member Functions

 ControlMode (std::string name)
 Constructor, initializing control to desired mode.
virtual ~ControlMode ()
 Destructor.
std::string getName () const
 Returns name of the control mode instance.
bool equals (const ControlModePtr &mode) const
 Returns wheather this ControlMode is the passed one.
bool supports (const ControlAspectPtr &mode) const
 Returns wheather this ControlMode is the passed one or contains it.
void addControlAspect (ControlAspectPtr mode)
 Add control mode.
ControlModePtr combineWith (const ControlModePtr &mode, const std::string &name) const
 Add control mode.
std::string print () const
 Print method.

Static Public Member Functions

static ControlModePtr create (std::string name)
 Initializes control to desired mode.
static ControlModePtr create (std::string name, ControlAspectPtr aspect)
 Initializes control to desired mode.
static ControlModePtr create (std::string name, ControlAspectPtr aspect1, ControlAspectPtr aspect2)
 Initializes control to desired mode.

Protected Member Functions

unsigned int numAspects () const
 Returns number of control aspects.

Protected Attributes

std::string name
 Name of the control mode.
std::vector< ControlAspectPtrcontained
 Contaiend control modes.

Private Member Functions

 ControlMode (const ControlMode &controlmode)
 Copy constructor.

Detailed Description

Domain object indicating control mode of a controller / controlled device.

A ControlMode can itself contain several other control modes.

Todo:

Should have constructor with ControlMode vector as third parameter

Control Mode combination should be commutative.

Definition at line 48 of file ControlMode.h.


Constructor & Destructor Documentation

rci::ControlMode::ControlMode ( std::string  name  ) 

Constructor, initializing control to desired mode.

Parameters:
name Name of the control mode
Returns:
Control mode object, set to 0 (disabled)

Definition at line 36 of file ControlMode.cpp.

Referenced by combineWith(), and create().

Here is the caller graph for this function:

rci::ControlMode::~ControlMode (  )  [virtual]

Destructor.

Definition at line 40 of file ControlMode.cpp.

rci::ControlMode::ControlMode ( const ControlMode controlmode  )  [private]

Copy constructor.

Private to disallow copying.


Member Function Documentation

void rci::ControlMode::addControlAspect ( ControlAspectPtr  mode  ) 

Add control mode.

Definition at line 73 of file ControlMode.cpp.

References contained.

Referenced by combineWith().

Here is the caller graph for this function:

ControlModePtr rci::ControlMode::combineWith ( const ControlModePtr mode,
const std::string &  name 
) const

Add control mode.

Definition at line 78 of file ControlMode.cpp.

References addControlAspect(), contained, and ControlMode().

Here is the call graph for this function:

ControlModePtr rci::ControlMode::create ( std::string  name,
ControlAspectPtr  aspect1,
ControlAspectPtr  aspect2 
) [static]

Initializes control to desired mode.

Parameters:
name Name of the control mode
aspect1 Contained control aspect
aspect2 Contained control aspect
Returns:
Control mode object, set to 0 (disabled)

Definition at line 122 of file ControlMode.cpp.

References ControlMode().

Here is the call graph for this function:

ControlModePtr rci::ControlMode::create ( std::string  name,
ControlAspectPtr  aspect 
) [static]

Initializes control to desired mode.

Parameters:
name Name of the control mode
aspect Contained control aspect
Returns:
Control mode object, set to 0 (disabled)

Definition at line 116 of file ControlMode.cpp.

References ControlMode().

Here is the call graph for this function:

ControlModePtr rci::ControlMode::create ( std::string  name  )  [static]

Initializes control to desired mode.

Parameters:
name Name of the control mode
Returns:
Control mode object, set to 0 (disabled)

Definition at line 111 of file ControlMode.cpp.

References ControlMode().

Here is the call graph for this function:

bool rci::ControlMode::equals ( const ControlModePtr mode  )  const

Returns wheather this ControlMode is the passed one.

Parameters:
mode ControlMode to compare with.
Returns:
Are the two ControlModes equal to each other?

Definition at line 47 of file ControlMode.cpp.

References contained, and numAspects().

Referenced by supports().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string rci::ControlMode::getName (  )  const

Returns name of the control mode instance.

Returns:
Speking name

Definition at line 43 of file ControlMode.cpp.

References name.

unsigned int rci::ControlMode::numAspects (  )  const [protected]

Returns number of control aspects.

Definition at line 95 of file ControlMode.cpp.

References contained.

Referenced by equals(), and supports().

Here is the caller graph for this function:

std::string rci::ControlMode::print (  )  const

Print method.

Returns:
Contrrol mode represented as string

Definition at line 99 of file ControlMode.cpp.

References contained, and name.

bool rci::ControlMode::supports ( const ControlAspectPtr mode  )  const

Returns wheather this ControlMode is the passed one or contains it.

Parameters:
mode ControlMode to compare with.
Returns:
Is or contains this ControlMode the passed one?

Definition at line 60 of file ControlMode.cpp.

References contained, equals(), rci::noControl, and numAspects().

Here is the call graph for this function:


Member Data Documentation

Contaiend control modes.

A ControlMode can optionally contain other control modes, allowing hierarchical stacking of control modes.

Definition at line 137 of file ControlMode.h.

Referenced by addControlAspect(), combineWith(), equals(), numAspects(), print(), and supports().

std::string rci::ControlMode::name [protected]

Name of the control mode.

Definition at line 130 of file ControlMode.h.

Referenced by getName(), and print().


The documentation for this class was generated from the following files:
Generated on Thu Aug 2 14:02:57 2012 for RCI by  doxygen 1.6.3