doc: Fixed newlines (specified by <BR> rather than \n)
[sdk] / doc / ecere / ecere / com / Array.econ
1 {
2    name = "Array",
3    description = "A dynamically resizable array template",
4    usage = "The array object can be indexed with the [ ] operator.<br><br>Elements of the array individually allocated on the heap are not freed unless Free() is invoked.<br><br>The array itself is must be instantiated and deleted as it is a ckass type.",
5    example = "void test()<br>{<br>   Array points { size = 10 };<br>   points[0] = { 10, 10 };<br>   points.size = 20;<br>   points[19] = { 5, 5 };<br>   delete points;<br>}",
6    remarks = "The Array container class (like all containr classes) comes with some level of overhead, including an implied extra reference level and the overhead of multiple re-allocations. If dynamic reallocation is not required, stick to regular C arrays (e.g. int array[10]).",
7    also = "Container",
8    fields = [
9       {
10          "array",
11          {
12             description = "Pointer to the storage for the array"
13          }
14       },
15       {
16          "count",
17          {
18             description = "The number of elements in the array. Setting this value does NOT allocat storage. Be careful setting this and using Add() on the same Array."
19          }
20       }
21    ],
22    properties = [
23       {
24          "minAllocSize",
25          {
26             description = "Minimum number of elements for which storage is allocated in  the array"
27          }
28       },
29       {
30          "size",
31          {
32             description = "Set this property to allocate storage for the array"
33          }
34       }
35    ]
36 }