diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-23 16:03:59 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-23 16:21:55 +0100 |
commit | 5e3480ba8f3dfd5368f323322de7eb79fcf8f97a (patch) | |
tree | 71a75edc24ebce9a6a6f9827f05a57488c43a2b9 /libs/surfaces/websockets/typed_value.h | |
parent | 224be912112941199fc8c2ff79518d2d2a2262d0 (diff) |
NO-OP: Re-indent websockets code
"Always use Tabstops for block-indent (the code must be
formatted correctly with "[TAB] = N spaces" for any value of N).
Use space only for alignment." - https://ardour.org/styleguide.html
Diffstat (limited to 'libs/surfaces/websockets/typed_value.h')
-rw-r--r-- | libs/surfaces/websockets/typed_value.h | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/libs/surfaces/websockets/typed_value.h b/libs/surfaces/websockets/typed_value.h index a30ef3e940..b79f17792f 100644 --- a/libs/surfaces/websockets/typed_value.h +++ b/libs/surfaces/websockets/typed_value.h @@ -23,43 +23,46 @@ class TypedValue { - public: +public: + enum Type { + Empty, + Bool, + Int, + Double, + String + }; - enum Type { - Empty, - Bool, - Int, - Double, - String - }; + TypedValue (); + TypedValue (bool); + TypedValue (int); + TypedValue (double); + TypedValue (std::string); - TypedValue (); - TypedValue (bool); - TypedValue (int); - TypedValue (double); - TypedValue (std::string); + bool empty () const + { + return _type == Empty; + }; + Type type () const + { + return _type; + }; - bool empty () const { return _type == Empty; }; - Type type () const { return _type; }; + operator bool () const; + operator int () const; + operator double () const; + operator std::string () const; - operator bool () const; - operator int () const; - operator double () const; - operator std::string () const; + bool operator== (const TypedValue& other) const; + bool operator!= (const TypedValue& other) const; - bool operator== (const TypedValue& other) const; - bool operator!= (const TypedValue& other) const; - - std::string debug_str () const; - - private: - - Type _type; - bool _b; - int _i; - double _d; - std::string _s; + std::string debug_str () const; +private: + Type _type; + bool _b; + int _i; + double _d; + std::string _s; }; #endif // typed_value_h |