Assimp  v4.1. (December 2018)
Assimp::MemoryIOSystem Class Reference

Dummy IO system to read from a memory buffer. More...

Inherits Assimp::IOSystem.

Public Member Functions

bool ChangeDirectory (const std::string &path) override
 Will change the current directory to the given path. More...
 
void Close (IOStream *pFile) override
 Closes the given file and releases all resources associated with it. More...
 
bool ComparePaths (const char *one, const char *second) const override
 Compare two paths. More...
 
bool CreateDirectory (const std::string &path) override
 CReates an new directory at the given path. More...
 
const std::string & CurrentDirectory () const override
 Returns the top directory from the stack. More...
 
bool DeleteFile (const std::string &file) override
 
bool Exists (const char *pFile) const override
 Tests for the existence of a file at the given path. More...
 
char getOsSeparator () const override
 Returns the directory separator. More...
 
 MemoryIOSystem (const uint8_t *buff, size_t len, IOSystem *io)
 Constructor. More...
 
IOStreamOpen (const char *pFile, const char *pMode="rb") override
 Open a new file with a given path. More...
 
bool PopDirectory () override
 Pops the top directory from the stack. More...
 
bool PushDirectory (const std::string &path) override
 Pushes a new directory onto the directory stack. More...
 
size_t StackSize () const override
 Returns the number of directories stored on the stack. More...
 
 ~MemoryIOSystem ()
 Destructor. More...
 
- Public Member Functions inherited from Assimp::IOSystem
bool ComparePaths (const std::string &one, const std::string &second) const
 For backward compatibility. More...
 
AI_FORCE_INLINE bool Exists (const std::string &pFile) const
 For backward compatibility. More...
 
 IOSystem () AI_NO_EXCEPT
 Default constructor. More...
 
IOStreamOpen (const std::string &pFile, const std::string &pMode=std::string("rb"))
 For backward compatibility. More...
 
virtual ~IOSystem ()
 Virtual destructor. More...
 

Detailed Description

Dummy IO system to read from a memory buffer.

Constructor & Destructor Documentation

◆ MemoryIOSystem()

Assimp::MemoryIOSystem::MemoryIOSystem ( const uint8_t buff,
size_t  len,
IOSystem io 
)
inline

Constructor.

◆ ~MemoryIOSystem()

Assimp::MemoryIOSystem::~MemoryIOSystem ( )
inline

Destructor.

Member Function Documentation

◆ ChangeDirectory()

bool Assimp::MemoryIOSystem::ChangeDirectory ( const std::string &  path)
inlineoverridevirtual

Will change the current directory to the given path.

Parameters
path[in] The path to change to.
Returns
True, when the directory has changed successfully.

Reimplemented from Assimp::IOSystem.

◆ Close()

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

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

Implements Assimp::IOSystem.

◆ ComparePaths()

bool Assimp::MemoryIOSystem::ComparePaths ( const char *  one,
const char *  second 
) const
inlineoverridevirtual

Compare two paths.

Reimplemented from Assimp::IOSystem.

◆ CreateDirectory()

bool Assimp::MemoryIOSystem::CreateDirectory ( const std::string &  path)
inlineoverridevirtual

CReates an new directory at the given path.

Parameters
path[in] The path to create.
Returns
True, when a directory was created. False if the directory cannot be created.

Reimplemented from Assimp::IOSystem.

◆ CurrentDirectory()

const std::string& Assimp::MemoryIOSystem::CurrentDirectory ( ) const
inlineoverridevirtual

Returns the top directory from the stack.

Returns
The directory on the top of the stack. Returns empty when no directory was pushed to the stack.

Reimplemented from Assimp::IOSystem.

◆ DeleteFile()

bool Assimp::MemoryIOSystem::DeleteFile ( const std::string &  file)
inlineoverridevirtual

Reimplemented from Assimp::IOSystem.

◆ Exists()

bool Assimp::MemoryIOSystem::Exists ( const char *  pFile) const
inlineoverridevirtual

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

Implements Assimp::IOSystem.

◆ getOsSeparator()

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

Returns the directory separator.

Implements Assimp::IOSystem.

◆ Open()

IOStream* Assimp::MemoryIOSystem::Open ( const char *  pFile,
const char *  pMode = "rb" 
)
inlineoverridevirtual

Open a new file with a given path.

Implements Assimp::IOSystem.

◆ PopDirectory()

bool Assimp::MemoryIOSystem::PopDirectory ( )
inlineoverridevirtual

Pops the top directory from the stack.

Returns
True, when a directory was on the stack. False if no directory was on the stack.

Reimplemented from Assimp::IOSystem.

◆ PushDirectory()

bool Assimp::MemoryIOSystem::PushDirectory ( const std::string &  path)
inlineoverridevirtual

Pushes a new directory onto the directory stack.

Parameters
pathPath to push onto the stack.
Returns
True, when push was successful, false if path is empty.

Reimplemented from Assimp::IOSystem.

◆ StackSize()

size_t Assimp::MemoryIOSystem::StackSize ( ) const
inlineoverridevirtual

Returns the number of directories stored on the stack.

Returns
The number of directories of the stack.

Reimplemented from Assimp::IOSystem.


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