Pyro higlevel API
Classes | Public Member Functions | Friends | List of all members
os::ResStream Class Reference

Data stream helper class for os::Resources. More...

Inheritance diagram for os::ResStream:
os::SeekableIO os::StreamableIO

Classes

class  Private
 

Public Member Functions

 ~ResStream ()
 
String GetName () const
 Get the resource name. More...
 
String GetType () const
 Get the resource mime-type. More...
 
ssize_t GetSize () const
 Get the size of the resource. More...
 
virtual ssize_t Read (void *pBuffer, ssize_t nSize)
 
virtual ssize_t Write (const void *pBuffer, ssize_t nSize)
 
virtual ssize_t ReadPos (off_t nPos, void *pBuffer, ssize_t nSize)
 
virtual ssize_t WritePos (off_t nPos, const void *pBuffer, ssize_t nSize)
 
virtual off_t Seek (off_t nPos, int nMode)
 
- Public Member Functions inherited from os::SeekableIO
virtual ~SeekableIO ()
 
- Public Member Functions inherited from os::StreamableIO
virtual ~StreamableIO ()
 

Friends

class Resources
 

Detailed Description

Description:
Instances of this class is returned by various members of the os::Resources class to give access to data inside the resource archive.
As the private constructor indicate you should never create instances of this class yourself.
Since
0.3.7
See Also
os::Resources
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Constructor & Destructor Documentation

ResStream::~ResStream ( )

Member Function Documentation

String ResStream::GetName ( ) const
Description:
Get the resource name.
Returns
An STL string containing the resource name.
See Also
GetType(), GetSize()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)
ssize_t ResStream::GetSize ( ) const
Description:
Get the size of the resource.
Returns
The resource size in bytes.
See Also
GetName(), GetType()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)
String ResStream::GetType ( void  ) const
Description:
Get the resource mime-type.
Returns
An STL string containing the resource mime-type.
See Also
GetName(), GetSize()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Referenced by os::Resources::ReadResource().

ssize_t ResStream::Read ( void *  pBuffer,
ssize_t  nSize 
)
virtual
ssize_t ResStream::ReadPos ( off_t  nPos,
void *  pBuffer,
ssize_t  nSize 
)
virtual

Implements os::SeekableIO.

off_t ResStream::Seek ( off_t  nPos,
int  nMode 
)
virtual

Implements os::SeekableIO.

ssize_t ResStream::Write ( const void *  pBuffer,
ssize_t  nSize 
)
virtual

Implements os::StreamableIO.

ssize_t ResStream::WritePos ( off_t  nPos,
const void *  pBuffer,
ssize_t  nSize 
)
virtual

Implements os::SeekableIO.

Friends And Related Function Documentation

friend class Resources
friend