openmw-tes3coop/vfs/tests/ogre_client_test.cpp
Nicolay Korslund 69e8f9c9db Renamed several dirs, files and classes. NOT TESTED.
- renamed imp_client/ to clients/ and ditto for servers/
- renamed imp/ to servers/
- renamed stream/input.h to stream/stream.h
- renamed Stream::InputStream to Stream::Stream
- updated various tests and makefiles
- NOT TESTED YET
2009-12-28 15:55:04 +01:00

39 lines
812 B
C++

#include "dummy_vfs.cpp"
#include "../clients/ogre_archive.h"
#include <iostream>
using namespace Ogre;
using namespace std;
void print(StringVectorPtr lst)
{
int s = lst->size();
for(int i=0; i<s; i++)
{
cout << " " << (*lst)[i] << endl;
}
}
int main()
{
VFS *vfs = new DummyVFS();
MangleArchive arc(vfs, "dummy");
cout << "Case: " << arc.isCaseSensitive() << endl;
cout << "Name: " << arc.getName() << endl;
cout << "Type: " << arc.getType() << endl;
cout << "All files:\n";
print(arc.list());
cout << "Non-recursive:\n";
print(arc.list(false, false));
cout << "Dirs:\n";
print(arc.list(false, true));
DataStreamPtr file = arc.open("file1");
cout << "filesize: " << file->size() << endl;
cout << "contents: " << file->getAsString() << endl;
return 0;
}