]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/OptionalValue.h
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / OptionalValue.h
1 #pragma once\r
2 \r
3 #include "Value.h"\r
4 \r
5 #include <string>\r
6 \r
7 namespace Databoard {\r
8         namespace Value {\r
9 \r
10                 class DATABOARD_API OptionalValue : public Value {\r
11                 public:\r
12                         OptionalValue(Databoard::Type::DataType* dataBoard);\r
13                         virtual ~OptionalValue();\r
14 \r
15                         virtual std::string writeOut(int indent = 0);\r
16                         virtual bool equals(const Value* other);\r
17 \r
18                         void setValue(Value* value);\r
19                         void setNoValue();\r
20 \r
21                         // Get the value or null if value doesn't exist\r
22                         Value* getValue();\r
23                         bool hasValue();\r
24 \r
25                         virtual std::string isValid();\r
26 \r
27 \r
28                 protected:\r
29 \r
30                         Value* value;\r
31 \r
32                 };\r
33         }\r
34 }\r