名稱空間
變體
操作

std::time_get_byname

來自 cppreference.com
< cpp‎ | 本地化
 
 
 
 
定義於標頭檔案 <locale>
template<

    class CharT,
    class InputIt = std::istreambuf_iterator<CharT>

> class time_get_byname : public std::time_get<CharT, InputIt>

std::time_get_byname 是一個 std::time_get facet,它封裝了在構造時指定的區域設定的時間和日期解析規則。

目錄

[編輯] 特化

標準庫保證提供滿足以下型別要求的每種特化

  • CharTcharwchar_t 之一,並且
  • InputIt 必須滿足 LegacyInputIterator 的要求。

[編輯] 巢狀型別

型別 定義
char_type CharT
iter_type InputIt

[編輯] 成員函式

(建構函式)
構造一個新的 time_get_byname facet
(public 成員函式) [編輯]
(解構函式)
銷燬一個 time_get_byname facet
(protected 成員函式) [編輯]

std::time_get_byname::time_get_byname

explicit time_get_byname( const char* name, std::size_t refs = 0 );
explicit time_get_byname( const std::string& name, std::size_t refs = 0 );
(C++11 起)

為帶有 name 的區域設定構造一個新的 std::time_get_byname facet。

refs 用於資源管理:如果 refs == 0,則當最後一個持有它的 std::locale 物件被銷燬時,實現將銷燬該 facet。否則,物件不會被銷燬。

引數

name - 區域設定的名稱
refs - 連結到 facet 的引用計數

std::time_get_byname::~time_get_byname

protected:
~time_get_byname();

銷燬 facet。

繼承自 std::time_get

巢狀型別

型別 定義
char_type CharT
iter_type InputIt

[編輯] 資料成員

成員 描述
std::locale::id id [static] facet 的識別符號

成員函式

呼叫 do_date_order
(std::time_get<CharT,InputIt> 的公共成員函式) [編輯]
呼叫 do_get_time
(std::time_get<CharT,InputIt> 的公共成員函式) [編輯]
呼叫 do_get_date
(std::time_get<CharT,InputIt> 的公共成員函式) [編輯]
呼叫 do_get_weekday
(std::time_get<CharT,InputIt> 的公共成員函式) [編輯]
呼叫 do_get_monthname
(std::time_get<CharT,InputIt> 的公共成員函式) [編輯]
呼叫 do_get_year
(std::time_get<CharT,InputIt> 的公共成員函式) [編輯]
(C++11)
呼叫 do_get
(std::time_get<CharT,InputIt> 的公共成員函式) [編輯]

受保護的成員函式

獲取日期、月份和年份的首選順序
(std::time_get<CharT,InputIt> 的虛保護成員函式) [編輯]
[virtual]
從輸入流中提取小時、分鐘和秒
(std::time_get<CharT,InputIt> 的虛保護成員函式) [編輯]
[virtual]
從輸入流中提取月、日、年
(std::time_get<CharT,InputIt> 的虛保護成員函式) [編輯]
從輸入流中提取星期幾的名稱
(std::time_get<CharT,InputIt> 的虛保護成員函式) [編輯]
從輸入流中提取月份名稱
(std::time_get<CharT,InputIt> 的虛保護成員函式) [編輯]
[virtual]
從輸入流中提取年份
(std::time_get<CharT,InputIt> 的虛保護成員函式) [編輯]
[virtual] (C++11)
根據指定格式從輸入流中提取日期/時間元件
(std::time_get<CharT,InputIt> 的虛保護成員函式) [編輯]

繼承自 std::time_base

巢狀型別

型別 定義
dateorder 日期順序列舉型別,定義值 no_orderdmymdyymdydm

[編輯] 示例

[編輯] 參見

從輸入字元序列解析時間/日期值到 std::tm
(類模板) [編輯]
(C++11)
解析指定格式的日期/時間值
(函式模板) [編輯]