- Cal3D 0.11 API Reference -

buffersource.h
1//****************************************************************************//
2// buffersource.h //
3// Copyright (C) 2001-2003 Bruno 'Beosil' Heidelberger //
4//****************************************************************************//
5// This library is free software; you can redistribute it and/or modify it //
6// under the terms of the GNU Lesser General Public License as published by //
7// the Free Software Foundation; either version 2.1 of the License, or (at //
8// your option) any later version. //
9//****************************************************************************//
10
11#ifndef CAL_BUFFERSOURCE_H
12#define CAL_BUFFERSOURCE_H
13
14//****************************************************************************//
15// Includes //
16//****************************************************************************//
17
18#include "cal3d/global.h"
19#include "cal3d/datasource.h"
20#include <istream>
21
28
29
30 class CAL3D_API CalBufferSource : public CalDataSource
31{
32 public:
33 CalBufferSource(void* inputBuffer);
34 virtual ~CalBufferSource();
35
36 virtual bool ok() const;
37 virtual void setError() const;
38 virtual bool readBytes(void* pBuffer, int length);
39 virtual bool readFloat(float& value);
40 virtual bool readInteger(int& value);
41 virtual bool readString(std::string& strValue);
42
43 protected:
44
45 void* mInputBuffer;
46 unsigned int mOffset;
47
48 private:
49 CalBufferSource(); //Can't use this
50};
51
52#endif
CalBufferSource::CalBufferSource
CalBufferSource(void *inputBuffer)
Constructs a buffer source instance from an existing memory buffer.
Definition buffersource.cpp:30
CalBufferSource::ok
virtual bool ok() const
Checks whether the data source is in a good state.
Definition buffersource.cpp:56
CalBufferSource::readFloat
virtual bool readFloat(float &value)
Reads a float.
Definition buffersource.cpp:110
CalBufferSource::readInteger
virtual bool readInteger(int &value)
Reads an integer.
Definition buffersource.cpp:133
CalBufferSource::readString
virtual bool readString(std::string &strValue)
Reads a string.
Definition buffersource.cpp:156
CalBufferSource::readBytes
virtual bool readBytes(void *pBuffer, int length)
Reads a number of bytes.
Definition buffersource.cpp:87
CalBufferSource::setError
virtual void setError() const
Sets the error code and message related to a memory buffer source.
Definition buffersource.cpp:69
CalDataSource
CalDataSource abstract interface class.
Definition datasource.h:35

Generated by The Cal3D Team with Doxygen 1.15.0