Common Library  0.9.5
ExceptionInvalidLength< T > クラステンプレート

長さが不正だった場合に対する例外クラス [詳解]

ExceptionInvalidLength< T > の継承関係図
ExceptionLength ExceptionNegativeLength< T > ExceptionNotPositiveLength< T >

公開メンバ関数

 ExceptionInvalidLength (const std::string &info, T invalidLength)
 不正と判断された長さを指定して構築 [詳解]
 
invalidLength () const
 不正な長さを返す [詳解]
 
void printInfo (std::ostream &os) const
 不正値の出力 [詳解]
 
- 基底クラス ExceptionLength に属する継承公開メンバ関数
 ExceptionLength (const std::string &info)
 例外に関する情報を指定して構築 [詳解]
 

詳解

template<class T>
class ExceptionInvalidLength< T >

長さが不正だった場合に対する例外クラス

不正な長さ(負値であるなど)の場合に投げられる例外クラス。内部に不正と判断された長さを保持する。

テンプレート引数の T は通常、対象イテレータやコンテナクラスの difference_type となる。

構築子と解体子

◆ ExceptionInvalidLength()

template<class T >
ExceptionInvalidLength< T >::ExceptionInvalidLength ( const std::string &  info,
invalidLength 
)
inline

不正と判断された長さを指定して構築

引数
info例外に関する情報
invalidLength不正な長さ

関数詳解

◆ invalidLength()

template<class T >
T ExceptionInvalidLength< T >::invalidLength ( ) const
inline

不正な長さを返す

戻り値
不正な長さ

◆ printInfo()

template<class T >
void ExceptionInvalidLength< T >::printInfo ( std::ostream &  os) const
inlinevirtual

不正値の出力

引数
os出力ストリームへの参照
戻り値
なし

ExceptionLengthを実装しています。


このクラス詳解は次のファイルから抽出されました: