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