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
00026
00027
00033 #ifndef __SO3_SCOL_URL_H__
00034 #define __SO3_SCOL_URL_H__
00035
00036 #include "..\SCOLBasic\SO3Std.h"
00037
00038 namespace SO3
00039 {
00040
00044 class SO3ScolUrlArchive : public Ogre::Archive
00045 {
00046 public:
00050 SO3ScolUrlArchive(const Ogre::String& name, const Ogre::String& archType);
00051
00055 ~SO3ScolUrlArchive();
00056
00060 bool isCaseSensitive() const;
00061
00065 void load();
00066
00070 void unload();
00071
00075 #if OGRE_VERSION < ((1 << 16) | (7 << 8) | 0)
00076 Ogre::DataStreamPtr open(const Ogre::String& filename) const;
00077 #else
00078 Ogre::DataStreamPtr open(const Ogre::String& filename, bool readOnly = true) const;
00079 #endif
00080
00084 Ogre::StringVectorPtr list(bool recursive = true, bool dirs = false);
00085
00089 Ogre::FileInfoListPtr listFileInfo(bool recursive = true, bool dirs = false);
00090
00094 Ogre::StringVectorPtr find(const Ogre::String& pattern, bool recursive = true, bool dirs = false);
00095
00099
00100 #if OGRE_VERSION < ((1 << 16) | (7 << 8) | 0)
00101 Ogre::FileInfoListPtr findFileInfo(const Ogre::String& pattern, bool recursive = true, bool dirs = false);
00102 #else
00103 Ogre::FileInfoListPtr findFileInfo(const Ogre::String& pattern, bool recursive = true, bool dirs = false) const;
00104 #endif
00105
00109 bool exists(const Ogre::String& filename);
00110
00114 time_t getModifiedTime(const Ogre::String& filename);
00115 };
00116
00120 class SO3ScolUrlArchiveFactory : public Ogre::ArchiveFactory
00121 {
00122 public:
00126 virtual ~SO3ScolUrlArchiveFactory()
00127 {
00128 }
00129
00133 const Ogre::String& getType() const
00134 {
00135 static Ogre::String name = "ScolURL";
00136 return name;
00137 }
00138
00142 Ogre::Archive *createInstance(const Ogre::String& name)
00143 {
00144 return OGRE_NEW SO3ScolUrlArchive(name, "ScolURL");
00145 }
00146
00150 void destroyInstance(Ogre::Archive* arch)
00151 {
00152 delete arch;
00153 }
00154 };
00155
00156 }
00157
00158 #endif