null_regex_traits 構造体テンプレート

template<typename Char>
struct null_regex_traits

非文字データのための控えの regex_traits

概要

// ヘッダ:<boost/xpressive/xpressive_fwd.hpp>

template<typename Char>
struct null_regex_traits {
  // 構築、コピー、解体
  null_regex_traits(locale_type const & = locale_type());

  // 公開メンバ関数
  bool operator==(null_regex_traits< char_type > const &) const;
  bool operator!=(null_regex_traits< char_type > const &) const;
  char_type widen(char) const;

  // 公開静的メンバ関数
  static unsigned char hash(char_type);
  static char_type translate(char_type);
  static char_type translate_nocase(char_type);
  static bool in_range(char_type, char_type, char_type);
  static bool in_range_nocase(char_type, char_type, char_type);
  template<typename FwdIter> static string_type transform(FwdIter, FwdIter);
  template<typename FwdIter>
    static string_type transform_primary(FwdIter, FwdIter);
  template<typename FwdIter>
    static string_type lookup_collatename(FwdIter, FwdIter);
  template<typename FwdIter>
    static char_class_type lookup_classname(FwdIter, FwdIter, bool);
  static bool isctype(char_type, char_class_type);
  static int value(char_type, int);
  static locale_type imbue(locale_type);
  static locale_type getloc();
};

説明

null_regex_traits 構築、コピー、解体の公開演算

null_regex_traits(locale_type const &loc = locale_type())

null_regex_traits オブジェクトを初期化する。

null_regex_traits 公開メンバ関数

bool operator==(null_regex_traits<char_type> const &that) const

2 つの null_regex_traits オブジェクトが等値か調べる。

戻り値

真。

bool operator!=(null_regex_traits<char_type> const &that) const

2 つの null_regex_traits オブジェクトが等値でないか調べる。

戻り値

偽。

char_type widen(char ch) const

char 型の値を Char 型に変換する。

パラメータ

ch -- 元の文字。

戻り値

Elem(ch)

null_regex_traits 公開静的メンバ関数

static unsigned char hash(char_type ch)

[0, UCHAR_MAX] の範囲で Elem のハッシュ値を返す。

パラメータ

ch -- 元の文字。

戻り値

0 以上 UCHAR_MAX 以下の値。

static char_type translate(char_type ch)

何もしない。

パラメータ

ch -- 元の文字。

戻り値

ch

static char_type translate_nocase(char_type ch)

何もしない。

パラメータ
  • ch -- 元の文字。

  • first -- 範囲の下限。

  • last -- 範囲の上限。

戻り値

first <= ch && ch <= last

static bool in_range(char_type first, char_type last, char_type ch)

文字が文字範囲に含まれるか調べる。

パラメータ
  • ch -- 元の文字。

  • first -- 範囲の下限。

  • last -- 範囲の上限。

戻り値

first <= ch && ch <= last

static bool in_range_nocase(char_type first, char_type last, char_type ch)

文字が文字範囲に含まれるか調べる。

注釈

null_regex_traits はケースフォールディングを行わないので、この関数は in_range と等価である。

パラメータ
  • ch -- 元の文字。

  • first -- 範囲の下限。

  • last -- 範囲の上限。

戻り値

first <= ch && ch <= last

template<typename FwdIter>
static string_type transform(FwdIter begin, FwdIter end)

イテレータ範囲 [F1, F2) が示す文字シーケンスのソートキーを返す。文字シーケンス [G1, G2) が文字シーケンス [H1, H2) の前にソートされる場合に v.transform(G1, G2) < v.transform(H1, H2) とならなければならない。

注釈

現在使用していない。

template<typename FwdIter>
static string_type transform_primary(FwdIter begin, FwdIter end)

イテレータ範囲 [F1, F2) が示す文字シーケンスのソートキーを返す。大文字小文字を区別せずにソートして文字シーケンス [G1, G2) が文字シーケンス [H1, H2) の前に現れる場合に v.transform(G1, G2) < v.transform(H1, H2) とならなければならない。

注釈

現在使用していない。

template<typename FwdIter>
static string_type lookup_collatename(FwdIter begin, FwdIter end)

イテレータ範囲 [F1, F2) が示す文字シーケンスが構成する照合要素を表す文字シーケンスを返す。文字シーケンスが正しい照合要素でなければ空文字列を返す。

注釈

現在使用していない。

template<typename FwdIter>
static char_class_type lookup_classname(FwdIter begin, FwdIter end, bool icase)

null_regex_traits は文字分類をもたないので、lookup_classname は使用しない。

パラメータ
  • begin -- 使用しない。

  • end -- 使用しない。

  • icase -- 使用しない。

戻り値

static_cast<char_class_type>(0)

static bool isctype(char_type ch, char_class_type mask)

null_regex_traits は文字分類をもたないので、isctype は使用しない。

パラメータ
  • ch -- 使用しない。

  • mask -- 使用しない。

戻り値

static int value(char_type ch, int radix)

null_regex_traits は数字を解釈しないので、value は使用しない。

パラメータ
  • ch -- 使用しない。

  • radix -- 使用しない。

戻り値

-1

static locale_type imbue(locale_type loc)

何もしない。

パラメータ

loc -- 使用しない。

戻り値

loc

static locale_type getloc()

何もしない。

戻り値

locale_type() を返す。