Static Public メソッド
構造体 テンプレート mist::mist_memory_operator<true >

組み込み型用のメモリ操作関数群 [詳細]

#include <mist_alloc.h>

Static Public メソッド

template<class Allocator >
static Allocator::pointer allocate_objects1 (Allocator &allocator, typename Allocator::size_type num)
 num 個のオブジェクトを確保し,デフォルトの値で初期化する
template<class Allocator >
static Allocator::pointer allocate_objects2 (Allocator &allocator, typename Allocator::size_type num, typename Allocator::const_reference obj)
 num 個のオブジェクトを確保し,引数の値で初期化する
template<class Allocator >
static Allocator::pointer allocate_objects3 (Allocator &allocator, typename Allocator::const_pointer s, typename Allocator::const_pointer e)
 ポインタ s から e の範囲のデータで初期化する
template<class Allocator >
static void deallocate_objects (Allocator &allocator, typename Allocator::pointer ptr, typename Allocator::size_type num)
 ptr から num 個のオブジェクトを開放しデストラクタを呼び出す
template<class Allocator >
static Allocator::pointer copy_objects1 (Allocator &, typename Allocator::const_pointer s, typename Allocator::const_pointer e, typename Allocator::pointer x)
 ポインタ s から e までの間のデータを x にコピーする
template<class Allocator >
static Allocator::pointer copy_objects2 (Allocator &, typename Allocator::const_pointer ptr, typename Allocator::size_type num, typename Allocator::pointer to)
 ポインタ ptr から num 個のデータを to にコピーする
template<class Allocator >
static void fill_objects1 (Allocator &, typename Allocator::pointer ptr, typename Allocator::size_type num, typename Allocator::const_reference obj)
 ポインタ ptr から num 個のデータにobjを代入する
template<class Allocator >
static void fill_objects2 (Allocator &, typename Allocator::pointer ptr, typename Allocator::size_type num)
 ポインタ ptr から num 個のデータに初期値を代入する

説明

template<>
struct mist::mist_memory_operator<true >

組み込み型用のメモリ操作関数群

関数

template<class Allocator >
static Allocator::pointer mist::mist_memory_operator<true >::allocate_objects1 ( Allocator &  allocator,
typename Allocator::size_type  num 
)
inlinestatic

num 個のオブジェクトを確保し,デフォルトの値で初期化する

組み込み型のデータの場合は 0 で初期化する

引数
[in]allocator… 使用するアロケータ
[in]num… 確保するオブジェクト数
戻り値
確保したメモリ領域の先頭アドレス
template<class Allocator >
static Allocator::pointer mist::mist_memory_operator<true >::allocate_objects2 ( Allocator &  allocator,
typename Allocator::size_type  num,
typename Allocator::const_reference  obj 
)
inlinestatic

num 個のオブジェクトを確保し,引数の値で初期化する

組み込み型のデータの場合は値を代入して初期化する

引数
[in]allocator… 使用するアロケータ
[in]num… 確保するオブジェクト数
[in]obj… コピーコンストラクタに渡す初期値
戻り値
確保したメモリ領域の先頭アドレス
template<class Allocator >
static Allocator::pointer mist::mist_memory_operator<true >::allocate_objects3 ( Allocator &  allocator,
typename Allocator::const_pointer  s,
typename Allocator::const_pointer  e 
)
inlinestatic

ポインタ s から e の範囲のデータで初期化する

組み込み型のデータの場合は値を代入して初期化する

引数
[in]allocator… 使用するアロケータ
[in]s… 開始ポインタ
[in]e… 終了ポインタ
戻り値
確保したメモリ領域の先頭アドレス
template<class Allocator >
static Allocator::pointer mist::mist_memory_operator<true >::copy_objects1 ( Allocator &  ,
typename Allocator::const_pointer  s,
typename Allocator::const_pointer  e,
typename Allocator::pointer  x 
)
inlinestatic

ポインタ s から e までの間のデータを x にコピーする

memcpy を利用してバイト単位でデータをコピーする

引数
[in]allocator… 使用するアロケータ
[in]s… コピー元の先頭アドレス
[in]e… コピー元の末尾アドレス
[in]x… コピー先の先頭アドレス
戻り値
コピー先の末尾アドレス
template<class Allocator >
static Allocator::pointer mist::mist_memory_operator<true >::copy_objects2 ( Allocator &  ,
typename Allocator::const_pointer  ptr,
typename Allocator::size_type  num,
typename Allocator::pointer  to 
)
inlinestatic

ポインタ ptr から num 個のデータを to にコピーする

memcpy を利用してバイト単位でデータをコピーする

引数
[in]allocator… 使用するアロケータ
[in]ptr… コピー元の先頭アドレス
[in]num… コピーするオブジェクト数
[in]to… コピー先の先頭アドレス
戻り値
コピー先の末尾アドレス
template<class Allocator >
static void mist::mist_memory_operator<true >::deallocate_objects ( Allocator &  allocator,
typename Allocator::pointer  ptr,
typename Allocator::size_type  num 
)
inlinestatic

ptr から num 個のオブジェクトを開放しデストラクタを呼び出す

組み込み型の場合はデストラクタは呼び出さない

引数
[in]allocator… 使用するアロケータ
[in]ptr… 開放するメモリ領域の先頭アドレス
[in]num… 開放するオブジェクト数
template<class Allocator >
static void mist::mist_memory_operator<true >::fill_objects1 ( Allocator &  ,
typename Allocator::pointer  ptr,
typename Allocator::size_type  num,
typename Allocator::const_reference  obj 
)
inlinestatic

ポインタ ptr から num 個のデータにobjを代入する

char 型の場合は memset を利用する

引数
[in]allocator… 使用するアロケータ
[in]ptr… 代入する先頭アドレス
[in]num… 代入するオブジェクト数
[in]obj… 代入するオブジェクト
template<class Allocator >
static void mist::mist_memory_operator<true >::fill_objects2 ( Allocator &  ,
typename Allocator::pointer  ptr,
typename Allocator::size_type  num 
)
inlinestatic

ポインタ ptr から num 個のデータに初期値を代入する

memset を利用して,全要素を0に初期化する

引数
[in]allocator… 使用するアロケータ
[in]ptr… 代入する先頭アドレス
[in]num… 代入するオブジェクト数

この構造体の説明は次のファイルから生成されました:

Generated on Wed Nov 12 2014 19:44:28 for MIST by doxygen 1.8.1.2