Project: engagement_recognition

License: BSD

Dependencies:

Used by: None

All Packages

Action Class Reference

#include <action.h>

List of all members.

Public Member Functions

 Action ()
bool equals (Action a)
std::string getData ()
bool isExtendedAction ()
bool isLook ()
bool isNoAction ()
bool isNod ()
bool isPoint ()
bool isShake ()
bool isSpeech ()
void setData (std::string data)
const char * toString ()
int toValue ()

Static Public Member Functions

static Action extendedAction (std::string data="")
static Action fromString (std::string str)
static Action look (std::string data="")
static Action noAction ()
static Action nod ()
static Action point (std::string data="")
static Action shake ()
static Action speech (std::string data="")

Static Public Attributes

static const std::string EXTENDED_ACTION = "EXTENDED_ACTION"
static const std::string LOOK = "LOOK"
static const std::string NO_ACTION = "NO_ACTION"
static const std::string NOD = "NOD"
static const std::string POINT = "POINT"
static const std::string SHAKE = "SHAKE"
static const std::string SPEECH = "SPEECH"

Protected Member Functions

 Action (std::string action, std::string data)

Protected Attributes

std::string action_
std::string data_

Detailed Description

The Action class is responsible for encapsulating the concept of an action that can be performed (e.g. pointing, looking, speaking, etc).

Author:
Brett Ponsler (bponsler (at) wpi (dot) edu)

Definition at line 46 of file action.h.


Constructor & Destructor Documentation

Action::Action ( std::string  action,
std::string  data 
) [protected]

Constructor for the Action class that takes a string.

Parameters:
action The String representing the Action
data The additional data for this Action

Definition at line 47 of file action.cpp.

Action::Action (  ) 

Default constructor for the Action class, sets the action to no action.

Definition at line 53 of file action.cpp.


Member Function Documentation

bool Action::equals ( Action  a  ) 

Determine if two Actions are equal.

Returns:
True if equal, false otherwise

Definition at line 129 of file action.cpp.

Action Action::extendedAction ( std::string  data = ""  )  [static]

Create an extended action.

Parameters:
data The additional data
Returns:
The resulting action

Definition at line 89 of file action.cpp.

Action Action::fromString ( std::string  str  )  [static]

Create an Action from a string.

Parameters:
str The string
Returns:
The Action

Definition at line 144 of file action.cpp.

std::string Action::getData (  ) 

Get the additional data for this Action.

Returns:
The additional data

Definition at line 134 of file action.cpp.

bool Action::isExtendedAction (  ) 

Determine if this Action is a extended action.

Returns:
True if a extended action, false otherwise

Definition at line 124 of file action.cpp.

bool Action::isLook (  ) 

Determine if this Action is a look.

Returns:
True if a look, false otherwise

Definition at line 119 of file action.cpp.

bool Action::isNoAction (  ) 

Determine if this Action is not an action.

Returns:
True if a not an action, false otherwise

Definition at line 94 of file action.cpp.

bool Action::isNod (  ) 

Determine if this Action is a nod.

Returns:
True if a nod, false otherwise

Definition at line 99 of file action.cpp.

bool Action::isPoint (  ) 

Determine if this Action is a point.

Returns:
True if a point, false otherwise

Definition at line 114 of file action.cpp.

bool Action::isShake (  ) 

Determine if this Action is a shake.

Returns:
True if a shake, false otherwise

Definition at line 104 of file action.cpp.

bool Action::isSpeech (  ) 

Determine if this Action is a speech.

Returns:
True if a speech, false otherwise

Definition at line 109 of file action.cpp.

Action Action::look ( std::string  data = ""  )  [static]

Create the look action.

Parameters:
data The additional data
Returns:
The resulting action

Definition at line 84 of file action.cpp.

Action Action::noAction (  )  [static]

Create the no action.

Returns:
The resulting action

Definition at line 59 of file action.cpp.

Action Action::nod (  )  [static]

Create the nod action.

Returns:
The resulting action

Definition at line 64 of file action.cpp.

Action Action::point ( std::string  data = ""  )  [static]

Create the point action.

Parameters:
data The additional data
Returns:
The resulting action

Definition at line 79 of file action.cpp.

void Action::setData ( std::string  data  ) 

Set the data for this Action.

Parameters:
data The data

Definition at line 139 of file action.cpp.

Action Action::shake (  )  [static]

Create the shake action.

Returns:
The resulting action

Definition at line 69 of file action.cpp.

Action Action::speech ( std::string  data = ""  )  [static]

The speech action.

Parameters:
data The additional data
Returns:
The resulting action

Definition at line 74 of file action.cpp.

const char * Action::toString (  ) 

Convert the Action into a string.

Returns:
The string

Definition at line 163 of file action.cpp.

int Action::toValue (  ) 

Convert the Action into a value.

Returns:
The APAction message value

Definition at line 174 of file action.cpp.


Member Data Documentation

std::string Action::action_ [protected]

The action.

Definition at line 50 of file action.h.

std::string Action::data_ [protected]

The additional data for the action.

Definition at line 53 of file action.h.

const std::string Action::EXTENDED_ACTION = "EXTENDED_ACTION" [static]

The human performed an extended action to complete the event.

Definition at line 76 of file action.h.

const std::string Action::LOOK = "LOOK" [static]

The human performed a look to complete the event.

Definition at line 74 of file action.h.

const std::string Action::NO_ACTION = "NO_ACTION" [static]

The human performed no action.

Definition at line 64 of file action.h.

const std::string Action::NOD = "NOD" [static]

The human performed a nod to complete the event.

Definition at line 66 of file action.h.

const std::string Action::POINT = "POINT" [static]

The human performed a point to complete the event.

Definition at line 72 of file action.h.

const std::string Action::SHAKE = "SHAKE" [static]

The human performed a shake to complete the event.

Definition at line 68 of file action.h.

const std::string Action::SPEECH = "SPEECH" [static]

The human spoke to complete the event.

Definition at line 70 of file action.h.


The documentation for this class was generated from the following files:
  • engagement_recognition/src/recognition/response/action.h
  • engagement_recognition/src/recognition/response/action.cpp

engagement_recognition
Author(s): Brett Ponsler (bponsler (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:35:49 2011