From Jason Turner

[category.messages]

Diff to HTML by rtfpessoa

tmp/tmp0pr3prbb/{from.md → to.md} RENAMED
@@ -18,34 +18,34 @@ namespace std {
18
  using char_type = charT;
19
  using string_type = basic_string<charT>;
20
 
21
  explicit messages(size_t refs = 0);
22
 
23
- catalog open(const basic_string<char>& fn, const locale&) const;
24
  string_type get(catalog c, int set, int msgid,
25
  const string_type& dfault) const;
26
  void close(catalog c) const;
27
 
28
  static locale::id id;
29
 
30
  protected:
31
  ~messages();
32
- virtual catalog do_open(const basic_string<char>&, const locale&) const;
33
  virtual string_type do_get(catalog, int set, int msgid,
34
  const string_type& dfault) const;
35
  virtual void do_close(catalog) const;
36
  };
37
  }
38
  ```
39
 
40
  Values of type `messages_base::catalog` usable as arguments to members
41
  `get` and `close` can be obtained only by calling member `open`.
42
 
43
- ##### `messages` members <a id="locale.messages.members">[[locale.messages.members]]</a>
44
 
45
  ``` cpp
46
- catalog open(const basic_string<char>& name, const locale& loc) const;
47
  ```
48
 
49
  *Returns:* `do_open(name, loc)`.
50
 
51
  ``` cpp
@@ -58,14 +58,14 @@ string_type get(catalog cat, int set, int msgid, const string_type& dfault) cons
58
  void close(catalog cat) const;
59
  ```
60
 
61
  *Effects:* Calls `do_close(cat)`.
62
 
63
- ##### `messages` virtual functions <a id="locale.messages.virtuals">[[locale.messages.virtuals]]</a>
64
 
65
  ``` cpp
66
- catalog do_open(const basic_string<char>& name, const locale& loc) const;
67
  ```
68
 
69
  *Returns:* A value that may be passed to `get()` to retrieve a message
70
  from the message catalog identified by the string `name` according to an
71
  *implementation-defined* mapping. The result can be used until it is
@@ -78,22 +78,22 @@ conversion when retrieving messages, if needed.
78
 
79
  ``` cpp
80
  string_type do_get(catalog cat, int set, int msgid, const string_type& dfault) const;
81
  ```
82
 
83
- *Requires:* `cat` shall be a catalog obtained from `open()` and not yet
84
  closed.
85
 
86
  *Returns:* A message identified by arguments `set`, `msgid`, and
87
  `dfault`, according to an *implementation-defined* mapping. If no such
88
  message can be found, returns `dfault`.
89
 
90
  ``` cpp
91
  void do_close(catalog cat) const;
92
  ```
93
 
94
- *Requires:* `cat` shall be a catalog obtained from `open()` and not yet
95
  closed.
96
 
97
  *Effects:* Releases unspecified resources associated with `cat`.
98
 
99
  *Remarks:* The limit on such resources, if any, is
@@ -109,10 +109,11 @@ namespace std {
109
  using catalog = messages_base::catalog;
110
  using string_type = basic_string<charT>;
111
 
112
  explicit messages_byname(const char*, size_t refs = 0);
113
  explicit messages_byname(const string&, size_t refs = 0);
 
114
  protected:
115
  ~messages_byname();
116
  };
117
  }
118
  ```
 
18
  using char_type = charT;
19
  using string_type = basic_string<charT>;
20
 
21
  explicit messages(size_t refs = 0);
22
 
23
+ catalog open(const string& fn, const locale&) const;
24
  string_type get(catalog c, int set, int msgid,
25
  const string_type& dfault) const;
26
  void close(catalog c) const;
27
 
28
  static locale::id id;
29
 
30
  protected:
31
  ~messages();
32
+ virtual catalog do_open(const string&, const locale&) const;
33
  virtual string_type do_get(catalog, int set, int msgid,
34
  const string_type& dfault) const;
35
  virtual void do_close(catalog) const;
36
  };
37
  }
38
  ```
39
 
40
  Values of type `messages_base::catalog` usable as arguments to members
41
  `get` and `close` can be obtained only by calling member `open`.
42
 
43
+ ##### Members <a id="locale.messages.members">[[locale.messages.members]]</a>
44
 
45
  ``` cpp
46
+ catalog open(const string& name, const locale& loc) const;
47
  ```
48
 
49
  *Returns:* `do_open(name, loc)`.
50
 
51
  ``` cpp
 
58
  void close(catalog cat) const;
59
  ```
60
 
61
  *Effects:* Calls `do_close(cat)`.
62
 
63
+ ##### Virtual functions <a id="locale.messages.virtuals">[[locale.messages.virtuals]]</a>
64
 
65
  ``` cpp
66
+ catalog do_open(const string& name, const locale& loc) const;
67
  ```
68
 
69
  *Returns:* A value that may be passed to `get()` to retrieve a message
70
  from the message catalog identified by the string `name` according to an
71
  *implementation-defined* mapping. The result can be used until it is
 
78
 
79
  ``` cpp
80
  string_type do_get(catalog cat, int set, int msgid, const string_type& dfault) const;
81
  ```
82
 
83
+ *Preconditions:* `cat` is a catalog obtained from `open()` and not yet
84
  closed.
85
 
86
  *Returns:* A message identified by arguments `set`, `msgid`, and
87
  `dfault`, according to an *implementation-defined* mapping. If no such
88
  message can be found, returns `dfault`.
89
 
90
  ``` cpp
91
  void do_close(catalog cat) const;
92
  ```
93
 
94
+ *Preconditions:* `cat` is a catalog obtained from `open()` and not yet
95
  closed.
96
 
97
  *Effects:* Releases unspecified resources associated with `cat`.
98
 
99
  *Remarks:* The limit on such resources, if any, is
 
109
  using catalog = messages_base::catalog;
110
  using string_type = basic_string<charT>;
111
 
112
  explicit messages_byname(const char*, size_t refs = 0);
113
  explicit messages_byname(const string&, size_t refs = 0);
114
+
115
  protected:
116
  ~messages_byname();
117
  };
118
  }
119
  ```