summaryrefslogtreecommitdiff
path: root/libs/surfaces/websockets/typed_value.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-23 16:03:59 +0100
committerRobin Gareus <robin@gareus.org>2020-02-23 16:21:55 +0100
commit5e3480ba8f3dfd5368f323322de7eb79fcf8f97a (patch)
tree71a75edc24ebce9a6a6f9827f05a57488c43a2b9 /libs/surfaces/websockets/typed_value.h
parent224be912112941199fc8c2ff79518d2d2a2262d0 (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.h65
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