Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 61 lines (52 sloc) 2.217 kB
0c910b8 @NotFound start reorganizing components
authored
1 #ifndef INCLUDE_WINXEDXX_OBJECT_H
2 #define INCLUDE_WINXEDXX_OBJECT_H
3
4 // winxedxx_object.h
21f52be @NotFound more reorganization
authored
5 // (C) 2011 Julián Albo "NotFound"
0c910b8 @NotFound start reorganizing components
authored
6
7 namespace WinxedXX
8 {
9
788ce11 @NotFound unify reference counting
authored
10 class WxxObject : public WxxRefcounted
0c910b8 @NotFound start reorganizing components
authored
11 {
12 public:
13 virtual int is_null() const = 0;
011c83d @NotFound class_name method in internal classes and better message on method no…
authored
14 virtual std::string class_name() const = 0;
0c910b8 @NotFound start reorganizing components
authored
15 virtual int instanceof(const std::string &type) = 0;
16 virtual int get_bool() = 0;
17 virtual int get_integer() = 0;
18 virtual double get_number() = 0;
df1d6bb @NotFound get_pointer and set_pointer vtables, some use in nci
authored
19 virtual void * get_pointer() = 0;
20 virtual void set_pointer(void *p) = 0;
576f7d3 @NotFound use more explicit conversions
authored
21 virtual int elements() const = 0;
0c910b8 @NotFound start reorganizing components
authored
22 virtual std::string get_string() = 0;
68c48f9 @NotFound improve a bit is_equal and fix it for Integer-Integer
authored
23 virtual int is_equal(const WxxObject &to) = 0;
0c910b8 @NotFound start reorganizing components
authored
24 virtual WxxObject & set(int value) = 0;
25 virtual WxxObject & set(double value) = 0;
26 virtual WxxObject & set(const std::string &s) = 0;
6f2c030 @NotFound var preincrement and WxxInteger::increment
authored
27 virtual void increment() = 0;
5e6ce74 @NotFound operator pre -- and decrement in Integer
authored
28 virtual void decrement() = 0;
4e6e131 @NotFound add and sub vtables, remove print vtables
authored
29 virtual WxxObjectPtr add(const WxxObjectPtr &value) = 0;
30 virtual WxxObjectPtr sub(const WxxObjectPtr &value) = 0;
5276bd7 @NotFound get_integer_keyed and get_number_keyed (int)
authored
31 virtual int get_integer_keyed(int i) = 0;
32 virtual double get_number_keyed(int i) = 0;
0c910b8 @NotFound start reorganizing components
authored
33 virtual std::string get_string_keyed(int i) = 0;
34 virtual WxxObjectPtr get_pmc_keyed(int i) = 0;
35 virtual WxxObjectPtr get_pmc_keyed(const std::string &s) = 0;
622f3db @NotFound add the get_pmc_keyed vtable function and improve keyed defaults
authored
36 virtual WxxObjectPtr get_pmc_keyed(const WxxObjectPtr &key) = 0;
0c910b8 @NotFound start reorganizing components
authored
37 virtual void set_pmc_keyed(int i, const WxxObjectPtr &value) = 0;
000b8f1 @NotFound implement 'exists'
authored
38 virtual int exists(const std::string &key) = 0;
0c910b8 @NotFound start reorganizing components
authored
39 virtual WxxObjectPtr & set_pmc_keyed(const std::string &s, const WxxObjectPtr &value) = 0;
40 virtual WxxObjectPtr & get_attr_str(const std::string &s) = 0;
41 virtual void set_attr_str(const std::string &s, const WxxObjectPtr &value) = 0;
42 virtual WxxObjectPtr get_iter() = 0;
43 virtual WxxObjectPtr shift_pmc() = 0;
44
bc6a98b @NotFound Improvements in object model:
authored
45 virtual WxxObjectPtr get_class() = 0;
46 virtual WxxObjectPtr instantiate() = 0;
0c910b8 @NotFound start reorganizing components
authored
47 virtual WxxObjectPtr operator()(WxxObjectArray &args) = 0;
48 virtual WxxObjectPtr call_method(const std::string &methname, WxxObjectArray &args) = 0;
49 };
50
21f52be @NotFound more reorganization
authored
51 WxxObjectPtr wxx_getstdin();
52 WxxObjectPtr wxx_getstdout();
53 WxxObjectPtr wxx_getstderr();
097f8b8 @NotFound declare wxx_spawnw
authored
54 WxxObjectPtr wxx_spawnw(WxxObjectPtr obj);
21f52be @NotFound more reorganization
authored
55
0c910b8 @NotFound start reorganizing components
authored
56 } // namespace WinxedXX
57
58 #endif
59
60 // End of winxedxx_object.h
Something went wrong with that request. Please try again.