⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 araction.h

📁 机器人移动的简单的VC基类
💻 H
字号:
/*ActivMedia Robotics Interface for Applications (ARIA)Copyright (C) 2004,2005 ActivMedia Robotics, LLC     This program is free software; you can redistribute it and/or modify     it under the terms of the GNU General Public License as published by     the Free Software Foundation; either version 2 of the License, or     (at your option) any later version.     This program is distributed in the hope that it will be useful,     but WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     GNU General Public License for more details.     You should have received a copy of the GNU General Public License     along with this program; if not, write to the Free Software     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USAIf you wish to redistribute ARIA under different terms, contact ActivMedia Robotics for information about a commercial version of ARIA at robots@activmedia.com or ActivMedia Robotics, 19 Columbia Drive, Amherst, NH 03031; 800-639-9481*/#ifndef ARACTION_H#define ARACTION_H#include "ariaTypedefs.h"#include "ArArg.h"#include "ArActionDesired.h"#include <map>#include <string>class ArRobot;/// Action class, what typically makes the robot moveclass ArAction{public:  /// Constructor  AREXPORT ArAction(const char * name, const char * description = "");  /// Desructor  AREXPORT virtual ~ArAction();  /// Finds out whether the action is active or not  AREXPORT virtual bool isActive(void) const;  /// Activate the action  AREXPORT virtual void activate(void);  /// Deactivate the action  AREXPORT virtual void deactivate(void);  /// Fires the action, returning what the action wants to do  /**       @param currentDesired this is what the current resolver has for its       desired, this is SOLELY for the purpose of giving information to the       action      @return pointer to what this action wants to do, NULL if it wants to do       nothing  */  AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired) = 0;  /// Sets the robot this action is driving  AREXPORT virtual void setRobot(ArRobot *robot);  /// Find the number of arguments this action takes  AREXPORT virtual int getNumArgs(void) const;#ifndef SWIG  /// Gets the numbered argument  AREXPORT virtual const ArArg *getArg(int number) const;#endif // SWIG  /// Gets the numbered argument  AREXPORT virtual ArArg *getArg(int number);  /// Gets the name of the action  AREXPORT virtual const char *getName(void) const;  /// Gets the long description of the action  AREXPORT virtual const char *getDescription(void) const;  /// Gets what this action wants to do (for display purposes)  AREXPORT virtual ArActionDesired *getDesired(void) { return NULL; }  /// ArLog::log s the actions stats  AREXPORT virtual void log(bool verbose = true) const;protected:    // These are documented but only for use in the constructor  /// Sets the argument type for the next argument (only use in constructor)  AREXPORT void setNextArgument(ArArg const &arg);  ArRobot *myRobot;  bool myIsActive;    int myNumArgs;  std::map<int, ArArg> myArgumentMap;  std::string myName;  std::string myDescription;};#endif //ARACTION_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -