first finished implementation of Quantity parser

This commit is contained in:
jriegel
2013-09-22 18:03:28 +02:00
parent 4db2355159
commit 3ee7b20927
13 changed files with 1988 additions and 1184 deletions

View File

@@ -13,7 +13,11 @@ using namespace Base;
// returns a string which represents the object e.g. when printed in python
std::string QuantityPy::representation(void) const
{
return std::string("<Quantity object>");
std::stringstream ret;
ret << getQuantityPtr()->getValue() << " ";
ret << getQuantityPtr()->getUnit().getString();
return ret.str();
}
PyObject *QuantityPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper