Fixed working with tests

This commit is contained in:
AgCaliva
2023-08-29 14:41:58 -03:00
parent dae3d4f690
commit 704a5bd10a
12 changed files with 234 additions and 7 deletions

View File

@@ -26,6 +26,7 @@
#include <Base/MatrixPy.h>
#include <Base/PlacementPy.h>
#include <Base/Reader.h>
#include <Base/DocumentReader.h>
#include <Base/Quantity.h>
#include <Base/QuantityPy.h>
@@ -40,6 +41,7 @@
#include "Placement.h"
#include "ObjectIdentifier.h"
#include <Base/Console.h>
using namespace App;
using namespace Base;
@@ -152,6 +154,25 @@ void PropertyVector::Restore(Base::XMLReader &reader)
hasSetValue();
}
void PropertyVector::Restore(Base::DocumentReader &reader,XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *ContainerDOM)
{
// read my Element
auto PropertyVectorDOM = reader.FindElement(ContainerDOM,"PropertyVector");
if(PropertyVectorDOM){
// get the value of my Attribute
const char* valueX_cstr = reader.GetAttribute(PropertyVectorDOM,"valueX");
const char* valueY_cstr = reader.GetAttribute(PropertyVectorDOM,"valueY");
const char* valueZ_cstr = reader.GetAttribute(PropertyVectorDOM,"valueZ");
if(valueX_cstr || valueY_cstr || valueZ_cstr){
aboutToSetValue();
_cVec.x = reader.ContentToFloat(valueX_cstr);
_cVec.y = reader.ContentToFloat(valueY_cstr);
_cVec.z = reader.ContentToFloat(valueZ_cstr);
hasSetValue();
}
}
}
Property *PropertyVector::Copy() const
{