/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/Samples.CPP/stream_delimiter/README

  • 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
Changing the record separator for streams (operator >>) - FAILED
 
2
----------------------------------------------------------------
 
3
Everything operates in the following way:
 
4
 a) Skipping all whitespaces
 
5
    1) The istream::sentry nested class constructor is called for that
 
6
        [ no way to override nested class in C++ ]
 
7
    2) Spaces are checked using "ctype_base::space"
 
8
        [ it could be dependent on the current facet (locale) ]
 
9
    3) In the STLPort the following function stack is called [differs in gcc]
 
10
        M_init_skip, M_skip_whitespaces, _is_not_wspace, ctype::is_space
 
11
 b) Reading the formated value
 
12
    1) For strings the reading stops on ctype_base::space.
 
13
    2) For integer types - on the first in-appropriate symbol.
 
14
    3) The following function is called:
 
15
            __get_num [STLPort],  num_get [gcc]
 
16
-------------------------------------------------------------------
 
17
 
 
18
 
 
19
SEE 'locale_facet.cpp' for WORKING EXAMPLE