Code::Blocks  SVN r11506
Public Member Functions | Private Attributes | List of all members
SQFile Struct Reference
Inheritance diagram for SQFile:
Collaboration diagram for SQFile:

Public Member Functions

 SQFile ()
 
 SQFile (SQFILE file, bool owns)
 
virtual ~SQFile ()
 
bool Open (const SQChar *filename, const SQChar *mode)
 
void Close ()
 
SQInteger Read (void *buffer, SQInteger size)
 
SQInteger Write (void *buffer, SQInteger size)
 
SQInteger Flush ()
 
SQInteger Tell ()
 
SQInteger Len ()
 
SQInteger Seek (SQInteger offset, SQInteger origin)
 
bool IsValid ()
 
bool EOS ()
 
SQFILE GetHandle ()
 

Private Attributes

SQFILE _handle
 
bool _owns
 

Detailed Description

Definition at line 62 of file sqstdio.cpp.

Constructor & Destructor Documentation

◆ SQFile() [1/2]

SQFile::SQFile ( )
inline

Definition at line 63 of file sqstdio.cpp.

References _handle, _owns, and NULL.

Referenced by _file_constructor().

◆ SQFile() [2/2]

SQFile::SQFile ( SQFILE  file,
bool  owns 
)
inline

Definition at line 64 of file sqstdio.cpp.

References _handle, and _owns.

◆ ~SQFile()

virtual SQFile::~SQFile ( )
inlinevirtual

Definition at line 65 of file sqstdio.cpp.

References Close().

Member Function Documentation

◆ Close()

void SQFile::Close ( )
inline

Definition at line 74 of file sqstdio.cpp.

References _handle, _owns, NULL, and sqstd_fclose().

Referenced by Open(), and ~SQFile().

◆ EOS()

bool SQFile::EOS ( )
inline

Definition at line 104 of file sqstdio.cpp.

References Len(), and Tell().

◆ Flush()

SQInteger SQFile::Flush ( )
inline

Definition at line 87 of file sqstdio.cpp.

References _handle, and sqstd_fflush().

◆ GetHandle()

SQFILE SQFile::GetHandle ( )
inline

Definition at line 105 of file sqstdio.cpp.

References _handle.

◆ IsValid()

bool SQFile::IsValid ( )
inline

Definition at line 103 of file sqstdio.cpp.

References _handle.

◆ Len()

SQInteger SQFile::Len ( )
inline

Definition at line 93 of file sqstdio.cpp.

References Seek(), and Tell().

Referenced by EOS().

◆ Open()

bool SQFile::Open ( const SQChar filename,
const SQChar mode 
)
inline

Definition at line 66 of file sqstdio.cpp.

References _handle, _owns, Close(), and sqstd_fopen().

◆ Read()

SQInteger SQFile::Read ( void *  buffer,
SQInteger  size 
)
inline

Definition at line 81 of file sqstdio.cpp.

References _handle, and sqstd_fread().

◆ Seek()

SQInteger SQFile::Seek ( SQInteger  offset,
SQInteger  origin 
)
inline

Definition at line 100 of file sqstdio.cpp.

References _handle, and sqstd_fseek().

Referenced by Len().

◆ Tell()

SQInteger SQFile::Tell ( )
inline

Definition at line 90 of file sqstdio.cpp.

References _handle, and sqstd_ftell().

Referenced by EOS(), and Len().

◆ Write()

SQInteger SQFile::Write ( void *  buffer,
SQInteger  size 
)
inline

Definition at line 84 of file sqstdio.cpp.

References _handle, and sqstd_fwrite().

Member Data Documentation

◆ _handle

SQFILE SQFile::_handle
private

Definition at line 107 of file sqstdio.cpp.

Referenced by Close(), Flush(), GetHandle(), IsValid(), Open(), Read(), Seek(), SQFile(), Tell(), and Write().

◆ _owns

bool SQFile::_owns
private

Definition at line 108 of file sqstdio.cpp.

Referenced by Close(), Open(), and SQFile().


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