OROCHI
 
Loading...
Searching...
No Matches
GxFileStream Class Reference

ファイルストリームクラス More...

#include <GxStream.h>

Inheritance diagram for GxFileStream:
Collaboration diagram for GxFileStream:

Public Member Functions

初期化
 GxFileStream (void)
 ディフォルトコンストラクタ
 
 GxFileStream (GxFile *pFile, u32 offset=0, u32 size=0)
 コンストラクタ
 
 ~GxFileStream (void) override
 デストラクタ
 
void initialize (GxFile *pFile, u32 offset=0, u32 size=0)
 初期化
 
void terminate (void)
 終了
 
- Public Member Functions inherited from GxStream
u32 copy (GxStream &dst, u32 size)
 コピー
 
virtual void setSize (u32)
 ストリームサイズ設定
 
virtual b32 isEnd (void) const
 ファイル終端判定
 
GX_FORCE_INLINE s32 getRemainSize (void) const
 残サイズ取得
 
GX_FORCE_INLINE b32 isCanceled (void) const
 キャンセルされた判定
 
constexpr void setAttribute (ATTRIBUTE attribute)
 
constexpr void clearAttribute (ATTRIBUTE attribute)
 
GX_FORCE_INLINE b32 getAttribute (ATTRIBUTE attribute) const
 
- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 

Static Public Attributes

定義
static constexpr u32 CACHE_BUFFER_SIZE = GxMath::VALUE_64K
 デフォルトキャッシュサイズ (byte)
 
static u32 _readCacheBufferSize = CACHE_BUFFER_SIZE
 読み込みキャッシュバッファサイズ
 
static u32 _writeCacheBufferSize = CACHE_BUFFER_SIZE
 書き込みキャッシュバッファサイズ
 
- Static Public Attributes inherited from GxStream
static constexpr u32 COPY_TEMPORARY_BUFFER_SIZE = GxMath::VALUE_32K
 ストリームコピー用テンポラリバッファサイズ
 

操作

void close (void) override
 クローズ
 
u32 read (void *pDst, u32 size) override
 読み込み
 
u32 write (const void *pSrc, u32 size) override
 書き込み
 
void flush (void) override
 フラッシュ
 
u32 seek (s32 offset, GxFile::SEEK_TYPE seekType=GxFile::SEEK_TYPE::BEGIN) override
 シーク
 

アクセサ

u32 getPosition (void) const override
 ストリーム位置を取得
 
u32 getSize (void) const override
 ストリームサイズ取得
 
b32 isReadable (void) const override
 読み込み可能判定
 
b32 isWritable (void) const override
 書き込み可能判定
 
GX_CSTR getFileName (void) const
 ファイル名取得
 
u32 getFilePosition (void) const
 ファイル位置取得
 
u32 getFileOffset (void) const
 ファイルオフセット取得
 
static GX_FORCE_INLINE void setConfig (u32 readBufferSize, u32 writeBufferSize)
 

Additional Inherited Members

- Public Types inherited from GxStream
enum  ATTRIBUTE { ATTRIBUTE_SEEKABLE = (1 << 0) , ATTRIBUTE_CANCELED = (1 << 1) }
 属性 More...
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 
- Protected Member Functions inherited from GxStream
 GxStream (void)
 コンストラクタ (継承先でのみインスタンス生成)
 
 ~GxStream (void) override
 デストラクタ
 

Detailed Description

ファイルストリームクラス

Constructor & Destructor Documentation

◆ GxFileStream()

GxFileStream::GxFileStream ( GxFile * pFile,
u32 offset = 0,
u32 size = 0 )

コンストラクタ

Parameters
pFile[in] ファイルポインタ
offset[in] ファイル先頭オフセット
size[in] ストリームサイズ (※0指定時:ファイル全部)
Note
ファイルポインタ指定型のコンストラクタを使用した場合は initialize は不要です。
Here is the call graph for this function:

Member Function Documentation

◆ close()

void GxFileStream::close ( void )
overridevirtual

クローズ

Reimplemented from GxStream.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flush()

void GxFileStream::flush ( void )
overridevirtual

フラッシュ

Reimplemented from GxStream.

Here is the caller graph for this function:

◆ getFileName()

GX_CSTR GxFileStream::getFileName ( void ) const

ファイル名取得

Returns
ファイル名文字列
Here is the call graph for this function:

◆ getFileOffset()

u32 GxFileStream::getFileOffset ( void ) const

ファイルオフセット取得

Returns
ファイルオフセット
Here is the caller graph for this function:

◆ getFilePosition()

u32 GxFileStream::getFilePosition ( void ) const

ファイル位置取得

Returns
ファイルポインタ位置
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPosition()

u32 GxFileStream::getPosition ( void ) const
overridevirtual

ストリーム位置を取得

Returns
ストリーム位置 (byte)

Reimplemented from GxStream.

Here is the caller graph for this function:

◆ getSize()

u32 GxFileStream::getSize ( void ) const
overridevirtual

ストリームサイズ取得

Returns
ストリームサイズ (byte)

Reimplemented from GxStream.

Here is the caller graph for this function:

◆ initialize()

void GxFileStream::initialize ( GxFile * pFile,
u32 offset = 0,
u32 size = 0 )

初期化

Parameters
pFile[in] ファイルポインタ
offset[in] ファイル先頭オフセット
size[in] ストリームサイズ
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isReadable()

b32 GxFileStream::isReadable ( void ) const
overridevirtual

読み込み可能判定

Returns
読み込み可能ならtrue

Reimplemented from GxStream.

Here is the call graph for this function:

◆ isWritable()

b32 GxFileStream::isWritable ( void ) const
overridevirtual

書き込み可能判定

Returns
書き込み可能ならtrue

Reimplemented from GxStream.

Here is the call graph for this function:

◆ read()

u32 GxFileStream::read ( void * pDst,
u32 size )
overridevirtual

読み込み

Parameters
pDst[out] 読込先アドレス
size[in] 読み込みサイズ
Returns
実際読み込んだサイズ

Reimplemented from GxStream.

Here is the call graph for this function:

◆ seek()

u32 GxFileStream::seek ( s32 offset,
GxFile::SEEK_TYPE seekType = GxFile::SEEK_TYPE::BEGIN )
overridevirtual

シーク

Parameters
offset[in] 移動オフセット
seekType[in] シーク基準位置 (BEGIN/CURRENT/END)
Returns
シーク後ファイルポジション

Reimplemented from GxStream.

Here is the call graph for this function:

◆ setConfig()

static GX_FORCE_INLINE void GxFileStream::setConfig ( u32 readBufferSize,
u32 writeBufferSize )
inlinestatic

キャッシュバッファサイズを設定

Parameters
readBufferSize[in] 読み込みバッファサイズ
writeBufferSize[in] 書き込みバッファサイズ
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

u32 GxFileStream::write ( const void * pSrc,
u32 size )
overridevirtual

書き込み

Parameters
pSrc[in] 書き込み元データアドレス
size[in] 書き込みサイズ
Returns
実際書き込んだサイズ

Reimplemented from GxStream.

Here is the call graph for this function:

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