00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "../../gift-config.h"
00026 #ifdef __GIFT_WITH_PERL__
00027
00028 #ifndef _CACPERL
00029 #define _CACPERL
00030 #include "libGIFTAcPerl/include/uses-declarations.h"
00047 #include <string>
00048 #include "libMRML/include/TID.h"
00049 #include <iostream>
00050 #include <fstream>
00051 #include <list>
00052 #include <map>
00053 #ifdef HAS_HASH_MAP
00054 #include <hash_map>
00055 #else
00056 #define hash_map map
00057 #endif
00058 #include "libMRML/include/CAccessor.h"
00059 #include "libMRML/include/CSelfDestroyPointer.h"
00060
00061 class CXMLElement;
00062
00072 class CAcPerl:public CAccessor{
00073 private:
00078 CSelfDestroyPointer<CXMLElement> mCollectionElement;
00079
00080 public:
00081
00094 CAcPerl(const CXMLElement& inContentElement);
00098 ~CAcPerl();
00099
00105 virtual operator bool()const;
00106
00113 CXMLElement* cloneCollectionElement()const;
00117 string IDToURL(long int) const;
00121 struct pair<bool,CAccessorElement> IDToAccessorElement(long int) const;
00125 struct pair<bool,long int> URLToID(const string &) const;
00129 void getAllIDs(list<TID> &) const;
00133 void getAllAccessorElements(list<CAccessorElement> &) const;
00137 void getRandomIDs(list<long int > &, unsigned int) const;
00141 void getRandomAccessorElements(list<CAccessorElement > &, unsigned int) const;
00145 int size() const;
00146
00147
00148 };
00149
00150 #endif
00151 #endif