summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Elements/SenchaArray.h
diff options
context:
space:
mode:
Diffstat (limited to 'Sencha-lang/Elements/SenchaArray.h')
-rw-r--r--Sencha-lang/Elements/SenchaArray.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/Sencha-lang/Elements/SenchaArray.h b/Sencha-lang/Elements/SenchaArray.h
index d100553..9632536 100644
--- a/Sencha-lang/Elements/SenchaArray.h
+++ b/Sencha-lang/Elements/SenchaArray.h
@@ -11,20 +11,35 @@
#include "Element.h"
#include "../ContextManager.h"
+/**
+ * SenchaArray is an abstraction of array element in a language.
+ * It provides access to its elements and some basic methods.
+ * It uses context_manager to evaluate its elements. SenchaArray is created on the go and stored nowhere.
+ */
class SenchaArray: public Element {
public:
+ /**
+ * Basic, universal constructor.
+ */
SenchaArray(std::string name, ContextManager * context_manager);
+
+ /**
+ * Special constructor, used to deal with strings
+ */
SenchaArray(std::string name, ContextManager * context_manager, std::string);
- ContextManager * context_manager;
- std::string name;
+
typedef int IndexNumber;
IndexNumber add(SenchaObject value);
void set(IndexNumber index, SenchaObject value);
- IndexNumber max_index;
SenchaObject get(IndexNumber index);
- //lots of stuff
virtual ~SenchaArray();
+private:
+ ContextManager * context_manager;
+ std::string name;
+ IndexNumber max_index;
+
+
};
#endif /* SENCHAARRAY_H_ */