]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/Component.cpp
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / Component.cpp
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 (file)
index 0000000..d83ca2a
--- /dev/null
@@ -0,0 +1,36 @@
+#include "Component.h"\r
+\r
+#include "DataType.h"\r
+\r
+#include <iostream>\r
+\r
+namespace Databoard {\r
+       namespace Type {\r
+\r
+               Component::Component(std::string name, DataType* type)\r
+               {\r
+                       usingBuiltInType = type->getNotBuiltIn();\r
+                       \r
+                       this->name = name;\r
+                       this->type = type;\r
+               }\r
+\r
+               Component::~Component()\r
+               {\r
+                       if(type != NULL && usingBuiltInType == false)\r
+                       {\r
+                               delete type;\r
+                       }\r
+               }\r
+\r
+               std::string Component::getName()\r
+               {\r
+                       return name;\r
+               }\r
+\r
+               DataType* Component::getDataBoard()\r
+               {\r
+                       return type;\r
+               }\r
+       }\r
+}\r