#include <bdlb_indexspan.h>
List of all members.
Detailed Description
A constrained attribute type that represents a position and a length. The constraint is that the sum of the position and length attributes must be representable by the bsl::size_t
type.
See Component bdlb_indexspan
Member Typedef Documentation
Constructor & Destructor Documentation
bdlb::IndexSpan::IndexSpan |
( |
|
) |
|
Create an IndexSpan
object with position and length of 0.
Create an IndexSpan
object with the specified position
and length
. The behavior is undefined unless position <= bsl::numeric_limits<size_t>max() - length
.
Member Function Documentation
bool bdlb::IndexSpan::isEmpty |
( |
|
) |
const |
Return true
if the length attribute is 0; and return false
otherwise.
Return the length attribute.
size_type bdlb::IndexSpan::position |
( |
|
) |
const |
Return the position attribute.
bsl::ostream& bdlb::IndexSpan::print |
( |
bsl::ostream & |
stream, |
|
|
int |
level = 0 , |
|
|
int |
spacesPerLevel = 4 | |
|
) |
| | const |
Format this object to the specified output stream
at the (absolute value of) the optionally specified indentation level
and return a reference to stream
. If level
is specified, optionally specify spacesPerLevel
, the number of spaces per indentation level for this and all of its nested objects. If level
is negative, suppress indentation of the first line. If spacesPerLevel
is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level
). If stream
is not valid on entry, this operation has no effect.
The documentation for this class was generated from the following file: