OSDN Git Service

initial files
[iptd/iPTd_R3.git] / src / Raym / Array.h
1 //\r
2 // Array.h\r
3 //\r
4 \r
5 #ifndef __RAYM_ARRAY_H__\r
6 #define __RAYM_ARRAY_H__\r
7 \r
8 #include <vector>\r
9 \r
10 #include <Raym/Object.h>\r
11 \r
12 namespace Raym\r
13 {\r
14 \r
15 class Array : public Object\r
16 {\r
17 protected:\r
18     Array();\r
19     ~Array();\r
20 \r
21     std::vector<Object *> _array;\r
22 \r
23 public:\r
24     //\r
25     static Array *arrayWithCapacity(UInteger numItems);\r
26     static Array *alloc();\r
27     Array *initWithCapacity(UInteger numItems);\r
28     Array *retain();\r
29     Array *autorelease();\r
30 \r
31     UInteger count();\r
32     void addObject(Object *object);\r
33     void addObjectsFromArray(Array *array);\r
34     Object *objectAtIndex(UInteger index);\r
35 \r
36     void insertObject(Object *object, UInteger index);\r
37 \r
38     void removeObject(Object *object);\r
39     void removeObjectAtIndex(UInteger index);\r
40 \r
41     void removeAllObjects();\r
42 \r
43     Array *sortedArrayUsingFunction(Integer (*function)(Object *, Object *, void *), void *context);\r
44 \r
45     virtual const char *className();\r
46 };\r
47 \r
48 } // Raym\r
49 \r
50 #endif // __RAYM_ARRAY_H__\r