blob: c7788477422f2eb9d2cdd1c82853f07041fa3f38 [file] [log] [blame]
/*
* Formula.cpp
*
* Author: wendel
*/
#include "Formula.h"
#include "submodel/map/reference/Reference.h"
namespace basyx {
namespace submodel {
Formula::Formula()
{}
Formula::Formula(const basyx::specificCollection_t<IReference>& dependsOn) :
vab::ElementMap{}
{
this->setDependsOn(dependsOn);
}
basyx::specificCollection_t<IReference> Formula::getDependsOn() const
{
auto & obj_list = this->map.getProperty(IFormula::Path::Dependson).Get<basyx::object::object_list_t&>();
return vab::ElementMap::make_specific_collection<IReference, Reference>(obj_list);
}
void Formula::setDependsOn(const basyx::specificCollection_t<IReference>& dependsOn)
{
auto obj_list = vab::ElementMap::make_object_list<IReference, Reference>(dependsOn);
this->map.insertKey(IFormula::Path::Dependson, obj_list);
}
}
}