Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::io::IMemoryReadFile Class Referenceabstract

Interface providing read access to a memory read file. More...

#include <nirtcpp/core/engine/IMemoryReadFile.hpp>

Inheritance diagram for nirt::io::IMemoryReadFile:
Inheritance graph
Collaboration diagram for nirt::io::IMemoryReadFile:
Collaboration graph

Public Member Functions

virtual const void * getBuffer () const =0
 Get direct access to internal buffer of memory block used as file.
 
- Public Member Functions inherited from nirt::io::IReadFile
virtual size_t read (void *buffer, size_t sizeToRead)=0
 Reads an amount of bytes from the file.
 
virtual bool seek (long finalPos, bool relativeMovement=false)=0
 Changes position in file.
 
virtual long getSize () const =0
 Get size of file.
 
virtual long getPos () const =0
 Get the current position in the file.
 
virtual const io::pathgetFileName () const =0
 Get name of file.
 
virtual EREAD_FILE_TYPE getType () const
 Get the type of the class implementing this interface.
 
- Public Member Functions inherited from nirt::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

Interface providing read access to a memory read file.

Member Function Documentation

◆ getBuffer()

virtual const void * nirt::io::IMemoryReadFile::getBuffer ( ) const
pure virtual

Get direct access to internal buffer of memory block used as file.

It's usually better to use the IReadFile functions to access the file content. But as that buffer exist over the full life-time of a CMemoryReadFile, it's sometimes nice to avoid the additional data-copy which read() needs.


The documentation for this class was generated from the following file:

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print