summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Elements/SenchaObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Sencha-lang/Elements/SenchaObject.h')
-rw-r--r--Sencha-lang/Elements/SenchaObject.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/Sencha-lang/Elements/SenchaObject.h b/Sencha-lang/Elements/SenchaObject.h
index 55d8501..6b062a9 100644
--- a/Sencha-lang/Elements/SenchaObject.h
+++ b/Sencha-lang/Elements/SenchaObject.h
@@ -12,21 +12,31 @@
#include "../Utils/to_string.h"
#include "Element.h"
+
+/**
+ * SenchaObject stores values in SenchaLang. It handles operations on them, thanks to defined, overloaded operators.
+ * Also provides representation of values.
+ */
class SenchaObject : public Element {
public:
+ /**
+ * Possible types of SenchaObject
+ */
typedef enum {
string_literal,
integer_number,
float_number,
null,
- symbol,
boolean,
invalid
} Type;
Type type;
+ /**
+ * repr() returns representation of value as a string
+ */
virtual std::string repr();
virtual std::string str();
virtual bool is_true();
@@ -51,6 +61,7 @@ public:
SenchaObject(std::string text) { set_value(text); }
+ //Operators used in expressions
virtual SenchaObject operator< (const SenchaObject& right)const;
virtual SenchaObject operator> (const SenchaObject& right)const;
virtual SenchaObject operator<= (const SenchaObject& right)const;