00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_STREAMSOURCE_H
00012 #define CAL_STREAMSOURCE_H
00013
00014
00015
00016
00017
00018 #include "cal3d/global.h"
00019 #include "cal3d/datasource.h"
00020 #include <istream>
00021
00030 class CAL3D_API CalStreamSource : public CalDataSource
00031 {
00032 public:
00033 CalStreamSource(std::istream& inputStream);
00034 virtual ~CalStreamSource();
00035
00036 virtual bool ok() const;
00037 virtual void setError() const;
00038 virtual bool readBytes(void* pBuffer, int length);
00039 virtual bool readFloat(float& value);
00040 virtual bool readInteger(int& value);
00041 virtual bool readString(std::string& strValue);
00042
00043 protected:
00044
00045 std::istream* mInputStream;
00046
00047 private:
00048 CalStreamSource();
00049 };
00050
00051 #endif