- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# GoalInterpreterInterface Class Reference

List of all members.

## Public Member Functions
| GoalInterpreterInterface (bool initialDebug=false)
virtual bool | updateGoal (unsigned int var, unsigned int val)=0
virtual bool | updateGoal (String var, String val)=0
virtual bool | updateCurrentState (unsigned int variable_id, unsigned int value_id)=0
virtual bool | updateCurrentState (String var, String val)=0
virtual bool | updateReachableStates (intList const *rstates)=0
virtual void | clearGoal ()=0
virtual intList const * | generateGoalState ()=0
virtual void | setDebug (bool debugState)
virtual bool | getDebug () const
virtual void | showVariables () const=0
virtual int | variableAndValueToUID (String var, String val, unsigned int &varUID, unsigned int &valUID) const =0
virtual int | variableAndValueToString (unsigned int var, unsigned int val, String &varString, String &valString) const =0
virtual void | print (ostream &out) const =0
## Protected Attributes
bool | debug

## Detailed Description

Definition at line 30 of file GoalInterpreterInterface.h.

## Constructor & Destructor Documentation

GoalInterpreterInterface::GoalInterpreterInterface | ( | bool | initialDebug = `false` | ) | `[inline]`

Intiializes a new GoalInterpreter.

Parameters:

  | initialDebug | sets the initial debug flag state. Debug mode turns on debug printing

Definition at line 43 of file GoalInterpreterInterface.h.

References debug.

## Member Function Documentation

virtual bool GoalInterpreterInterface::updateGoal | ( | unsigned int | var,
|  | unsigned int | val |
| ) |  |  | `[pure virtual]`

Updates GI's current goal list by adding (var = val)

Parameters:

  | var | the variable of the goal
  | val | the value of the variable of the goal

Returns:
  true if the goal was added, false if this function failed to add the goal

virtual bool GoalInterpreterInterface::updateGoal | ( | String | var,
|  | String | val |
| ) |  |  | `[pure virtual]`

Updates GI's current goal list by adding (var = val)

Parameters:

  | var | the variable of the goal
  | val | the value of the variable of the goal

Returns:
  true if the goal was added, false if this function failed to add the goal

virtual bool GoalInterpreterInterface::updateCurrentState | ( | unsigned int | variable_id,
|  | unsigned int | value_id |
| ) |  |  | `[pure virtual]`

Updates the current state with the assignment (variable_id = value_id)

Parameters:

  | variable_id | the variable whos state is being updated
  | value_id | the new value of the state

Returns:
  true if the state was updated, false if this function failed to update variable_id's state

virtual bool GoalInterpreterInterface::updateCurrentState | ( | String | var,
|  | String | val |
| ) |  |  | `[pure virtual]`

Updates the current state with the assignment (var = val)

Parameters:

  | var | the variable whos state is being updated
  | val | the new value of the state

Returns:
  true if the state was updated, false if this function failed to update var's state

virtual bool GoalInterpreterInterface::updateReachableStates | ( | intList const * | rstates | ) | `[pure virtual]`

Sets the new set of reachable states to rstates All states listed in rstates are reachable, all states not mentioned are assumed to be unreachable

Parameters:

  | rstates | the new set of rechable states. Each state is defined by an integer pair (variableUID, valueUID) so rstates should have an even number of elements in it

Returns:
  true if the update was successfull, false if there was a problem updating the reachable states

virtual void GoalInterpreterInterface::clearGoal | ( |  | ) | `[pure virtual]`

clears the internal list of goals so subsequent calls to updateGoal will add the goals from scratch

virtual intList const* GoalInterpreterInterface::generateGoalState | ( |  | ) | `[pure virtual]`

Returns a complete set of state assignments. These state assignments are the least expensive state that entails the current goals

Returns:
  a list of UID pairs (variableUID, valueUID) that represent the set of goal-state assignments.

virtual void GoalInterpreterInterface::setDebug | ( | bool | debugState | ) | `[inline, virtual]`

sets the debug mode of this goal interpreter to debugState

Parameters:

  | debugState | the new debug state. Set to true to turn debug printing on or false to turn it off

Definition at line 117 of file GoalInterpreterInterface.h.

References debug.

virtual bool GoalInterpreterInterface::getDebug | ( |  | ) | const`[inline, virtual]`

returns true if debug printing is on

Returns:
  true if the current debug state is on (true)

Definition at line 126 of file GoalInterpreterInterface.h.

References debug.

virtual void GoalInterpreterInterface::showVariables | ( |  | ) | const`[pure virtual]`

Prints out all of the variables in the GoalInterpreter

virtual int GoalInterpreterInterface::variableAndValueToUID | ( | String | var,
|  | String | val,
|  | unsigned int & | varUID,
|  | unsigned int & | valUID |
| ) |  |  | const`[pure virtual]`

converts the (var = val) string pair into the equivalent pair of integers

Parameters:

  | var | the variable name being converted
  | val | the value name being converted
  | varUID | the variable UID is returned here
  | valUID | the value UID is returned here

Returns:
  0 on success or a positive number if the variable or value could not be found

virtual int GoalInterpreterInterface::variableAndValueToString | ( | unsigned int | var,
|  | unsigned int | val,
|  | String & | varString,
|  | String & | valString |
| ) |  |  | const`[pure virtual]`

converts the (var = val) integer pair into the equivalent pair of strings

Parameters:

  | var | the variable name being converted
  | val | the value name being converted
  | varString | the variable string is returned here
  | valString | the value string is returned here

Returns:
  0 on success or a positive number if the variable or value could not be found

virtual void GoalInterpreterInterface::print | ( | ostream & | out | ) | const`[pure virtual]`

Prints the Goal Interpreters information to the stream Derived classes should define this function to define what is printed for the GoalInterpreter

Parameters:

  | out | the stream being printed to

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

- /Users/fpy/titan-1-5-MBARI/Mers/Reconfiguration/Discrete/GoalInterpreterInterface.h