Last change
on this file since 11554 was 1673, checked in by cs025, 24 years ago |
Fixed problem in uninstalling which appeared when uninstalling the shortcut
icons.
Parameters to undo didn't permit two parameters to be the same, and if for
example a shortcut was in a group with the same name, a parameter
disappeared. Fixed by extending stringArray class to be configured to accept
duplicate entries.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1536] | 1 | #ifndef _STRINGARRAY_H_
|
---|
| 2 | #define _STRINGARRAY_H_
|
---|
| 3 | #include <string>
|
---|
| 4 | #include <vector>
|
---|
| 5 | #include <map>
|
---|
[1539] | 6 |
|
---|
| 7 | // use the standard namespace
|
---|
| 8 | #if !defined (GSDL_NAMESPACE_BROKEN)
|
---|
| 9 | #if defined(GSDL_USE_OBJECTSPACE)
|
---|
| 10 | using namespace ospace::std;
|
---|
| 11 | #else
|
---|
[1536] | 12 | using namespace std;
|
---|
[1539] | 13 | #endif
|
---|
| 14 | #endif
|
---|
| 15 |
|
---|
[1536] | 16 | #include <string.h>
|
---|
| 17 |
|
---|
| 18 | class stringArray
|
---|
| 19 | {
|
---|
| 20 | private:
|
---|
[1673] | 21 | vector<string> array;
|
---|
| 22 | bool permitDups;
|
---|
[1536] | 23 | protected:
|
---|
| 24 | public:
|
---|
| 25 | stringArray();
|
---|
| 26 | stringArray(char *list, char *divider);
|
---|
[1673] | 27 | void permitDuplication(bool permit);
|
---|
[1536] | 28 | void add(char *member);
|
---|
| 29 | void add(string member);
|
---|
| 30 | void add(stringArray &array);
|
---|
| 31 | void insertAt(string member, unsigned int at);
|
---|
| 32 | void remove(char *member);
|
---|
| 33 | void remove(string member);
|
---|
| 34 | void clear();
|
---|
| 35 | bool includes(char *member);
|
---|
| 36 | bool includes(string member);
|
---|
| 37 | static stringArray words(char *line);
|
---|
| 38 | unsigned int size(){ return this->array.size(); };
|
---|
| 39 | int indexOf(char *member);
|
---|
| 40 | int indexOf(string member);
|
---|
| 41 | int writeToCString(char *buffer, char *divider, int bufflen);
|
---|
| 42 | string toString(string separator);
|
---|
| 43 | string &operator[](const unsigned int);
|
---|
| 44 | };
|
---|
| 45 |
|
---|
| 46 | typedef map<string, stringArray, less<string> > strArrayMap;
|
---|
| 47 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.