Privacy
An open-source, flexible 3D physical simulation framework
primitives.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011, 2012, 2014, DFKI GmbH Robotics Innovation Center
3  *
4  * This file is part of the MARS simulation framework.
5  *
6  * MARS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation, either version 3
9  * of the License, or (at your option) any later version.
10  *
11  * MARS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with MARS. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 #ifndef PRIMITIVES_H
22 #define PRIMITIVES_H
23 
24 #ifdef _PRINT_HEADER_
25 #warning "primitives.h"
26 #endif
27 
28 #include <map>
29 
30 #include <configmaps/ConfigData.h>
31 #include <mars/interfaces/MaterialData.h>
32 #include <mars/interfaces/sim/MarsPluginTemplate.h>
33 #include <mars/entity_generation/entity_factory/EntityFactoryInterface.h>
34 
35 namespace mars {
36 
37  namespace smurf {
38 
41 
42  public:
44  ~PRIMITIVES();
45 
46  // LibInterface methods
47  int getLibVersion() const {return 1;}
48  const std::string getLibName() const {return std::string("PRIMITIVES");}
50 
51  // EntityFactoryInterface
52  virtual sim::SimEntity* createEntity(const configmaps::ConfigMap& config);
53 
54  // MarsPlugin methods
55  void init();
56  void reset();
57  void update(mars::interfaces::sReal time_ms);
58 
59  private:
60  std::string primitivename;
62  std::string tmpPath;
63  void handleURI(configmaps::ConfigMap *map, std::string uri);
65  };
66 
67  } // end of namespace smurf
68 } // end of namespace mars
69 
70 #endif // PRIMITIVES_H
int getLibVersion() const
Definition: primitives.h:47
virtual sim::SimEntity * createEntity(const configmaps::ConfigMap &config)
Definition: primitives.cpp:97
void update(mars::interfaces::sReal time_ms)
Definition: primitives.cpp:68
sim::SimEntity * entity
Definition: primitives.h:61
The interface for plugins creating dynamic simulation objects.
double sReal
Definition: MARSDefs.h:49
void handleURI(configmaps::ConfigMap *map, std::string uri)
Definition: primitives.cpp:71
const std::string getLibName() const
Definition: primitives.h:48
Copyright 2012, DFKI GmbH Robotics Innovation Center.
std::string primitivename
Definition: primitives.h:60
PRIMITIVES(lib_manager::LibManager *theManager)
Definition: primitives.cpp:45
void handleURIs(configmaps::ConfigMap *map)
Definition: primitives.cpp:77