]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/Component.cpp
Document server should use variable value request with binding
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / Component.cpp
1 #include "Component.h"\r
2 \r
3 #include "DataType.h"\r
4 \r
5 #include <iostream>\r
6 \r
7 namespace Databoard {\r
8         namespace Type {\r
9 \r
10                 Component::Component(std::string name, DataType* type)\r
11                 {\r
12                         usingBuiltInType = type->getNotBuiltIn();\r
13                         \r
14                         this->name = name;\r
15                         this->type = type;\r
16                 }\r
17 \r
18                 Component::~Component()\r
19                 {\r
20                         if(type != NULL && usingBuiltInType == false)\r
21                         {\r
22                                 delete type;\r
23                         }\r
24                 }\r
25 \r
26                 std::string Component::getName()\r
27                 {\r
28                         return name;\r
29                 }\r
30 \r
31                 DataType* Component::getDataBoard()\r
32                 {\r
33                         return type;\r
34                 }\r
35         }\r
36 }\r