CrossFramework Library

クラス テンプレート XBase::Placement< T >

#include <XBase/Placement.hpp>


template<typename T>
class XBase::Placement< T >

確保済みのメモリ領域からオブジェクトを生成するためのテンプレートクラス。

クラスメンバの初期化子で生成できないメンバ変数を後から初期化するときに使います。

init 関数の引数に参照を渡す場合は Ref() を使うことをおすすめします。
Ref() を使わない場合はオブジェクトのコピーが走るので注意してください。

// 例
::XBase::Placement< ::XBase::Vector3 > vec3;
vec3.init( 1 , 2 , 3 );
const float len = vec3->length();

すべてのメンバ一覧

コンストラクタとデストラクタ
 Placement ()
 ~Placement ()
アクセス
bool isValid () const
 生成済みか。
T * ptr () const
 生成済みのオブジェクトのポインタを取得する。
T & ref () const
 生成済みのオブジェクトの参照を取得する。
演算子オーバーロード
T * operator-> () const
 ptr() のエイリアス。
T & operator* () const
 ref() のエイリアス。
破棄
void reset ()
 生成済みなら破棄する。
生成
void init ()
template<typename A0 >
void init (A0 a0)
template<typename A0 , typename A1 >
void init (A0 a0, A1 a1)
template<typename A0 , typename A1 , typename A2 >
void init (A0 a0, A1 a1, A2 a2)
template<typename A0 , typename A1 , typename A2 , typename A3 >
void init (A0 a0, A1 a1, A2 a2, A3 a3)
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void init (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
void init (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
void init (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
void init (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
void init (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 >
void init (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義