00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00043 #ifndef _CACURL2FTS
00044 #define _CACURL2FTS
00045 #include "libGIFTAcURL2FTS/include/uses-declarations.h"
00046 #include <string>
00047 #include "libMRML/include/TID.h"
00048 #include <iostream>
00049 #include <fstream>
00050 #include <map>
00051 #ifdef HAS_HASH_MAP
00052 #include <hash_map>
00053 #else
00054 #define hash_map map
00055 #endif
00056 #include "libMRML/include/CAccessorImplementation.h"
00057 #include "libMRML/include/CMutex.h"
00058 class CXMLElement;
00059
00064 class CAcURL2FTS:public CAccessorImplementation{
00065 private:
00067 bool mWellConstructed;
00068 protected:
00072 TID mID;
00076 string mURLPrefix;
00080 string mThumbnailURLPrefix;
00086 CMutex mMutexURL2FTS;
00088 string_string_map mURLToFFN;
00090 TID_string_map mIDToFFN;
00092 mutable ifstream mURLToFeatureFile;
00096 string mURLToFeatureFileName;
00097
00098 friend class CAcIFFileSystem;
00099 public:
00101 const string& getURLToFeatureFileName()const;
00102
00120 CAcURL2FTS(const CXMLElement& inContentElement);
00121
00127 virtual operator bool()const;
00133 virtual int size()const;
00140 pair<bool,string> URLToFFN(const string& inURL)const;
00147 pair<bool,string> IDToFFN(TID inID)const;
00149 friend void newStartURL2FTSElement(void *inUserData,
00150 const char *inElementName,
00151 const char **inAttributes);
00153 friend void newEndURL2FTSElement(void *inUserData,
00154 const char *inElementName);
00155 };
00156
00157 #endif