ICG 2
Electric Boogaloo
StringValue.hpp
Go to the documentation of this file.
1 #ifndef STRING_VALUE_H
2 #define STRING_VALUE_H
3 
4 #include "Value/Value.hpp"
5 
8 class StringValue : public Value {
9 
10  public:
11 
16  StringValue(const char* value);
17  StringValue(std::string value);
18 
19 
23  void print(std::ostream &s) const override;
24 
28  std::string toString() const override;
29 
35  inline ValueType getValueType() const override { return ValueType::STRING; }
36 
37 
38  std::string getRawString() const;
39  std::string getEscapedString() const;
40 
41  private:
42 
43  std::string value;
44 };
45 
46 #endif
Definition: StringValue.hpp:8
StringValue(const char *value)
Definition: StringValue.cpp:5
void print(std::ostream &s) const override
Definition: StringValue.cpp:13
std::string toString() const override
Definition: StringValue.cpp:17
std::string getRawString() const
Definition: StringValue.cpp:21
std::string getEscapedString() const
Definition: StringValue.cpp:25
ValueType getValueType() const override
Get the Value Type object.
Definition: StringValue.hpp:35
Value is an abstract base-class that represents a value on the right-hand-side of an assignment.
Definition: Value.hpp:9
ValueType
Definition: Value.hpp:28