BloombergLP::bdlb::IndexSpan

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.

Synopsis

Declared in <bdlb_indexspan.h>

class IndexSpan;

Type Aliases

NameDescription
size_type The type of the position and length attributes.

Member Functions

NameDescription
IndexSpan [constructor]Constructors
isEmpty Return true if the length attribute is 0; and return false otherwise.
length Return the length attribute.
position Return the position attribute.
print 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.
operator BloombergLP::bslmf::NestedTraitDeclaration<IndexSpan, HasPrintMethod> Declare that this type is trivially copyable.

Non-Member Functions

NameDescription
operator!=Return true if the specified lhs and rhs index span objects do not have the same value, and false otherwise. Two index span objects do not have the same value if either their position or length attributes do not compare equal.
operator==Return true if the specified lhs and rhs index span objects have the same value, and false otherwise. Two index span objects have the same value if their position and length attributes compare equal.