#include <gls_menu_action.h>
The GlsMenuTimer class supports the execution of a set of actions after the expiration of a timer.
Definition at line 257 of file gls_menu_action.h.
Class constructor.
- Parameters
-
name | the name of the group of data items. |
dataDict | the menu data dictionary used to evaluate menu data variables |
actionHandlers | These are handlers for menu actions passed in by the creator. These are considered local to the menu set. |
virtual GlsMenuTimer::~GlsMenuTimer |
( |
| ) |
|
|
virtual |
virtual void GlsMenuData_T< std::string >::Attach |
( |
std::string *& |
data | ) |
|
|
virtualinherited |
Attaches an external pointer to the data so that dereferencing the pointer will allow access to the data item's value without performing dictionary lookups and data value retrievals.
bool GlsMenuAction::CanExecute |
( |
std::string & |
statement | ) |
const |
|
protectedinherited |
Determine if there is a condition in front of the action to perform and if so, evaluate the condition and return the result. If there is no condition, true is returned.
void GlsMenuActionGroup::Condition |
( |
const std::string & |
expression | ) |
|
|
inherited |
Set the logical expression used to determine if the actions should be executed when Execute is invoked.
double GlsMenuTimer::Duration |
( |
| ) |
const |
Returns the currently set duration of the timer in seconds.
virtual void GlsMenuActionGroup::Execute |
( |
| ) |
const |
|
virtualinherited |
Invoke all actions associated with the instance. Derived classes can override this method to add new action types.
- Parameters
-
dict | data dictionary to use for evaluating action parameters. |
Reimplemented from GlsMenuAction.
virtual void GlsMenuData::Inc |
( |
long |
amount = 1 | ) |
|
|
virtualinherited |
bool GlsMenuTimer::IsExpired |
( |
| ) |
const |
Specified whether or not the timer has expired.
virtual bool GlsMenuLine::OkToWrite |
( |
| ) |
|
|
virtualinherited |
Returns false if the string is empty.
virtual std::istream& GlsMenuActionGroup::ReadValue |
( |
std::istream & |
instr | ) |
|
|
virtualinherited |
Read attribute dictionary from an input stream.
- Parameters
-
instr | input stream to read value from. |
Reimplemented from GlsMenuLine.
virtual bool GlsMenuData_T< std::string >::ReferTo |
( |
std::string & |
data | ) |
|
|
virtualinherited |
Changes the data item to refer to and use the external variable rather than its own memory. Allows access to the data item's value without performing dictionary lookups and data value retrievals.
static void GlsMenuAction::Register |
( |
const std::string & |
name, |
|
|
ActionHandler_t * |
handler |
|
) |
| |
|
staticinherited |
Register a handler for a specific action.
- Parameters
-
name | action name |
handler | handler for the action |
void GlsMenuTimer::Reset |
( |
| ) |
|
Stop the timer if it is running and reset it. This will not start the timer running.
void GlsMenuTimer::Reset |
( |
double |
durationInSecs | ) |
|
Stop the timer if it is running and reset it. This will not start the timer running.
- Parameters
-
durationInSecs | timer duration in seconds. |
Sets the previous value to the current value.
void GlsMenuData_T< std::string >::SetPrecision |
( |
int |
outputPrecision | ) |
|
|
inherited |
Allows for setting of precision for floating point numbers. This is the number of digits to be shown after the decimal point.
void GlsMenuTimer::Start |
( |
| ) |
|
Start the timer running. This does not reset the timer, it will start where ever it was last paused.
void GlsMenuTimer::Stop |
( |
| ) |
|
Pauses the timer. Call Start to start the timer again from the time it was paused.
virtual const std::string & GlsMenuData_T< std::string >::Value |
( |
| ) |
const |
|
virtualinherited |
Returns the value of the simulation meta-data.
Returns a reference value of the simulation meta-data.
virtual void GlsMenuData_T< std::string >::Value |
( |
const std::string & |
val | ) |
|
|
virtualinherited |
Sets the value of the simulation meta-data.
Determines if the value has changed since the last call to this method.
virtual std::ostream& GlsMenuActionGroup::WriteValue |
( |
std::ostream & |
outstr | ) |
|
|
virtualinherited |
Read attribute dictionary from an input stream.
- Parameters
-
instr | input stream to read value from. |
Reimplemented from GlsMenuData_T< std::string >.
bool GlsMenuTimer::_active |
|
protected |
Whether or not the timer is actively running and incrementing its elapsed time.
Definition at line 345 of file gls_menu_action.h.
Condition to check for true before executing all actions.
Definition at line 244 of file gls_menu_action.h.
bool GlsMenuActionGroup::_conditionIsSet |
|
protectedinherited |
This is set to true when the condition is set using the Condition method.
Definition at line 247 of file gls_menu_action.h.
Time duration after which the timer will be expired.
Definition at line 352 of file gls_menu_action.h.
Stored elapsed time whenever the timer is stopped. This is incremented by the stop watches time whenever the timer is paused.
Definition at line 349 of file gls_menu_action.h.
Allows for setting of precision for floating point numbers.
Definition at line 229 of file gls_menu_data.h.
Whether or not the previous value should be considered.
Definition at line 226 of file gls_menu_data.h.
disti::Timer GlsMenuTimer::_stopWatch |
|
protected |
The documentation for this class was generated from the following file: