SO3Engine
SO3ScolUrl.cpp
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OpenSpace3D
4 For the latest info, see http://www.openspace3d.com
5 
6 Copyright (c) 2012 I-maginer
7 
8 This program is free software; you can redistribute it and/or modify it under
9 the terms of the GNU Lesser General Public License as published by the Free Software
10 Foundation; either version 2 of the License, or (at your option) any later
11 version.
12 
13 This program is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License along with
18 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20 http://www.gnu.org/copyleft/lesser.txt
21 
22 -----------------------------------------------------------------------------
23 */
24 
30 #include "SO3Utils/SO3ScolUrl.h"
31 #include <scolPlugin.h>
32 
33 namespace SO3
34 {
35 
36 /*#include <sys/types.h>
37 #include <sys/stat.h>
38 
39 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE
40 # include "OgreSearchOps.h"
41 # include <sys/param.h>
42 # define MAX_PATH MAXPATHLEN
43 #endif
44 
45 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
46 # define WIN32_LEAN_AND_MEAN
47 # define NOMINMAX // required to stop windows.h messing up std::min
48 # include <windows.h>
49 # include <direct.h>
50 # include <io.h>
51 #endif*/
52 
53 //-----------------------------------------------------------------------
54 SO3ScolUrlArchive::SO3ScolUrlArchive(const Ogre::String& name, const Ogre::String& archType) : Ogre::Archive(name, archType)
55 {
56 }
57 
58 //-----------------------------------------------------------------------
60 {
61  return false;
62 }
63 
64 //-----------------------------------------------------------------------
66 {
67  unload();
68 }
69 
70 //-----------------------------------------------------------------------
72 {
73  // TODO
74 }
75 
76 //-----------------------------------------------------------------------
78 {
79  // TODO
80 }
81 
82 //-----------------------------------------------------------------------
83 #if OGRE_VERSION < ((1 << 16) | (7 << 8) | 0)
84 Ogre::DataStreamPtr SO3ScolUrlArchive::open(const Ogre::String& filename)
85 #else
86 Ogre::DataStreamPtr SO3ScolUrlArchive::open(const Ogre::String& filename, bool readOnly) const
87 #endif
88 {
89  // TODO
90  return Ogre::DataStreamPtr();
91 }
92 
93 //-----------------------------------------------------------------------
94 Ogre::StringVectorPtr SO3ScolUrlArchive::list(bool recursive, bool dirs) const
95 {
96  // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category
97  Ogre::StringVectorPtr ret(OGRE_NEW_T(Ogre::StringVector, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T);
98 
99  // TODO
100 
101  return ret;
102 }
103 
104 //-----------------------------------------------------------------------
105 Ogre::FileInfoListPtr SO3ScolUrlArchive::listFileInfo(bool recursive, bool dirs) const
106 {
107  // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category
108  Ogre::FileInfoListPtr ret(OGRE_NEW_T(Ogre::FileInfoList, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T);
109 
110  // TODO
111 
112  return ret;
113 }
114 
115 //-----------------------------------------------------------------------
116 Ogre::StringVectorPtr SO3ScolUrlArchive::find(const Ogre::String& pattern, bool recursive, bool dirs) const
117 {
118  // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category
119  Ogre::StringVectorPtr ret(OGRE_NEW_T(Ogre::StringVector, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T);
120 
121  // TODO
122 
123  return ret;
124 }
125 
126 //-----------------------------------------------------------------------
127 Ogre::FileInfoListPtr SO3ScolUrlArchive::findFileInfo(const Ogre::String& pattern, bool recursive, bool dirs) const
128 {
129  // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category
130  Ogre::FileInfoListPtr ret(OGRE_NEW_T(Ogre::FileInfoList, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T);
131 
132  // TODO
133 
134  return ret;
135 }
136 
137 //-----------------------------------------------------------------------
138 bool SO3ScolUrlArchive::exists(const Ogre::String& filename) const
139 {
140  // TODO
141  return false;
142 }
143 
144 //---------------------------------------------------------------------
145 time_t SO3ScolUrlArchive::getModifiedTime(const Ogre::String& filename) const
146 {
147  // TODO
148  return 0;
149 }
150 
151 }
SO3ScolUrlArchive(const Ogre::String &name, const Ogre::String &archType)
Definition: SO3ScolUrl.cpp:54
virtual time_t getModifiedTime(const Ogre::String &filename) const
virtual bool isCaseSensitive() const
Definition: SO3ScolUrl.cpp:59
virtual bool exists(const Ogre::String &filename) const
virtual Ogre::DataStreamPtr open(const Ogre::String &filename, bool readOnly=true) const
virtual void unload()
Definition: SO3ScolUrl.cpp:77
virtual Ogre::FileInfoListPtr listFileInfo(bool recursive=true, bool dirs=false) const
virtual Ogre::StringVectorPtr find(const Ogre::String &pattern, bool recursive=true, bool dirs=false) const
virtual Ogre::FileInfoListPtr findFileInfo(const Ogre::String &pattern, bool recursive=true, bool dirs=false) const
virtual Ogre::StringVectorPtr list(bool recursive=true, bool dirs=false) const
virtual void load()
Definition: SO3ScolUrl.cpp:71