Last change
on this file since 13773 was 8182, checked in by cs025, 20 years ago |
Added OAI Server code to Greenstone
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
828 bytes
|
Rev | Line | |
---|
[8182] | 1 | #include <map>
|
---|
| 2 |
|
---|
| 3 | #include "text_t.h"
|
---|
| 4 |
|
---|
| 5 | class oaiargs
|
---|
| 6 | {
|
---|
| 7 | private:
|
---|
| 8 | text_tmap arguments;
|
---|
| 9 | text_t dummy;
|
---|
| 10 | bool duplicateArg;
|
---|
| 11 | // fill the input buffer to parse the arguments
|
---|
| 12 | void fillBuffer(istream &stream, unsigned char *buffer, unsigned char **currentPtr, unsigned char *end);
|
---|
| 13 | public:
|
---|
| 14 | oaiargs() { this->duplicateArg = false; }
|
---|
| 15 |
|
---|
| 16 | const text_t &operator [](const text_t &label) {
|
---|
| 17 | if (this->arguments.count(label) > 0) {
|
---|
| 18 | return this->arguments[label];
|
---|
| 19 | }
|
---|
| 20 | return dummy; // Dodgy, but text_t's are initialised to "", so should be fine
|
---|
| 21 | };
|
---|
| 22 | void readArgs(istream &stream);
|
---|
| 23 | bool hasDuplicateArg() { return this->duplicateArg; }
|
---|
| 24 | int getSize(){return arguments.size();}
|
---|
| 25 | text_tmap::const_iterator begin(){return arguments.begin();};
|
---|
| 26 | text_tmap::const_iterator end(){return arguments.end();};
|
---|
| 27 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.