Privacy
An open-source, flexible 3D physical simulation framework
mars Namespace Reference

Copyright 2012, DFKI GmbH Robotics Innovation Center. More...

Namespaces

 app
 
 cfg_manager
 
 cfg_manager_gui
 
 config_map_gui
 
 data_broker
 
 data_broker_gui
 
 entity_generation
 
 graphics
 
 gui
 
 interfaces
 
 lib_manager
 
 log_console
 The Interface for a plugin to report errors and warnings.
 
 main_gui
 
 plugin
 
 plugins
 
 scene_loader
 
 sim
 
 smurf
 
 utils
 
 viz
 

Classes

struct  Bool
 
struct  Double
 
struct  FootPrint
 
class  Function
 
struct  FunctionState
 
struct  Int
 
struct  List
 
class  ListBuilder
 
struct  ListBuilderState
 
class  Method
 
struct  MethodState
 
class  Module
 
struct  ModuleState
 
class  MultiResHeightMapRenderer
 
class  Object
 
struct  ObjectState
 
struct  PyObjectDeleter
 This deleter should be used when managing PyObject with shared_ptr. More...
 
class  PythonInterpreter
 
struct  String
 
struct  SubTile
 
struct  Tuple
 

Typedefs

typedef shared_ptr< PyObject > PyObjectPtr
 A managed pointer to PyObject which takes care about memory management and reference counting. More...
 

Enumerations

enum  CppType {
  INT, DOUBLE, BOOL, STRING,
  ONEDARRAY, ONEDCARRAY, OBJECT, MAP
}
 

Functions

PyObjectPtr makePyObjectPtr (PyObject *p)
 Make a managed PyObject that will be automatically deleted with the last reference. More...
 
void throwPythonException ()
 
PyObjectPtr importModule (const std::string &module)
 
PyObjectPtr getAttribute (PyObjectPtr obj, const std::string &attribute)
 
void toConfigMap (PyObject *obj, ConfigItem &item)
 
void toConfigMap (shared_ptr< Object > obj, ConfigItem &item)
 
PyObject * mapToPyObjectPtr_ (ConfigItem *map)
 
PyObjectPtr mapToPyObjectPtr (ConfigMap *map)
 
void toPyObjects (std::va_list &cppArgs, const std::list< CppType > &types, std::vector< PyObjectPtr > &args)
 

Detailed Description

Copyright 2012, DFKI GmbH Robotics Innovation Center.

up to now, this class just adds and reads files form a zip achive there is no ability for overwriting a Zip or a File in a Zip or things like that.

Copyright 2011, DFKI GmbH Robotics Innovation Center.

This file is part of the MARS simulation framework.

MARS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MARS 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MARS. If not, see http://www.gnu.org/licenses/.

it just adds the files at the end of the zipfile

things to do:

  • many

Typedef Documentation

◆ PyObjectPtr

typedef shared_ptr<PyObject> mars::PyObjectPtr

A managed pointer to PyObject which takes care about memory management and reference counting.

Note
Reference counting only works if makePyObjectPtr() is used to create the pointer. Therefore you should always use makePyObjectPtr() to create new PyObjectPtrs.
This type should only be used to encapsulate PyObjects that are 'new references'. Wrapping a 'borrowed reference' will break Python.

Definition at line 34 of file PythonInterpreter.cpp.

Enumeration Type Documentation

◆ CppType

Enumerator
INT 
DOUBLE 
BOOL 
STRING 
ONEDARRAY 
ONEDCARRAY 
OBJECT 
MAP 

Definition at line 69 of file PythonInterpreter.hpp.

Function Documentation

◆ getAttribute()

PyObjectPtr mars::getAttribute ( PyObjectPtr  obj,
const std::string &  attribute 
)

Definition at line 197 of file PythonInterpreter.cpp.

◆ importModule()

PyObjectPtr mars::importModule ( const std::string &  module)

Definition at line 188 of file PythonInterpreter.cpp.

◆ makePyObjectPtr()

PyObjectPtr mars::makePyObjectPtr ( PyObject *  p)

Make a managed PyObject that will be automatically deleted with the last reference.

Definition at line 51 of file PythonInterpreter.cpp.

◆ mapToPyObjectPtr()

PyObjectPtr mars::mapToPyObjectPtr ( ConfigMap map)

Definition at line 331 of file PythonInterpreter.cpp.

◆ mapToPyObjectPtr_()

PyObject* mars::mapToPyObjectPtr_ ( ConfigItem map)

Definition at line 286 of file PythonInterpreter.cpp.

◆ throwPythonException()

void mars::throwPythonException ( )

Definition at line 60 of file PythonInterpreter.cpp.

◆ toConfigMap() [1/2]

void mars::toConfigMap ( PyObject *  obj,
ConfigItem item 
)

Definition at line 245 of file PythonInterpreter.cpp.

◆ toConfigMap() [2/2]

void mars::toConfigMap ( shared_ptr< Object obj,
ConfigItem item 
)

Definition at line 282 of file PythonInterpreter.cpp.

◆ toPyObjects()

void mars::toPyObjects ( std::va_list &  cppArgs,
const std::list< CppType > &  types,
std::vector< PyObjectPtr > &  args 
)

Definition at line 336 of file PythonInterpreter.cpp.