Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <string>
- enum Type {string, integ};
- class Variant
- {
- public:
- Variant();
- Variant(int value);
- Variant(std::string value);
- Type getType() const;
- std::string getString() const;
- int getInt() const;
- void setInt(int value);
- void setString(std::string);
- Variant operator+(const Variant &b) const;
- Variant operator-(const Variant &b) const;
- Variant operator*(const Variant &b) const;
- Variant operator/(const Variant &b) const;
- ~Variant();
- private:
- Type type;
- std::string stringValue;
- int intValue;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement