クラス テンプレート shttl::array2d< T, Allocator >

#include <array2d.h>

shttl::array2d< T, Allocator >のコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public 型

typedef std::allocator< T > allocator_type
typedef const T * const_pointer
typedef const T & const_reference
typedef ssize_t difference_type
typedef T * pointer
typedef T & reference
typedef size_t size_type
typedef array2d< T > this_type
typedef T value_type

Public メソッド

 array2d (const size_type c, const size_type r, const T &t=T())
iterator begin ()
const_iterator begin () const
size_type cols () const
iterator end ()
const_iterator end () const
size_type max_size () const
iterator operator[] (const size_type r)
const const_iterator operator[] (const size_type r) const
size_type rows () const
size_type size () const
 ~array2d ()

Static Public 変数

static const std::numeric_limits<
size_type
size_info

Protected 変数

allocator_type _a
const size_type _col
const size_type _col_bit
value_type *const _ptr
const size_type _row

構成

class  _iterator_base
class  const_iterator
class  iterator

説明

template<class T, class Allocator = std::allocator<T>>
class shttl::array2d< T, Allocator >

array2d.h48 行で定義されています。


型定義

template<class T, class Allocator = std::allocator<T>>
typedef std::allocator<T> shttl::array2d< T, Allocator >::allocator_type

array2d.h56 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef const T* shttl::array2d< T, Allocator >::const_pointer

array2d.h61 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef const T& shttl::array2d< T, Allocator >::const_reference

array2d.h58 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef ssize_t shttl::array2d< T, Allocator >::difference_type

array2d.h59 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef T* shttl::array2d< T, Allocator >::pointer

array2d.h60 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef T& shttl::array2d< T, Allocator >::reference

array2d.h57 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef size_t shttl::array2d< T, Allocator >::size_type

array2d.h55 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef array2d<T> shttl::array2d< T, Allocator >::this_type

array2d.h63 行で定義されています。

template<class T, class Allocator = std::allocator<T>>
typedef T shttl::array2d< T, Allocator >::value_type

array2d.h54 行で定義されています。


コンストラクタとデストラクタ

template<class T, class Allocator = std::allocator<T>>
shttl::array2d< T, Allocator >::array2d ( const size_type  c,
const size_type  r,
const T &  t = T() 
) [inline, explicit]

array2d.h361 行で定義されています。

参照先 shttl::array2d< T, Allocator >::_col_bitshttl::array2d< T, Allocator >::_ptr.

00365           :
00366             _row(r), _col(c),
00367             _col_bit(_c2b(c)),
00368             _ptr(_a.allocate((size_t)r << _col_bit))
00369         {
00370             if (r <= 0 || c <= 0)
00371                 throw std::invalid_argument("array2d::array2d");
00372 
00373             for (size_type i = 0; i < (r << _col_bit); ++i)
00374                 _ptr[i] = t;
00375         }

template<class T, class Allocator = std::allocator<T>>
shttl::array2d< T, Allocator >::~array2d (  )  [inline]

array2d.h377 行で定義されています。

参照先 shttl::array2d< T, Allocator >::_ashttl::array2d< T, Allocator >::_col_bitshttl::array2d< T, Allocator >::_ptrshttl::array2d< T, Allocator >::rows().

00378         {
00379             for (size_type i = 0; i < (rows() << _col_bit); ++i)
00380                 _a.destroy(_ptr + i);
00381             _a.deallocate(_ptr, (size_t)rows() << _col_bit);
00382         }

関数の呼び出しグラフ:


関数

template<class T, class Allocator = std::allocator<T>>
iterator shttl::array2d< T, Allocator >::begin (  )  [inline]

array2d.h417 行で定義されています。

00418         { 
00419             return iterator(this,      0, 0); 
00420         }

template<class T, class Allocator = std::allocator<T>>
const_iterator shttl::array2d< T, Allocator >::begin (  )  const [inline]

array2d.h409 行で定義されています。

00410         { 
00411             return const_iteraotr(this,      0, 0);
00412         }

template<class T, class Allocator = std::allocator<T>>
size_type shttl::array2d< T, Allocator >::cols (  )  const [inline]

array2d.h337 行で定義されています。

参照先 shttl::array2d< T, Allocator >::_col.

参照元 shttl::array2d< T, Allocator >::iterator::operator *()shttl::array2d< T, Allocator >::const_iterator::operator *()shttl::array2d< T, Allocator >::size().

00337 { return _col; }

Here is the caller graph for this function:

template<class T, class Allocator = std::allocator<T>>
iterator shttl::array2d< T, Allocator >::end (  )  [inline]

array2d.h421 行で定義されています。

参照先 shttl::array2d< T, Allocator >::size().

00422         { 
00423             return iterator(this, size(), 0); 
00424         }

関数の呼び出しグラフ:

template<class T, class Allocator = std::allocator<T>>
const_iterator shttl::array2d< T, Allocator >::end (  )  const [inline]

array2d.h413 行で定義されています。

参照先 shttl::array2d< T, Allocator >::size().

00414         { 
00415             return const_iterator(this, size(), 0); 
00416         }

関数の呼び出しグラフ:

template<class T, class Allocator = std::allocator<T>>
size_type shttl::array2d< T, Allocator >::max_size (  )  const [inline]

array2d.h339 行で定義されています。

参照先 shttl::array2d< T, Allocator >::size().

00339 { return size(); }

関数の呼び出しグラフ:

template<class T, class Allocator = std::allocator<T>>
iterator shttl::array2d< T, Allocator >::operator[] ( const size_type  r  )  [inline]

array2d.h396 行で定義されています。

参照先 shttl::array2d< T, Allocator >::rows().

00397         {
00398         #ifdef SHTTL_DEBUG
00399             if (r < 0 || rows() <= r)
00400                 throw std::out_of_range("array2d::operator[]");
00401         #endif
00402 
00403             return iterator(this, r, 0);
00404         }

関数の呼び出しグラフ:

template<class T, class Allocator = std::allocator<T>>
const const_iterator shttl::array2d< T, Allocator >::operator[] ( const size_type  r  )  const [inline]

array2d.h386 行で定義されています。

参照先 shttl::array2d< T, Allocator >::rows().

00387         {
00388         #ifdef SHTTL_DEBUG
00389             if (r < 0 || rows() <= r)
00390                 throw std::out_of_range("array2d::operator[]");
00391         #endif
00392 
00393             return const_iterator(this, r, 0);
00394         }

関数の呼び出しグラフ:

template<class T, class Allocator = std::allocator<T>>
size_type shttl::array2d< T, Allocator >::rows (  )  const [inline]

array2d.h336 行で定義されています。

参照先 shttl::array2d< T, Allocator >::_row.

参照元 shttl::array2d< T, Allocator >::iterator::operator *()shttl::array2d< T, Allocator >::const_iterator::operator *()shttl::array2d< T, Allocator >::operator[]()shttl::array2d< T, Allocator >::size()shttl::array2d< T, Allocator >::~array2d().

00336 { return _row; }

Here is the caller graph for this function:

template<class T, class Allocator = std::allocator<T>>
size_type shttl::array2d< T, Allocator >::size (  )  const [inline]

array2d.h338 行で定義されています。

参照先 shttl::array2d< T, Allocator >::cols()shttl::array2d< T, Allocator >::rows().

参照元 shttl::array2d< T, Allocator >::end()shttl::array2d< T, Allocator >::max_size().

00338 { return rows() * cols(); }

関数の呼び出しグラフ:

Here is the caller graph for this function:


変数

template<class T, class Allocator = std::allocator<T>>
allocator_type shttl::array2d< T, Allocator >::_a [protected]

array2d.h330 行で定義されています。

参照元 shttl::array2d< T, Allocator >::~array2d().

template<class T, class Allocator = std::allocator<T>>
const size_type shttl::array2d< T, Allocator >::_col [protected]

array2d.h325 行で定義されています。

参照元 shttl::array2d< T, Allocator >::cols().

template<class T, class Allocator = std::allocator<T>>
const size_type shttl::array2d< T, Allocator >::_col_bit [protected]

array2d.h326 行で定義されています。

参照元 shttl::array2d< T, Allocator >::array2d()shttl::array2d< T, Allocator >::iterator::operator *()shttl::array2d< T, Allocator >::const_iterator::operator *()shttl::array2d< T, Allocator >::~array2d().

template<class T, class Allocator = std::allocator<T>>
value_type* const shttl::array2d< T, Allocator >::_ptr [protected]

array2d.h328 行で定義されています。

参照元 shttl::array2d< T, Allocator >::array2d()shttl::array2d< T, Allocator >::iterator::operator *()shttl::array2d< T, Allocator >::const_iterator::operator *()shttl::array2d< T, Allocator >::~array2d().

template<class T, class Allocator = std::allocator<T>>
const size_type shttl::array2d< T, Allocator >::_row [protected]

array2d.h324 行で定義されています。

参照元 shttl::array2d< T, Allocator >::rows().

template<class T, class Allocator = std::allocator<T>>
const std::numeric_limits<size_type> shttl::array2d< T, Allocator >::size_info [static]

array2d.h65 行で定義されています。


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 15:33:25 2013に生成されました。  doxygen 1.4.7