#include <vector.h>
static_container::vector< Value, MaxSize >に対する継承グラフ
Public 型 | |
typedef boost::call_traits< Value >::param_type | param_type |
typedef pointer | iterator |
typedef const_pointer | const_iterator |
Public メソッド | |
BOOST_STATIC_CONSTANT (size_type, const_max=MaxSize) | |
最大サイズ | |
size_type | size () const |
サイズ取得 | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
void | push_back (param_type v) |
末尾に対する要素追加 | |
void | pop_back () |
末尾要素削除 | |
vector () | |
デフォルトコンストラクタ | |
vector (size_type s) | |
各要素に対しては、デフォルトコンストラクタを呼び出す | |
vector (size_type s, param_type v) | |
各要素に対しては、コピーコンストラクタを呼び出す | |
vector (const vector &other) | |
コピーコンストラクタ | |
~vector () | |
vector & | operator= (const vector &other) |
代入演算子 | |
template<typename InputIt> void | assign (InputIt first, InputIt last) |
代入 | |
void | erase (iterator it) |
it を削除します | |
void | erase (iterator first, iterator last) |
現在、非常に重い動作です。 要望があれば高速化します。 | |
void | clear () |
空ベクトル化 | |
Value & | operator[] (size_type i) |
const Value & | operator[] (size_type i) const |
bool | empty () const |
reference | at (size_type i) |
param_type | at (size_type i) const |
reference | front () |
param_type | front () const |
reference | back () |
param_type | back () const |
void | swap (vector &other) |
置換 | |
void | assign (param_type value) |
Static Public メソッド | |
size_type | max_size () |
最大サイズ取得 | |
size_type | capaciry () |
容量取得 | |
Private メソッド | |
pointer | top () |
実装用。 先頭要素のアドレスを得る | |
const_pointer | top () const |
実装用。 先頭要素のアドレスを得る | |
Static Private メソッド | |
void | destruct (reference v) |
Private 変数 | |
size_type | size_ |
uint8_t | buffer_ [MaxSize *sizeof(Value)] |
|
|
|
|
|
|
|
デフォルトコンストラクタ
参照先 static_container::vector< Value, MaxSize >::size_.
00088 : size_( 0 ) { 00089 } |
|
各要素に対しては、デフォルトコンストラクタを呼び出す
参照先 static_container::vector< Value, MaxSize >::max_size(), static_container::vector< Value, MaxSize >::size_, static_container::size_type, と STATIC_VECTOR_FOREACH.
00095 : size_( s ) { 00096 BOOST_ASSERT( s <= max_size() ); 00097 STATIC_VECTOR_FOREACH( new( it ) Value() ) 00098 } |
|
各要素に対しては、コピーコンストラクタを呼び出す
参照先 static_container::vector< Value, MaxSize >::max_size(), static_container::vector< Value, MaxSize >::size_, static_container::size_type, と STATIC_VECTOR_FOREACH.
00103 : size_( s ) { 00104 BOOST_ASSERT( s <= max_size() ); 00105 STATIC_VECTOR_FOREACH( new( it ) Value( v ) ) 00106 } |
|
コピーコンストラクタ
参照先 static_container::vector< Value, MaxSize >::begin(), static_container::vector< Value, MaxSize >::size_, と STATIC_VECTOR_FOREACH.
00108 : size_( other.size_ ) { 00109 const_iterator otherIt = other.begin(); 00110 STATIC_VECTOR_FOREACH( new( it ) Value( *( otherIt++ ) ) ) 00111 } |
|
参照先 static_container::vector< Value, MaxSize >::clear().
00113 { 00114 clear(); 00115 } |
|
参照先 static_container::vector< Value, MaxSize >::begin(), と static_container::vector< Value, MaxSize >::size().
|
|
|
参照先 static_container::vector< Value, MaxSize >::operator[](), と static_container::size_type.
00174 { return operator [] ( i ); } |
|
参照先 static_container::vector< Value, MaxSize >::operator[](), と static_container::size_type.
00173 { return operator [] ( i ); } |
|
参照先 static_container::vector< Value, MaxSize >::end().
00180 { return *( end() - 1 ); } |
|
参照先 static_container::vector< Value, MaxSize >::end().
00179 { return *( end() - 1 ); } |
|
参照先 static_container::vector< Value, MaxSize >::top().
00069 { return reinterpret_cast< const_iterator >( top() ); } |
|
|
最大サイズ
|
|
容量取得
参照先 static_container::size_type.
00063 { return const_max; }
|
|
|
参照元 static_container::vector< Value, MaxSize >::clear(), と static_container::vector< Value, MaxSize >::pop_back().
00042 { 00043 static_container::destruct< Value >( v ); 00044 } |
|
参照先 static_container::vector< Value, MaxSize >::size(). 参照元 static_container::vector< Value, MaxSize >::pop_back().
00170 { 00171 return 0 == size(); 00172 } |
|
参照先 static_container::vector< Value, MaxSize >::begin(), と static_container::vector< Value, MaxSize >::size().
|
|
|
現在、非常に重い動作です。 要望があれば高速化します。
参照先 static_container::difference_type, static_container::vector< Value, MaxSize >::end(), static_container::vector< Value, MaxSize >::pop_back(), と static_container::size_type.
00146 { 00147 difference_type sizeDiff = std::distance( first, last ); 00148 rotate( first, last, end() ); 00149 for ( size_type i = 0; i < sizeDiff; ++i ) { 00150 pop_back(); 00151 } 00152 } |
|
it を削除します
参照先 static_container::vector< Value, MaxSize >::end(), と static_container::vector< Value, MaxSize >::pop_back().
|
|
参照先 static_container::vector< Value, MaxSize >::begin().
00178 { return *begin(); } |
|
参照先 static_container::vector< Value, MaxSize >::begin().
00177 { return *begin(); } |
|
最大サイズ取得
参照先 static_container::size_type. 参照元 static_container::vector< Value, MaxSize >::push_back(), と static_container::vector< Value, MaxSize >::vector().
00060 { return const_max; }
|
|
代入演算子
参照先 static_container::vector< Value, MaxSize >::assign(), static_container::vector< Value, MaxSize >::begin(), と static_container::vector< Value, MaxSize >::end().
00117 { 00118 if ( this != &other ) { 00119 assign( other.begin(), other.end() ); 00120 } 00121 return *this; 00122 } |
|
参照先 static_container::vector< Value, MaxSize >::begin(), static_container::vector< Value, MaxSize >::size(), と static_container::size_type.
|
|
参照先 static_container::vector< Value, MaxSize >::begin(), static_container::vector< Value, MaxSize >::size(), と static_container::size_type. 参照元 static_container::vector< Value, MaxSize >::at().
|
|
|
|
|
置換
参照先 static_container::vector< Value, MaxSize >::begin(), と static_container::vector< Value, MaxSize >::end().
|
|
実装用。 先頭要素のアドレスを得る
00052 { 00053 return reinterpret_cast< const_pointer >( buffer_ ); 00054 } |
|
実装用。 先頭要素のアドレスを得る
参照元 static_container::vector< Value, MaxSize >::begin(), static_container::vector< Value, MaxSize >::pop_back(), と static_container::vector< Value, MaxSize >::push_back().
00047 { 00048 return reinterpret_cast< pointer >( buffer_ ); 00049 } |
|
|
|