2010-06-03 18:13:27 +00:00
|
|
|
#include "../servers/memory_stream.hpp"
|
|
|
|
#include "../clients/ogre_datastream.hpp"
|
2009-12-19 07:26:01 +00:00
|
|
|
#include <iostream>
|
|
|
|
|
2009-12-29 15:16:33 +00:00
|
|
|
using namespace Mangle::Stream;
|
2009-12-19 07:26:01 +00:00
|
|
|
using namespace Ogre;
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2010-01-01 15:39:11 +00:00
|
|
|
StreamPtr inp(new MemoryStream("hello world", 11));
|
|
|
|
DataStreamPtr p(new Mangle2OgreStream("hello", inp));
|
2009-12-19 07:26:01 +00:00
|
|
|
cout << "Name: " << p->getName() << endl;
|
|
|
|
cout << "As string: " << p->getAsString() << endl;
|
|
|
|
cout << "pos=" << p->tell() << " eof=" << p->eof() << endl;
|
|
|
|
p->seek(0);
|
|
|
|
cout << "pos=" << p->tell() << " eof=" << p->eof() << endl;
|
|
|
|
p->skip(5);
|
|
|
|
p->skip(-2);
|
|
|
|
cout << "pos=" << p->tell() << " eof=" << p->eof() << endl;
|
|
|
|
return 0;
|
|
|
|
}
|