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

# /Users/fpy/titan-1-5-MBARI/Mers/Solvers/Entailment/GoalInterpreterInterface.h

    00001
    00002 //
    00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 // Organization:        Model-based Embedded and Robotic Systems Group
    00010 //                                      Massachusetts Institute of Technology
    00011 //
    00013
    00014 #ifndef __GOALINTERPRETERINTERFACE__
    00015 #define __GOALINTERPRETERINTERFACE__
    00016
    00017 #ifndef EMBEDDED
    00018 #include <iostream>
    00019 #endif
    00020
    00021 #include <cstdlib>
    00022 #include <fstream>
    00023
    00024 #include <Mers/Utils/Lang/String.h>
    00025 #include <Mers/Utils/Containers/intList.h>
    00026 #include <Mers/Utils/Lang/BaseModelObject.h>
    00027
    00028 namespace Mers {
    00029         namespace Solvers {
    00030                 namespace Entailment {
    00031
    00032                         class
    00033                         GoalInterpreterInterface : public Mers::Utils::Lang::BaseModelObject
    00034                         {
    00035                         public:
    00036                                 //--------------------------------------------
    00037                                 //      CONSTRUCTOR
    00038                                 //--------------------------------------------
    00039
    00045                                 GoalInterpreterInterface(bool initialDebug = false)
    00046                                         : Mers::Utils::Lang::BaseModelObject(Mers::Utils::Lang::BaseModelObject::oGoalInterpreter)
    00047                                 {
    00048                                         debug = initialDebug;
    00049                                 }
    00050
    00051                                 //--------------------------------------------
    00052                                 //      PUBLIC FUNCTION METHODS
    00053                                 //--------------------------------------------
    00054
    00062                                 virtual bool               updateGoal(unsigned int var, unsigned int val) = 0;
    00070                                 virtual bool               updateGoal(Mers::Utils::Lang::String var, Mers::Utils::Lang::String val) = 0;
    00078                                 virtual bool               updateCurrentState(unsigned int variable_id,
    00079                                                                                                                                                                                                                         unsigned int value_id) = 0;
    00087                                 virtual bool               updateCurrentState(Mers::Utils::Lang::String var, Mers::Utils::Lang::String val) = 0;
    00088
    00099                                 virtual bool               updateReachableStates(Mers::Utils::Containers::intList const * rstates) = 0;
    00104                                 virtual void               clearGoal() = 0;
    00112                                 virtual Mers::Utils::Containers::intList const *    generateGoalState() = 0;
    00113
    00119                                 virtual void               setDebug(bool debugState)
    00120                                 {
    00121                                         debug = debugState;
    00122                                 }
    00123
    00128                                 virtual bool               getDebug()  const
    00129                                 {
    00130                                         return debug;
    00131                                 };
    00132
    00136                                 virtual void               showVariables() const = 0;
    00137
    00147                                 virtual int                variableAndValueToUID(Mers::Utils::Lang::String var, Mers::Utils::Lang::String val,
    00148                                                                                                                                                                                                                                  unsigned int &varUID,
    00149                                                                                                                                                                                                                                  unsigned int &valUID) const = 0;
    00150
    00160                                 virtual int                variableAndValueToString(unsigned int var,
    00161                                                                                                                                                                                                                                                 unsigned int val,
    00162                                                                                                                                                                                                                                                 Mers::Utils::Lang::String &varString,
    00163                                                                                                                                                                                                                                                 Mers::Utils::Lang::String &valString) const = 0;
    00164
    00165 #ifndef EMBEDDED
    00166
    00172                                 virtual void print(std::ostream &out) const = 0;
    00173 #endif
    00174
    00175                         protected:
    00176                                 bool debug;
    00177                         };
    00178                 }
    00179         }
    00180 }
    00181
    00182 #endif //ndef __GOALINTERPRETER__
    00183
    00184
    00185
    00186