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