#include <OgreSDDataChunk.h>
Inheritance diagram for Ogre::SDDataChunk:
Public Methods | |
SDDataChunk () | |
SDDataChunk (void *pData, size_t size) | |
~SDDataChunk () | |
Overloaded destructor. | |
uchar * | allocate (size_t size, const uchar *ptr=NULL) |
Allocates the passed number of bytes. | |
DataChunk & | clear () |
Frees all internally allocated memory. | |
size_t | getSize () const |
Returns the size of the allocated chunk in bytes. | |
uchar * | getPtr () |
Returns a const pointer to the start of the memory. | |
const uchar * | getPtr () const |
Returns a const pointer to the start of the memory. | |
size_t | read (void *buffer, size_t size) |
Reads memory from the main buffer into another, incrementing an internal 'current' pointer to allow progressive reads. | |
DataChunk & | seek (size_t pos) |
Repositions the internal read pointer to a specified byte. | |
DataChunk & | skip (long offset) |
Moves the internal read pointer backwards or forwards by the number of bytes specified. | |
size_t | readUpTo (void *buffer, size_t size, const char *delim="\n") |
Reads data into the provided buffer until hitting the specified character or reaching the upper limit provided. | |
size_t | skipUpTo (const char *delim) |
Skips data into the provided buffer until hitting the specified character or reaching the end of the data. | |
bool | isEOF () const |
Returns true if the buffer pointer has reached the end of the buffer. | |
String | getLine (bool trimAfter=true) |
Returns a String containing the next line of data, optionally trimmed for whitespace. | |
String | getAsString (void) const |
Get the entire contents of the chunk as a string. | |
Protected Attributes | |
uchar * | mData |
uchar * | mPos |
uchar * | mEnd |
size_t | mSize |
This class contains all the functionality of the DataChunk superclass, only that when an object of this class gets deleted, it also deletes the allocated memory (SD stands for Self-Delete).
Definition at line 44 of file OgreSDDataChunk.h.
|
Definition at line 30 of file OgreSDDataChunk.cpp. |
|
Definition at line 35 of file OgreSDDataChunk.cpp. |
|
Overloaded destructor.
Definition at line 40 of file OgreSDDataChunk.cpp. References Ogre::DataChunk::mData. |
|
Allocates the passed number of bytes.
Definition at line 46 of file OgreDataChunk.cpp. References Ogre::DataChunk::mData, Ogre::DataChunk::mEnd, Ogre::DataChunk::mPos, Ogre::DataChunk::mSize, and Ogre::uchar. Referenced by Ogre::TGACodec::decode(), Ogre::ILImageCodec::decode(), Ogre::DDSCodec::decode(), Ogre::BMPCodec::decode(), and Ogre::Zip::fileRead(). |
|
Frees all internally allocated memory.
Definition at line 69 of file OgreDataChunk.cpp. References Ogre::DataChunk::mData, and Ogre::DataChunk::mSize. Referenced by Ogre::Skeleton::load(), Ogre::Mesh::load(), and Ogre::BspLevel::load(). |
|
Get the entire contents of the chunk as a string.
Definition at line 185 of file OgreDataChunk.cpp. References Ogre::DataChunk::mData, and Ogre::DataChunk::mSize. Referenced by Ogre::GpuProgram::load(), Ogre::D3D9GpuProgram::load(), and Ogre::HighLevelGpuProgram::loadHighLevelImpl(). |
|
|
Returns a const pointer to the start of the memory.
|
|
Returns a const pointer to the start of the memory.
Definition at line 87 of file OgreDataChunk.cpp. References Ogre::DataChunk::mData, and Ogre::uchar. Referenced by Ogre::D3D9Texture::_loadCubeTex(), Ogre::D3D9Texture::_loadNormTex(), Ogre::D3D9Texture::_loadVolumeTex(), Ogre::Font::createTextureFromFont(), Ogre::TGACodec::decode(), Ogre::ILImageCodec::decode(), Ogre::DDSCodec::decode(), Ogre::BMPCodec::decode(), Ogre::Zip::fileRead(), Ogre::Quake3Level::initialise(), Ogre::Image::load(), and Ogre::Image::loadRawData(). |
|
Returns the size of the allocated chunk in bytes.
Definition at line 81 of file OgreDataChunk.cpp. References Ogre::DataChunk::mSize. Referenced by Ogre::D3D9Texture::_loadCubeTex(), Ogre::D3D9Texture::_loadNormTex(), Ogre::D3D9Texture::_loadVolumeTex(), Ogre::Font::createTextureFromFont(), Ogre::TGACodec::decode(), Ogre::ILImageCodec::decode(), Ogre::DDSCodec::decode(), Ogre::BMPCodec::decode(), Ogre::Win32Window::writeContentsToFile(), and Ogre::SDLWindow::writeContentsToFile(). |
|
Returns true if the buffer pointer has reached the end of the buffer.
Definition at line 163 of file OgreDataChunk.cpp. References Ogre::DataChunk::mEnd, and Ogre::DataChunk::mPos. Referenced by Ogre::MeshSerializerImpl::importMesh(), Ogre::SkeletonSerializer::importSkeleton(), Ogre::ParticleSystemManager::parseNewAffector(), Ogre::OverlayManager::parseNewElement(), Ogre::ParticleSystemManager::parseNewEmitter(), Ogre::OverlayManager::parseNewMesh(), Ogre::Quake3ShaderManager::parseNewShaderPass(), Ogre::OverlayManager::parseOverlayFile(), Ogre::ParticleSystemManager::parseScript(), Ogre::MaterialSerializer::parseScript(), Ogre::FontManager::parseScript(), Ogre::Quake3ShaderManager::parseShaderFile(), Ogre::SkeletonSerializer::readAnimation(), Ogre::SkeletonSerializer::readAnimationTrack(), Ogre::MeshSerializerImpl_v1::readGeometry(), Ogre::MeshSerializerImpl::readGeometry(), Ogre::MeshSerializerImpl_v1::readMaterial(), Ogre::MeshSerializerImpl_v1::readMesh(), Ogre::MeshSerializerImpl::readMesh(), Ogre::MeshSerializerImpl_v1::readSubMesh(), Ogre::MeshSerializerImpl::readSubMesh(), Ogre::MeshSerializerImpl::readSubMeshNameTable(), Ogre::ParticleSystemManager::skipToNextCloseBrace(), Ogre::OverlayManager::skipToNextCloseBrace(), Ogre::ParticleSystemManager::skipToNextOpenBrace(), and Ogre::OverlayManager::skipToNextOpenBrace(). |
|
Reads memory from the main buffer into another, incrementing an internal 'current' pointer to allow progressive reads.
Definition at line 99 of file OgreDataChunk.cpp. References Ogre::DataChunk::mEnd, and Ogre::DataChunk::mPos. Referenced by Ogre::Serializer::readBools(), Ogre::Serializer::readInts(), Ogre::Serializer::readLongs(), Ogre::Serializer::readReals(), and Ogre::Serializer::readShorts(). |
|
Reads data into the provided buffer until hitting the specified character or reaching the upper limit provided.
Definition at line 132 of file OgreDataChunk.cpp. References Ogre::DataChunk::mEnd, and Ogre::DataChunk::mPos. Referenced by Ogre::DataChunk::getLine(), Ogre::Quake3ShaderManager::parseShaderFile(), and Ogre::Serializer::readString(). |
|
Repositions the internal read pointer to a specified byte.
Definition at line 114 of file OgreDataChunk.cpp. References Ogre::DataChunk::mData, Ogre::DataChunk::mPos, and Ogre::DataChunk::mSize. Referenced by Ogre::MeshSerializer::importMesh(). |
|
Moves the internal read pointer backwards or forwards by the number of bytes specified.
Definition at line 122 of file OgreDataChunk.cpp. References Ogre::DataChunk::mData, Ogre::DataChunk::mEnd, and Ogre::DataChunk::mPos. Referenced by Ogre::SkeletonSerializer::readAnimation(), Ogre::SkeletonSerializer::readAnimationTrack(), Ogre::MeshSerializerImpl_v1::readGeometry(), Ogre::MeshSerializerImpl::readGeometry(), Ogre::MeshSerializerImpl_v1::readMaterial(), Ogre::MeshSerializerImpl_v1::readMesh(), Ogre::MeshSerializerImpl::readMesh(), Ogre::MeshSerializerImpl_v1::readSubMesh(), Ogre::MeshSerializerImpl::readSubMesh(), and Ogre::MeshSerializerImpl::readSubMeshNameTable(). |
|
Skips data into the provided buffer until hitting the specified character or reaching the end of the data.
Definition at line 150 of file OgreDataChunk.cpp. References Ogre::DataChunk::mEnd, and Ogre::DataChunk::mPos. Referenced by Ogre::FontManager::parseScript(). |
|
Definition at line 56 of file OgreDataChunk.h. Referenced by Ogre::DataChunk::allocate(), Ogre::DataChunk::clear(), Ogre::DataChunk::DataChunk(), Ogre::DataChunk::getAsString(), Ogre::DataChunk::getPtr(), Ogre::DataChunk::seek(), Ogre::DataChunk::skip(), and ~SDDataChunk(). |
|
Definition at line 58 of file OgreDataChunk.h. Referenced by Ogre::DataChunk::allocate(), Ogre::DataChunk::DataChunk(), Ogre::DataChunk::isEOF(), Ogre::DataChunk::read(), Ogre::DataChunk::readUpTo(), Ogre::DataChunk::skip(), and Ogre::DataChunk::skipUpTo(). |
|
Definition at line 57 of file OgreDataChunk.h. Referenced by Ogre::DataChunk::allocate(), Ogre::DataChunk::DataChunk(), Ogre::DataChunk::isEOF(), Ogre::DataChunk::read(), Ogre::DataChunk::readUpTo(), Ogre::DataChunk::seek(), Ogre::DataChunk::skip(), and Ogre::DataChunk::skipUpTo(). |
|
Definition at line 59 of file OgreDataChunk.h. Referenced by Ogre::DataChunk::allocate(), Ogre::DataChunk::clear(), Ogre::DataChunk::DataChunk(), Ogre::DataChunk::getAsString(), Ogre::DataChunk::getSize(), and Ogre::DataChunk::seek(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:27:13 2004