Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
Assimp::BlobIOSystem Class Reference

Redirect IOSystem to a blob. More...

#include <BlobIOSystem.h>

Inherits Assimp::IOSystem.

Public Member Functions

 BlobIOSystem ()
 The default class constructor.
 
 BlobIOSystem (const std::string &baseName)
 The class constructor with the base name.
 
void Close (IOStream *pFile) override
 Closes the given file and releases all resources associated with it.
 
bool Exists (const char *pFile) const override
 Tests for the existence of a file at the given path.
 
aiExportDataBlobGetBlobChain ()
 
const charGetMagicFileName () const
 
char getOsSeparator () const override
 Returns the system specific directory separator.
 
IOStreamOpen (const char *pFile, const char *pMode) override
 Open a new file with a given path.
 
 ~BlobIOSystem () override
 
- Public Member Functions inherited from Assimp::IOSystem
virtual bool ChangeDirectory (const std::string &path)
 Will change the current directory to the given path.
 
virtual bool ComparePaths (const char *one, const char *second) const
 Compares two paths and check whether the point to identical files.
 
bool ComparePaths (const std::string &one, const std::string &second) const
 For backward compatibility.
 
virtual bool CreateDirectory (const std::string &path)
 CReates an new directory at the given path.
 
virtual const std::string & CurrentDirectory () const
 Returns the top directory from the stack.
 
virtual bool DeleteFile (const std::string &file)
 Will delete the given file.
 
AI_FORCE_INLINE bool Exists (const std::string &pFile) const
 For backward compatibility.
 
 IOSystem () AI_NO_EXCEPT=default
 Default constructor.
 
IOStreamOpen (const std::string &pFile, const std::string &pMode=std::string("rb"))
 For backward compatibility.
 
virtual bool PopDirectory ()
 Pops the top directory from the stack.
 
virtual bool PushDirectory (const std::string &path)
 Pushes a new directory onto the directory stack.
 
virtual size_t StackSize () const
 Returns the number of directories stored on the stack.
 
virtual ~IOSystem ()=default
 Virtual destructor.
 

Friends

class BlobIOStream
 

Detailed Description

Redirect IOSystem to a blob.

Constructor & Destructor Documentation

◆ BlobIOSystem() [1/2]

Assimp::BlobIOSystem::BlobIOSystem ( )
inline

The default class constructor.

◆ BlobIOSystem() [2/2]

Assimp::BlobIOSystem::BlobIOSystem ( const std::string &  baseName)
inline

The class constructor with the base name.

Parameters
baseNameThe base name.

◆ ~BlobIOSystem()

Assimp::BlobIOSystem::~BlobIOSystem ( )
inlineoverride

Member Function Documentation

◆ Close()

void Assimp::BlobIOSystem::Close ( IOStream pFile)
inlineoverridevirtual

Closes the given file and releases all resources associated with it.

Parameters
pFileThe file instance previously created by Open().

Implements Assimp::IOSystem.

◆ Exists()

bool Assimp::BlobIOSystem::Exists ( const char pFile) const
inlineoverridevirtual

Tests for the existence of a file at the given path.

Parameters
pFilePath to the file
Returns
true if there is a file with this path, else false.

Implements Assimp::IOSystem.

◆ GetBlobChain()

aiExportDataBlob * Assimp::BlobIOSystem::GetBlobChain ( )
inline

◆ GetMagicFileName()

const char * Assimp::BlobIOSystem::GetMagicFileName ( ) const
inline

◆ getOsSeparator()

char Assimp::BlobIOSystem::getOsSeparator ( ) const
inlineoverridevirtual

Returns the system specific directory separator.

Returns
System specific directory separator

Implements Assimp::IOSystem.

◆ Open()

IOStream * Assimp::BlobIOSystem::Open ( const char pFile,
const char pMode 
)
inlineoverridevirtual

Open a new file with a given path.

When the access to the file is finished, call Close() to release all associated resources (or the virtual dtor of the IOStream).

Parameters
pFilePath to the file
pModeDesired file I/O mode. Required are: "wb", "w", "wt", "rb", "r", "rt".
Returns
New IOStream interface allowing the lib to access the underlying file.
Note
When implementing this class to provide custom IO handling, you probably have to supply an own implementation of IOStream as well.

Implements Assimp::IOSystem.

Friends And Related Symbol Documentation

◆ BlobIOStream


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