Last change
on this file since 11865 was 1536, checked in by sjboddie, 24 years ago |
Changes to get compiling on VC++ and gcc
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
961 bytes
|
Line | |
---|
1 | #include "stringArrayMap.h"
|
---|
2 |
|
---|
3 | stringArrayMap::stringArrayMap()
|
---|
4 | {
|
---|
5 | }
|
---|
6 |
|
---|
7 | void stringArrayMap::add(string key, stringArray array)
|
---|
8 | { this->_map[key].add(array);
|
---|
9 | }
|
---|
10 |
|
---|
11 | void stringArrayMap::addToArray(string key, string item)
|
---|
12 | { this->_map[key].add(item);
|
---|
13 | }
|
---|
14 |
|
---|
15 | void stringArrayMap::readArray(string key, stringArray &toArray)
|
---|
16 | { toArray = this->_map[key];
|
---|
17 | }
|
---|
18 |
|
---|
19 | stringArray &stringArrayMap::operator[] (const string &name)
|
---|
20 | { return this->_map[name];
|
---|
21 | }
|
---|
22 |
|
---|
23 | const string &stringArrayMap::key(unsigned int pos)
|
---|
24 | { map<string, stringArray, less<string> >::iterator here = this->_map.begin();
|
---|
25 | while (pos > 0)
|
---|
26 | { here ++;
|
---|
27 | pos --;
|
---|
28 | }
|
---|
29 | return (*here).first;
|
---|
30 | }
|
---|
31 |
|
---|
32 | stringArray &stringArrayMap::array(unsigned int pos)
|
---|
33 | { map<string, stringArray, less<string> >::iterator here = this->_map.begin();
|
---|
34 | while (pos > 0)
|
---|
35 | { here ++;
|
---|
36 | pos --;
|
---|
37 | }
|
---|
38 | return (*here).second;
|
---|
39 | }
|
---|
40 |
|
---|
41 | void stringArrayMap::clear()
|
---|
42 | { this->_map.empty();
|
---|
43 | }
|
---|
44 |
|
---|
45 | unsigned int stringArrayMap::size()
|
---|
46 | { return this->_map.size();
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.