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>
377 bsl::ostream&
print(bsl::ostream& stream,
379 int spacesPerLevel = 4)
const;
407template <
class HASH_ALGORITHM>
428: d_position(position)
438 return 0 == d_length;
459 return lhs.position() == rhs.position()
460 && lhs.length() == rhs.length();
466 return !(lhs == rhs);
471 const IndexSpan&
object)
473 return object.print(stream, 0, -1);
476template <
class HASH_ALGORITHM>
478void bdlb::hashAppend(HASH_ALGORITHM& hashAlgorithm,
const IndexSpan&
object)
480 const IndexSpan::size_type pos =
object.position();
481 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:420
size_type position() const
Return the position attribute.
Definition bdlb_indexspan.h:448
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:442
bool isEmpty() const
Definition bdlb_indexspan.h:436
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
void hashAppend(HASH_ALGORITHM &hashAlg, const baljsn::EncoderTestAddress &object)
Definition baljsn_encoder_testtypes.h:9236
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)
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:638
Definition bdlb_printmethods.h:306
Definition bslmf_istriviallycopyable.h:329