Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Dali::Internal::Platform::FileCloser Class Reference

Opens files and closes them later even if an exception is thrown. More...

#include <file-closer.h>

Public Member Functions

 FileCloser (const char *const filename, const char *const mode)
 Construct a FileCloser guarding a new FILE* for accessing the path passed in. More...
 
 FileCloser (void *const buffer, const size_t bufferSize, const char *const mode)
 Construct a FileCloser guarding a FILE* for reading out of the memory buffer passed in. More...
 
 ~FileCloser ()
 Destroy the FileCloser and clean up its FILE*. More...
 
FILE * GetFile ()
 

Private Member Functions

 FileCloser (const FileCloser &fileCloser)
 
FileCloseroperator= (const FileCloser &fileCloser)
 

Private Attributes

FILE * mFile
 

Detailed Description

Opens files and closes them later even if an exception is thrown.

Definition at line 35 of file file-closer.h.

Constructor & Destructor Documentation

Dali::Internal::Platform::FileCloser::FileCloser ( const char *const  filename,
const char *const  mode 
)
inline

Construct a FileCloser guarding a new FILE* for accessing the path passed in.

Definition at line 42 of file file-closer.h.

References DALI_ASSERT_DEBUG, DALI_LOG_WARNING, and mFile.

Dali::Internal::Platform::FileCloser::FileCloser ( void *const  buffer,
const size_t  bufferSize,
const char *const  mode 
)
inline

Construct a FileCloser guarding a FILE* for reading out of the memory buffer passed in.

Definition at line 57 of file file-closer.h.

References DALI_ASSERT_DEBUG, DALI_LOG_WARNING, and mFile.

Dali::Internal::Platform::FileCloser::~FileCloser ( )
inline

Destroy the FileCloser and clean up its FILE*.

Definition at line 73 of file file-closer.h.

References DALI_LOG_WARNING, and mFile.

Dali::Internal::Platform::FileCloser::FileCloser ( const FileCloser fileCloser)
private

Member Function Documentation

FILE* Dali::Internal::Platform::FileCloser::GetFile ( )
inline
FileCloser& Dali::Internal::Platform::FileCloser::operator= ( const FileCloser fileCloser)
private

Member Data Documentation

FILE* Dali::Internal::Platform::FileCloser::mFile
private

Definition at line 104 of file file-closer.h.

Referenced by FileCloser(), GetFile(), and ~FileCloser().


The documentation for this class was generated from the following file:
Dali Docs Home
Read more about Dali