1 |
bearsoft |
1.1 |
#include "../../String/String.h"
|
2 |
|
|
#include "../../String/StringInput.h"
|
3 |
|
|
#include "../../String/StringTools.h"
|
4 |
|
|
#include "../../String/Parse.h"
|
5 |
|
|
#include "../../System/System.h"
|
6 |
|
|
#include "../../Array/IntArray.h"
|
7 |
|
|
#include "../../Array/FloatArray.h"
|
8 |
|
|
#include "../../Array/StringArray.h"
|
9 |
|
|
#include "../../Array/ObjectArray.h"
|
10 |
|
|
#include "../../String/ExtPropertiesElement.h"
|
11 |
|
|
#include "ArrayTest4.h"
|
12 |
|
|
#include "../../System/SystemDefine.h"
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
ArrayTest4::ArrayTest4(){}
|
16 |
|
|
ArrayTest4::~ArrayTest4(){}
|
17 |
|
|
|
18 |
|
|
void ArrayTest4::run()
|
19 |
|
|
{
|
20 |
|
|
ObjectArray<ExtPropertiesElement> *objectArray = new ObjectArray<ExtPropertiesElement>(1);
|
21 |
|
|
|
22 |
|
|
String key="halleluja";
|
23 |
|
|
String data="stuff";
|
24 |
|
|
|
25 |
|
|
objectArray->setObject(new ExtPropertiesElement(key.buffer,data.buffer), 0);
|
26 |
|
|
objectArray->addLast(new ExtPropertiesElement(key.buffer,data.buffer));
|
27 |
|
|
|
28 |
|
|
for (int i=0; i<objectArray->size ; i++ )
|
29 |
|
|
{
|
30 |
|
|
System::println(objectArray->getObject(i)->key);
|
31 |
|
|
System::println(objectArray->getObject(i)->data);
|
32 |
|
|
}
|
33 |
|
|
|
34 |
|
|
delete objectArray;
|
35 |
|
|
|
36 |
|
|
ObjectArray<ExtPropertiesElement> *objectArray2 = new ObjectArray<ExtPropertiesElement>(1);
|
37 |
|
|
|
38 |
|
|
String key2="arne";
|
39 |
|
|
String data2="blaha";
|
40 |
|
|
|
41 |
|
|
objectArray2->setObject(new ExtPropertiesElement(key2.buffer,data2.buffer), 0);
|
42 |
|
|
|
43 |
|
|
System::println(objectArray2->getObject(0)->data);
|
44 |
|
|
|
45 |
|
|
delete objectArray2;
|
46 |
|
|
|
47 |
|
|
} |