8#ifndef INCLUDED_BDLB_INDEXSPAN
9#define INCLUDED_BDLB_INDEXSPAN
282#include <bdlscm_version.h>
293#include <bsl_cstddef.h>
294#include <bsl_iosfwd.h>
295#include <bsl_limits.h>
381 bsl::ostream&
print(bsl::ostream& stream,
383 int spacesPerLevel = 4)
const;
412template <
class HASH_ALGORITHM>
433: d_position(position)
443 return 0 == d_length;
464 return lhs.position() == rhs.position()
465 && lhs.length() == rhs.length();
476 const IndexSpan&
object)
478 return object.print(stream, 0, -1);
481template <
class HASH_ALGORITHM>
483void bdlb::hashAppend(HASH_ALGORITHM& hashAlgorithm,
const IndexSpan&
object)
485 const IndexSpan::size_type pos =
object.position();
486 const IndexSpan::size_type len =
object.length();
Definition bdlb_indexspan.h:309
IndexSpan & operator=(const IndexSpan &rhs)=default
BSLMF_NESTED_TRAIT_DECLARATION(IndexSpan, bdlb::HasPrintMethod)
IndexSpan(const IndexSpan &original)=default
IndexSpan()
Create an IndexSpan object with position and length of 0.
Definition bdlb_indexspan.h:425
size_type position() const
Return the position attribute.
Definition bdlb_indexspan.h:453
BSLMF_NESTED_TRAIT_DECLARATION(IndexSpan, bsl::is_trivially_copyable)
bsl::size_t size_type
The type of the position and length attributes.
Definition bdlb_indexspan.h:315
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
size_type length() const
Return the length attribute.
Definition bdlb_indexspan.h:447
bool isEmpty() const
Definition bdlb_indexspan.h:441
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlb_algorithmworkaroundutil.h:74
bool operator!=(const BigEndianInt16 &lhs, const BigEndianInt16 &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const BigEndianInt16 &integer)
void hashAppend(HASH_ALGORITHM &hashAlgorithm, const BigEndianInt16 &object)
bool operator==(const BigEndianInt16 &lhs, const BigEndianInt16 &rhs)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
bsl::enable_if<(bsl::is_integral< TYPE >::value||bsl::is_pointer< TYPE >::value||bsl::is_enum< TYPE >::value)&&!bsl::is_same< TYPE, bool >::value >::type hashAppend(HASH_ALGORITHM &hashAlg, TYPE input)
Definition bslh_hash.h:643
Definition bdlb_printmethods.h:306
Definition bslmf_istriviallycopyable.h:324