| - Cal3D 0.9 API Reference - |
00001 //****************************************************************************// 00002 // streamsource.h // 00003 // Copyright (C) 2001-2003 Bruno 'Beosil' Heidelberger // 00004 //****************************************************************************// 00005 // This library is free software; you can redistribute it and/or modify it // 00006 // under the terms of the GNU Lesser General Public License as published by // 00007 // the Free Software Foundation; either version 2.1 of the License, or (at // 00008 // your option) any later version. // 00009 //****************************************************************************// 00010 00011 #ifndef CAL_STREAMSOURCE_H 00012 #define CAL_STREAMSOURCE_H 00013 00014 //****************************************************************************// 00015 // Includes // 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(); //Can't use this 00049 }; 00050 00051 #endif
1.2.14
© 1997-2001
Dimitri van Heesch