Added setValue/getValue/canonicalPath/getPaths/verifyPath methods to various Property classes.

This commit is contained in:
Eivind Kvedalen
2015-09-21 14:51:03 +02:00
committed by wmayer
parent 722a40dd41
commit ddc22a4101
6 changed files with 160 additions and 1 deletions
+30 -1
View File
@@ -34,13 +34,14 @@
#include <Base/Reader.h>
#include <Base/Stream.h>
#include <Base/Rotation.h>
#include <Base/Quantity.h>
#include <Base/VectorPy.h>
#include <Base/MatrixPy.h>
#include <Base/PlacementPy.h>
#include "Placement.h"
#include "PropertyGeo.h"
#include "ObjectIdentifier.h"
using namespace App;
using namespace Base;
@@ -538,6 +539,34 @@ const Base::Placement & PropertyPlacement::getValue(void)const
return _cPos;
}
void PropertyPlacement::getPaths(std::vector<ObjectIdentifier> &paths) const
{
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Base"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("x")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Base"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("y")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Base"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("z")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Rotation"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Angle")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Rotation"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Axis"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("x")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Rotation"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Axis"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("y")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Rotation"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("Axis"))
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("z")));
}
PyObject *PropertyPlacement::getPyObject(void)
{
return new Base::PlacementPy(new Base::Placement(_cPos));