openrave.org

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
module.h
Go to the documentation of this file.
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2006-2011 Rosen Diankov <rosen.diankov@gmail.com>
3 //
4 // This file is part of OpenRAVE.
5 // OpenRAVE is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef OPENRAVE_COMMAND_PROBLEM_INSTANCE_H
23 #define OPENRAVE_COMMAND_PROBLEM_INSTANCE_H
24 
25 namespace OpenRAVE {
26 
31 {
32 public:
33  ModuleBase(EnvironmentBasePtr penv) : InterfaceBase(PT_Module, penv) {
34  }
35  virtual ~ModuleBase() {
36  }
37 
39  static inline InterfaceType GetInterfaceTypeStatic() {
40  return PT_ProblemInstance;
41  }
42 
46  virtual int main(const std::string& cmd) {
47  return 0;
48  }
49 
51  virtual void Destroy() {
52  }
53 
55  virtual void Reset() {
56  }
57 
58  virtual bool SimulationStep(dReal fElapsedTime) {
59  return false;
60  }
61 private:
62  virtual const char* GetHash() const {
63  return OPENRAVE_MODULE_HASH;
64  }
65 };
66 
71 
72 } // end namespace OpenRAVE
73 
74 #endif