|
4653 | 4653 | locale's
|
4654 | 4654 | \tcode{num_get<>}\iref{locale.num.get} object to perform parsing the input
|
4655 | 4655 | stream data.
|
4656 |
| -These extractors behave as formatted input functions (as described in~\ref{istream.formatted.reqmts}). After a sentry object is constructed, the |
| 4656 | +These extractors behave as formatted input functions (as described in~\ref{istream.formatted.reqmts}). After a \tcode{sentry} object is constructed, the |
4657 | 4657 | conversion occurs as if performed by the following code fragment:
|
4658 | 4658 | \begin{codeblock}
|
4659 | 4659 | using numget = num_get<charT, istreambuf_iterator<charT, traits>>;
|
|
4895 | 4895 | \tcode{setstate(fail\-bit)},
|
4896 | 4896 | which may throw
|
4897 | 4897 | \tcode{ios_base::failure}\iref{iostate.flags}.
|
4898 |
| -After a sentry object is constructed, extracts |
| 4898 | +After a \tcode{sentry} object is constructed, extracts |
4899 | 4899 | characters from
|
4900 | 4900 | \tcode{*this}
|
4901 | 4901 | and inserts them in the output sequence controlled by \tcode{sb}.
|
|
4946 | 4946 | \tcode{bool},
|
4947 | 4947 | the function endeavors
|
4948 | 4948 | to obtain the requested input.
|
4949 |
| -Otherwise, if the sentry constructor exits by throwing an exception or if |
4950 |
| -the sentry object returns \tcode{false}, when converted to a value of type |
| 4949 | +Otherwise, if the \tcode{sentry} constructor exits by throwing an exception or if |
| 4950 | +the \tcode{sentry} object returns \tcode{false}, when converted to a value of type |
4951 | 4951 | \tcode{bool},
|
4952 | 4952 | the function returns without attempting to obtain any input.
|
4953 | 4953 | In either case the number of extracted characters is set to 0;
|
|
5011 | 5011 | \effects
|
5012 | 5012 | Behaves as an unformatted input function
|
5013 | 5013 | (as described above).
|
5014 |
| -After constructing a sentry object, extracts |
| 5014 | +After constructing a \tcode{sentry} object, extracts |
5015 | 5015 | a character \tcode{c}, if one is available.
|
5016 | 5016 | Otherwise, the function calls
|
5017 | 5017 | \tcode{setstate(failbit)},
|
|
5035 | 5035 | \effects
|
5036 | 5036 | Behaves as an unformatted input function
|
5037 | 5037 | (as described above).
|
5038 |
| -After constructing a sentry object, extracts |
| 5038 | +After constructing a \tcode{sentry} object, extracts |
5039 | 5039 | a character, if one is available, and assigns it to \tcode{c}.
|
5040 | 5040 | \begin{footnote}
|
5041 | 5041 | Note
|
|
5064 | 5064 | \effects
|
5065 | 5065 | Behaves as an unformatted input function
|
5066 | 5066 | (as described above).
|
5067 |
| -After constructing a sentry object, extracts |
| 5067 | +After constructing a \tcode{sentry} object, extracts |
5068 | 5068 | characters and stores them
|
5069 | 5069 | into successive locations of an array whose first element is designated by
|
5070 | 5070 | \tcode{s}.
|
|
5129 | 5129 | \effects
|
5130 | 5130 | Behaves as an unformatted input function
|
5131 | 5131 | (as described above).
|
5132 |
| -After constructing a sentry object, extracts |
| 5132 | +After constructing a \tcode{sentry} object, extracts |
5133 | 5133 | characters and inserts them
|
5134 | 5134 | in the output sequence controlled by
|
5135 | 5135 | \tcode{sb}.
|
|
5186 | 5186 | \effects
|
5187 | 5187 | Behaves as an unformatted input function
|
5188 | 5188 | (as described above).
|
5189 |
| -After constructing a sentry object, extracts |
| 5189 | +After constructing a \tcode{sentry} object, extracts |
5190 | 5190 | characters and stores them
|
5191 | 5191 | into successive locations of an array whose first element is designated by
|
5192 | 5192 | \tcode{s}.
|
|
5302 | 5302 | \effects
|
5303 | 5303 | Behaves as an unformatted input function
|
5304 | 5304 | (as described above).
|
5305 |
| -After constructing a sentry object, extracts |
| 5305 | +After constructing a \tcode{sentry} object, extracts |
5306 | 5306 | characters and discards them.
|
5307 | 5307 | Characters are extracted until any of the following occurs:
|
5308 | 5308 | \begin{itemize}
|
|
5341 | 5341 | \effects
|
5342 | 5342 | Behaves as an unformatted input function
|
5343 | 5343 | (as described above).
|
5344 |
| -After constructing a sentry object, reads but does not extract |
| 5344 | +After constructing a \tcode{sentry} object, reads but does not extract |
5345 | 5345 | the current input character.
|
5346 | 5346 |
|
5347 | 5347 | \pnum
|
|
5365 | 5365 | \effects
|
5366 | 5366 | Behaves as an unformatted input function (as described above).
|
5367 | 5367 | After constructing
|
5368 |
| -a sentry object, if |
| 5368 | +a \tcode{sentry} object, if |
5369 | 5369 | \tcode{!good()}
|
5370 | 5370 | calls
|
5371 | 5371 | \tcode{setstate(failbit)}
|
|
5407 | 5407 | \effects
|
5408 | 5408 | Behaves as an unformatted input function (as described above).
|
5409 | 5409 | After constructing
|
5410 |
| -a sentry object, if |
| 5410 | +a \tcode{sentry} object, if |
5411 | 5411 | \tcode{!good()}
|
5412 | 5412 | calls
|
5413 | 5413 | \tcode{setstate(failbit)}
|
|
5450 | 5450 | \effects
|
5451 | 5451 | Behaves as an unformatted input function (as described above), except that the function first clears \tcode{eofbit}.
|
5452 | 5452 | After constructing
|
5453 |
| -a sentry object, if |
| 5453 | +a \tcode{sentry} object, if |
5454 | 5454 | \tcode{!good()}
|
5455 | 5455 | calls
|
5456 | 5456 | \tcode{setstate(failbit)}
|
|
5492 | 5492 | \effects
|
5493 | 5493 | Behaves as an unformatted input function (as described above), except that the function first clears \tcode{eofbit}.
|
5494 | 5494 | After constructing
|
5495 |
| -a sentry object, if |
| 5495 | +a \tcode{sentry} object, if |
5496 | 5496 | \tcode{!good()}
|
5497 | 5497 | calls
|
5498 | 5498 | \tcode{setstate(failbit)}
|
|
5537 | 5537 | value returned by subsequent calls to
|
5538 | 5538 | \tcode{gcount()}.
|
5539 | 5539 | After constructing
|
5540 |
| -a sentry object, if |
| 5540 | +a \tcode{sentry} object, if |
5541 | 5541 | \tcode{rdbuf()}
|
5542 | 5542 | is a null pointer, returns \tcode{-1}.
|
5543 | 5543 | Otherwise, calls
|
|
5567 | 5567 |
|
5568 | 5568 | \pnum
|
5569 | 5569 | \returns
|
5570 |
| -After constructing a sentry object, if |
| 5570 | +After constructing a \tcode{sentry} object, if |
5571 | 5571 | \tcode{fail() != false},
|
5572 | 5572 | returns
|
5573 | 5573 | \tcode{pos_type(-1)}
|
|
5590 | 5590 | the number of characters extracted, and it does not affect the value
|
5591 | 5591 | returned by subsequent calls to
|
5592 | 5592 | \tcode{gcount()}.
|
5593 |
| -After constructing a sentry object, if |
| 5593 | +After constructing a \tcode{sentry} object, if |
5594 | 5594 | \tcode{fail() != true},
|
5595 | 5595 | executes
|
5596 | 5596 | \tcode{rdbuf()->pubseekpos(pos, ios_base::in)}.
|
|
5615 | 5615 | Behaves as an unformatted input function (as described above), except that the function first clears \tcode{eofbit},
|
5616 | 5616 | does not count the number of characters extracted, and
|
5617 | 5617 | does not affect the value returned by subsequent calls to \tcode{gcount()}.
|
5618 |
| -After constructing a sentry object, if |
| 5618 | +After constructing a \tcode{sentry} object, if |
5619 | 5619 | \tcode{fail() != true},
|
5620 | 5620 | executes
|
5621 | 5621 | \tcode{rdbuf()->pubseekoff(off, dir, ios_base::in)}.
|
|
5645 | 5645 | \effects
|
5646 | 5646 | Behaves as an unformatted input function\iref{istream.unformatted}, except that it does not count the number of characters extracted and
|
5647 | 5647 | does not affect the value returned by subsequent calls to \tcode{is.gcount()}. After
|
5648 |
| -constructing a sentry object extracts characters as long as the next available |
| 5648 | +constructing a \tcode{sentry} object extracts characters as long as the next available |
5649 | 5649 | character \tcode{c} is whitespace or until there are no more characters in the sequence.
|
5650 | 5650 | Whitespace characters are distinguished with the same criterion as used by
|
5651 | 5651 | \tcode{sentry::sentry}\iref{istream.sentry}.
|
|
6505 | 6505 | \pnum
|
6506 | 6506 | \effects
|
6507 | 6507 | Behaves as an unformatted output function\iref{ostream.unformatted}.
|
6508 |
| -After the sentry object is |
| 6508 | +After the \tcode{sentry} object is |
6509 | 6509 | constructed, if
|
6510 | 6510 | \tcode{sb} is null calls
|
6511 | 6511 | \tcode{setstate(badbit)}
|
|
6688 | 6688 | \tcode{(exceptions() \& badbit) != 0}
|
6689 | 6689 | then the exception is rethrown.
|
6690 | 6690 | In any case, the unformatted output function ends by destroying the
|
6691 |
| -sentry object, then, if no exception was thrown, returning the value |
| 6691 | +\tcode{sentry} object, then, if no exception was thrown, returning the value |
6692 | 6692 | specified for the unformatted output function.
|
6693 | 6693 |
|
6694 | 6694 | \indexlibrarymember{put}{basic_ostream}%
|
|
6700 | 6700 | \pnum
|
6701 | 6701 | \effects
|
6702 | 6702 | Behaves as an unformatted output function (as described above).
|
6703 |
| -After constructing a sentry |
| 6703 | +After constructing a \tcode{sentry} |
6704 | 6704 | object, inserts
|
6705 | 6705 | the character \tcode{c}, if possible.
|
6706 | 6706 | \begin{footnote}
|
|
6729 | 6729 | \begin{itemdescr}
|
6730 | 6730 | \pnum
|
6731 | 6731 | \effects
|
6732 |
| -Behaves as an unformatted output function (as described above). After constructing a sentry |
| 6732 | +Behaves as an unformatted output function (as described above). After constructing a \tcode{sentry} |
6733 | 6733 | object, obtains
|
6734 | 6734 | characters to insert from
|
6735 | 6735 | successive locations of an array whose first element is designated by
|
|
6769 | 6769 | If
|
6770 | 6770 | \tcode{rdbuf()}
|
6771 | 6771 | is not a null pointer,
|
6772 |
| -constructs a sentry object. If that object returns \tcode{true} when converted to a value of type \tcode{bool} the function |
| 6772 | +constructs a \tcode{sentry} object. If that object returns \tcode{true} when converted to a value of type \tcode{bool} the function |
6773 | 6773 | calls
|
6774 | 6774 | \tcode{rdbuf()->pubsync()}.
|
6775 | 6775 | If that function returns $-1$
|
6776 | 6776 | calls
|
6777 | 6777 | \tcode{setstate(badbit)}
|
6778 | 6778 | (which may throw
|
6779 | 6779 | \tcode{ios_base::failure}\iref{iostate.flags}).
|
6780 |
| -Otherwise, if the sentry object returns \tcode{false}, does nothing. |
| 6780 | +Otherwise, if the \tcode{sentry} object returns \tcode{false}, does nothing. |
6781 | 6781 |
|
6782 | 6782 | \pnum
|
6783 | 6783 | \returns
|
|
12231 | 12231 | \pnum
|
12232 | 12232 | \effects
|
12233 | 12233 | Behaves as an unformatted output function\iref{ostream.unformatted}.
|
12234 |
| -After constructing a sentry object, calls \tcode{sb.emit()}. |
| 12234 | +After constructing a \tcode{sentry} object, calls \tcode{sb.emit()}. |
12235 | 12235 | If that call returns \tcode{false},
|
12236 | 12236 | calls \tcode{setstate(ios_base::badbit)}.
|
12237 | 12237 |
|
|
0 commit comments