/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Development/languages/C/Core/class/locale.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Facets
 
2
======
 
3
 The key to understanding the C++ locale library is the facet. A facet, 
 
4
informally, is a class interface for a service that may be obtained from 
 
5
a locale object. 
 
6
 
 
7
num_get<>       - numerical values formated input
 
8
num_put<>       - numerical values formated output
 
9
time_get<>      - time values formated input
 
10
time_put<>      - time values formated output
 
11
numpunct<>      - numeric punctuation
 
12
moneypunct<>    - money punctuation
 
13
collate<>       - ordering for string values
 
14
ctype<>
 
15
codecvt<>
 
16
message<>
 
17
 
 
18
* It is possible to register new application dependent facets in locale
 
19
 
 
20
Overriding
 
21
==========
 
22
 * The classes for overriding are found in locale_facets.h
 
23
 * Some of overrloading features are disabled in template specializations
 
24
 * It is possible to overload in certain locales, using  _byname base classes 
 
25
   (ctype_byname for example) accepting locale names as parameter.
 
26
 * Control of overriding /adding is carried out by id. For overriding,
 
27
     We're also inheriting the static member variable id from the base class, 
 
28
     instead of defining id ourselves. That's important. We want the system to 
 
29
     put my_ctype in the same slot that it would normally use for 
 
30
     std::ctype<char>, so the two must use the same id.
 
31
 
 
32
see examples, in locale_facets.cpp