]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/RecordType.h
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / RecordType.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 RecordType : public DataType {
13                 public:
14                         RecordType();
15                         RecordType(bool referable, std::vector<Component*> components);
16
17                         virtual ~RecordType();
18
19                         bool isReferable();
20
21                         void addComponent(std::string name, DataType* type);
22                         int getComponentIndex(std::string fieldName);
23                         Component* getComponent(std::string fieldName);
24                         int count();
25                         Component* getComponent(int i);
26                         std::vector<Component*> getComponents();
27
28                         virtual std::string writeOut(int indent = 0);
29
30                 protected:
31
32                         bool referable;
33                         std::vector<Component*> components;
34
35                 };
36         }
37 }