]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/UnionType.h
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / UnionType.h
1 #pragma once
2
3 #include "DataType.h"
4
5 #include <vector>
6
7 namespace Databoard {
8         namespace Type {
9
10                 class DATABOARD_API Component;
11
12                 class DATABOARD_API UnionType : public DataType {
13                 public:
14                         UnionType();
15                         UnionType(std::vector<Component*> components);
16
17                         virtual ~UnionType();
18
19                         virtual std::string writeOut(int indent);
20
21                         void addComponent(std::string name, DataType* type);
22                         int count();
23                         int getComponentIndex(std::string tagName);
24                         Component* getComponent(int i);
25                         std::vector<Component*> getComponents();
26
27
28
29                 protected:
30
31                         std::vector<Component*> components;
32
33                 };
34         }
35 }