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

メモリストリームクラス More...

#include <GxStream.h>

Inheritance diagram for GxMemoryStream:
Collaboration diagram for GxMemoryStream:

Public Member Functions

初期化
 GxMemoryStream (GxAllocatorList::ALLOCATOR_TYPE allocatorType=GxAllocatorList::ALLOCATOR_TYPE::TEMPORARY)
 コンストラクタ
 
 GxMemoryStream (GxAllocator *pAllocator)
 コンストラクタ
 
 ~GxMemoryStream (void) override
 デストラクタ
 
b32 initialize (u32 size, GxMemory::ALIGNMENT alignment=GxMemory::ALIGNMENT::_16)
 初期化 (新規メモリ確保)
 
b32 initialize (void *pBuffer, u32 size)
 初期化 (既存メモリ指定)
 
b32 initialize (GxStream *pStream, u32 size=0)
 初期化 (新規メモリ確保・ストリームコピー)
 
void terminate (void)
 終了
 
操作
u32 read (void *pDst, u32 size) override
 読み込み
 
u32 write (const void *pSrc, u32 size) override
 書き込み
 
u32 seek (s32 offset, GxFile::SEEK_TYPE seekType=GxFile::SEEK_TYPE::BEGIN) override
 シーク
 
void * reserve (u32 size)
 メモリ領域の確保
 
void alignment (GxMemory::ALIGNMENT alignment)
 メモリアライメント調整
 
アクセサ
GX_FORCE_INLINE u32 getPosition (void) const override
 ストリーム位置を取得
 
GX_FORCE_INLINE u32 getSize (void) const override
 ストリームサイズ取得
 
GX_FORCE_INLINE b32 isReadable (void) const override
 読み込み可能判定
 
GX_FORCE_INLINE b32 isWritable (void) const override
 書き込み可能判定
 
constexpr void * getBuffer (void) const
 先頭アドレス取得
 
GX_FORCE_INLINE void * getCurrent (void) const
 カレントアドレス取得
 
- Public Member Functions inherited from GxStream
virtual void close (void)
 クローズ
 
virtual void flush (void)
 フラッシュ
 
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)
 デフォルトオブジェクト判定
 

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の取得
 
- Static Public Attributes inherited from GxStream
static constexpr u32 COPY_TEMPORARY_BUFFER_SIZE = GxMath::VALUE_32K
 ストリームコピー用テンポラリバッファサイズ
 
- Protected Member Functions inherited from GxStream
 GxStream (void)
 コンストラクタ (継承先でのみインスタンス生成)
 
 ~GxStream (void) override
 デストラクタ
 

Detailed Description

メモリストリームクラス

Constructor & Destructor Documentation

◆ GxMemoryStream() [1/2]

GxMemoryStream::GxMemoryStream ( GxAllocatorList::ALLOCATOR_TYPE allocatorIndex = GxAllocatorList::ALLOCATOR_TYPE::TEMPORARY)

コンストラクタ

Parameters
allocatorIndex[in] 使用アロケータ番号
Here is the call graph for this function:

◆ GxMemoryStream() [2/2]

GxMemoryStream::GxMemoryStream ( GxAllocator * pAllocator)

コンストラクタ

Parameters
allocator[in] 使用アロケータ

Member Function Documentation

◆ alignment()

void GxMemoryStream::alignment ( GxMemory::ALIGNMENT alignment)

メモリアライメント調整

Parameters
alignment[in] アライメント
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPosition()

GX_FORCE_INLINE u32 GxMemoryStream::getPosition ( void ) const
inlineoverridevirtual

ストリーム位置を取得

Reimplemented from GxStream.

Here is the caller graph for this function:

◆ getSize()

GX_FORCE_INLINE u32 GxMemoryStream::getSize ( void ) const
inlineoverridevirtual

ストリームサイズ取得

Reimplemented from GxStream.

Here is the caller graph for this function:

◆ initialize() [1/3]

b32 GxMemoryStream::initialize ( GxStream * pStream,
u32 size = 0 )

初期化 (新規メモリ確保・ストリームコピー)

Parameters
pStream[in,out] コピー元ストリーム
size[in] メモリ確保サイズ (※0指定時:コピー元ストリーム残容量)
Returns
成功ならtrue
Here is the call graph for this function:

◆ initialize() [2/3]

b32 GxMemoryStream::initialize ( u32 size,
GxMemory::ALIGNMENT alignment = GxMemory::ALIGNMENT::_16 )

初期化 (新規メモリ確保)

Parameters
size[in] 確保メモリサイズ
alignment[in] メモリ確保アライメント
Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize() [3/3]

b32 GxMemoryStream::initialize ( void * pBuffer,
u32 size )

初期化 (既存メモリ指定)

Parameters
pBuffer[in] 割付メモリアドレス
size[in] 割付メモリサイズ
Returns
成功ならtrue

◆ isReadable()

GX_FORCE_INLINE b32 GxMemoryStream::isReadable ( void ) const
inlineoverridevirtual

読み込み可能判定

Reimplemented from GxStream.

◆ isWritable()

GX_FORCE_INLINE b32 GxMemoryStream::isWritable ( void ) const
inlineoverridevirtual

書き込み可能判定

Reimplemented from GxStream.

◆ read()

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

読み込み

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

Reimplemented from GxStream.

◆ reserve()

void * GxMemoryStream::reserve ( u32 size)

メモリ領域の確保

Parameters
size[in] 確保サイズ
Returns
確保メモリ領域先頭アドレス (nullptrの場合、確保失敗)
Here is the caller graph for this function:

◆ seek()

u32 GxMemoryStream::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 caller graph for this function:

◆ write()

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

書き込み

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

Reimplemented from GxStream.

Here is the caller graph for this function:

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