CallGUI.h
Go to the documentation of this file.
00001 
00002 #ifndef bwi_krexec_CallGUI_h__guard
00003 #define bwi_krexec_CallGUI_h__guard
00004 
00005 #include <bwi_msgs/QuestionDialogRequest.h>
00006 #include "bwi_msgs/QuestionDialog.h"
00007 
00008 #include "actasp/Action.h"
00009 
00010 #include <string>
00011 
00012 namespace bwi_krexec {
00013 
00014 class CallGUI : public actasp::Action {
00015 public:
00016 
00017   enum TYPE {
00018     DISPLAY = bwi_msgs::QuestionDialogRequest::DISPLAY,
00019     CHOICE_QUESTION = bwi_msgs::QuestionDialogRequest::CHOICE_QUESTION,
00020     TEXT_QUESTION = bwi_msgs::QuestionDialogRequest::TEXT_QUESTION
00021   };
00022 
00023   CallGUI(const std::string &name, const TYPE type,  const std::string& message,
00024           float timeOut = 0.0f,
00025           const std::vector<std::string> &options = std::vector<std::string>());
00026 
00027   int paramNumber() const { return 0;}
00028 
00029   std::string getName() const { return name; }
00030 
00031   std::string getResponse();
00032 
00033   int getResponseIndex();
00034 
00035   void run();
00036 
00037   bool hasFinished() const { return done; }
00038 
00039   actasp::Action *cloneAndInit(const actasp::AspFluent & fluent) const;
00040 
00041   virtual actasp::Action *clone() const { return new CallGUI(*this); }
00042 
00043 private:
00044 
00045   std::vector<std::string> getParameters() const {
00046     return std::vector<std::string>();
00047   }
00048 
00049   std::string name;
00050   TYPE type;
00051   std::string message;
00052   float timeOut;
00053   std::vector<std::string> options;
00054   bool done;
00055 
00056   bwi_msgs::QuestionDialog req;
00057 
00058 };
00059 
00060 }
00061 
00062 #endif


bwi_kr_execution
Author(s): Matteo Leonetti, Piyush Khandelwal
autogenerated on Thu Jun 6 2019 17:57:36