X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FComponent.cpp;fp=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FComponent.cpp;h=d83ca2a0df11b502ad1acc245a73758aae554796;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/Component.cpp b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/Component.cpp new file mode 100644 index 000000000..d83ca2a0d --- /dev/null +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/Component.cpp @@ -0,0 +1,36 @@ +#include "Component.h" + +#include "DataType.h" + +#include + +namespace Databoard { + namespace Type { + + Component::Component(std::string name, DataType* type) + { + usingBuiltInType = type->getNotBuiltIn(); + + this->name = name; + this->type = type; + } + + Component::~Component() + { + if(type != NULL && usingBuiltInType == false) + { + delete type; + } + } + + std::string Component::getName() + { + return name; + } + + DataType* Component::getDataBoard() + { + return type; + } + } +}