クラス テンプレート shttl::counter_base< value_type, value_body_type >

#include <counter.h>

shttl::counter_base< value_type, value_body_type >のコラボレーション図

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

Public メソッド

bool above_threshold () const
 counter_base (value_body_type value, value_type initv=value_type(), value_type min=0, value_type max=3, value_type add=1, value_type sub=1, value_type threshold=0)
value_type dec ()
value_type inc ()
value_type initv () const
value_type max () const
value_type min () const
 operator value_type () const
void reset ()
void set (value_type initv=value_type(), value_type min=0, value_type max=3, value_type add=1, value_type sub=1, value_type threshold=0)
value_type threshold () const

Protected 変数

value_type m_add
value_type m_initv
value_type m_max
value_type m_min
value_type m_sub
value_type m_threshold
value_body_type m_value

説明

template<typename value_type = u8, typename value_body_type = value_type>
class shttl::counter_base< value_type, value_body_type >

counter.h52 行で定義されています。


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

template<typename value_type = u8, typename value_body_type = value_type>
shttl::counter_base< value_type, value_body_type >::counter_base ( value_body_type  value,
value_type  initv = value_type(),
value_type  min = 0,
value_type  max = 3,
value_type  add = 1,
value_type  sub = 1,
value_type  threshold = 0 
) [inline, explicit]

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

00064           :
00065             m_value( value ),
00066             m_initv( initv ),
00067             m_min  ( min   ),
00068             m_max  ( max   ),
00069             m_add  ( add   ),
00070             m_sub  ( sub   ),
00071             m_threshold( threshold )
00072         {
00073         /*  static_assert( 
00074                 sizeof(int) >= sizeof(value_type), 
00075                 "The size of value_type is too large." 
00076             );*/
00077         }


関数

template<typename value_type = u8, typename value_body_type = value_type>
bool shttl::counter_base< value_type, value_body_type >::above_threshold (  )  const [inline]

counter.h150 行で定義されています。

00151         {
00152             return m_value >= m_threshold;
00153         }

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::dec (  )  [inline]

counter.h138 行で定義されています。

00139         {
00140             int value = m_value;
00141             value -= m_sub;
00142             if( value < m_min ){
00143                 value = m_min;
00144             }
00145             m_value = (value_type)value;
00146             return m_value;
00147         }

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::inc (  )  [inline]

counter.h127 行で定義されています。

00128         {
00129             int value = m_value;
00130             value += m_add;
00131             if( value > m_max ){
00132                 value = m_max;
00133             }
00134             m_value = (value_type)value;
00135             return m_value;
00136         }

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::initv (  )  const [inline]

counter.h79 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::set().

00080         {
00081             return m_initv;
00082         }

Here is the caller graph for this function:

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::max (  )  const [inline]

counter.h89 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::set().

00090         {
00091             return m_max;
00092         }

Here is the caller graph for this function:

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::min (  )  const [inline]

counter.h84 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::set().

00085         {
00086             return m_min;
00087         }

Here is the caller graph for this function:

template<typename value_type = u8, typename value_body_type = value_type>
shttl::counter_base< value_type, value_body_type >::operator value_type (  )  const [inline]

counter.h100 行で定義されています。

00101         {
00102             return m_value; 
00103         }

template<typename value_type = u8, typename value_body_type = value_type>
void shttl::counter_base< value_type, value_body_type >::reset (  )  [inline]

counter.h122 行で定義されています。

00123         {
00124             m_value = m_initv;
00125         }

template<typename value_type = u8, typename value_body_type = value_type>
void shttl::counter_base< value_type, value_body_type >::set ( value_type  initv = value_type(),
value_type  min = 0,
value_type  max = 3,
value_type  add = 1,
value_type  sub = 1,
value_type  threshold = 0 
) [inline]

counter.h105 行で定義されています。

00113         {
00114             m_initv = initv;
00115             m_min = min;
00116             m_max = max;
00117             m_add = add;
00118             m_sub = sub;
00119             m_threshold = threshold;
00120         }

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::threshold (  )  const [inline]

counter.h94 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::set().

00095         {
00096             return m_threshold;
00097         }

Here is the caller graph for this function:


変数

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::m_add [protected]

counter.h160 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::inc()shttl::counter_base< value_type, value_type >::set().

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::m_initv [protected]

counter.h157 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::initv()shttl::counter_base< value_type, value_type >::reset()shttl::counter_base< value_type, value_type >::set().

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::m_max [protected]

counter.h159 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::inc()shttl::counter_base< value_type, value_type >::max()shttl::counter_base< value_type, value_type >::set().

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::m_min [protected]

counter.h158 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::dec()shttl::counter_base< value_type, value_type >::min()shttl::counter_base< value_type, value_type >::set().

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::m_sub [protected]

counter.h161 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::dec()shttl::counter_base< value_type, value_type >::set().

template<typename value_type = u8, typename value_body_type = value_type>
value_type shttl::counter_base< value_type, value_body_type >::m_threshold [protected]

counter.h162 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::above_threshold()shttl::counter_base< value_type, value_type >::set()shttl::counter_base< value_type, value_type >::threshold().

template<typename value_type = u8, typename value_body_type = value_type>
value_body_type shttl::counter_base< value_type, value_body_type >::m_value [protected]

counter.h156 行で定義されています。

参照元 shttl::counter_base< value_type, value_type >::above_threshold()shttl::counter_base< value_type, value_type >::dec()shttl::counter_base< value_type, value_type >::inc()shttl::counter_base< value_type, value_type >::operator value_type ()shttl::counter_base< value_type, value_type >::reset().


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