Skip to content

Commit

Permalink
+ implement PropertyExpressionEngine::getPyObject
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 13, 2015
1 parent f7a2ffc commit acf3b34
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/App/PropertyExpressionEngine.cpp
Expand Up @@ -31,6 +31,7 @@
#include "PropertyExpressionEngine.h"
#include "PropertyStandard.h"
#include "PropertyUnits.h"
#include <CXX/Objects.hxx>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>

Expand Down Expand Up @@ -738,7 +739,14 @@ void PropertyExpressionEngine::renameObjectIdentifiers(const std::map<ObjectIden

PyObject *PropertyExpressionEngine::getPyObject(void)
{
Py_Return;
Py::List list;
for (ExpressionMap::const_iterator it = expressions.begin(); it != expressions.end(); ++it) {
Py::Tuple tuple(2);
tuple.setItem(0, Py::String(it->first.toString()));
tuple.setItem(1, Py::String(it->second.expression->toString()));
list.append(tuple);
}
return Py::new_reference_to(list);
}

void PropertyExpressionEngine::setPyObject(PyObject *)
Expand Down

0 comments on commit acf3b34

Please sign in to comment.