Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.91 KB

do_in.md

File metadata and controls

52 lines (36 loc) · 1.91 KB

do_in

  • locale[meta header]
  • std[meta namespace]
  • codecvt[meta class]
  • function[meta id-type]
protected:
  virtual result
    do_in(stateT& state,
          const externT* from,
          const externT* from_end,
          const externT*& from_next,
          internT* to,
          internT* to_end,
          internT*& to_next) const; // (1) C++98

概要

外部型の文字列を内部型の文字列へ変換する。in()から呼び出される仮想関数である。

事前条件

from <= from_end && to <= to_endが妥当な式であり、定義された動作をすること。またその結果がtrueであること。

stateは、シーケンスの先頭であれば初期化されていること。そうでなければ、シーケンス内の先行する文字を変換した結果と等しいこと。

効果

範囲[from, from_end)の文字を変換し、結果をtoから順に格納する。変換する要素数は(from_end - from)以下、格納する要素数は(to_end - to)以下である。

変換できない文字に遭遇した場合は、そこで変換を停止する。from_nextとto_nextは、常に変換に成功した最後の要素の1つ次を指す。

戻り値

codecvt_base::resultの列挙値。意味はdo_out()と同じである。

備考

stateに対する操作は未規定である。

basic_filebufが使用するcodecvtファセットは、to != to_endでdo_in(state, from, from_end, from_next, to, to_end, to_next)がokを返すならば、do_in(state, from, from_end, from_next, to, to + 1, to_next)もokを返す、という性質を持つ必要がある。

バージョン

言語

  • C++98

関連項目