Home Libraries Author Links

stm::byte_iterator_range Class Reference
[DivAids: Diverse Aids]

Inheritance diagram for stm::byte_iterator_range:

Inheritance graph
[legend]

List of all members.


Detailed Description

Byte iterator range class.

Definition at line 342 of file divaids.hpp.


Public Member Functions

 byte_iterator_range ()
 Default constructor yielding the singular byte_iterator_range object.
 byte_iterator_range (const byte *first, const byte *last)
 Constructs a byte_iterator_range object representing the range [first, last).
template<class ForwardRange>
 byte_iterator_range (ForwardRange &that)
 Constructs a byte_iterator_range object from that.
template<class ForwardRange>
 byte_iterator_range (const ForwardRange &that)
 Constructs a byte_iterator_range object from that.
template<typename T>
const T & safe_get (const byte *ptr) const throw (std::logic_error, std::range_error)
 Returns a constant reference to the T object beginning at byte address ptr.

Constructor & Destructor Documentation

stm::byte_iterator_range::byte_iterator_range (  ) 

Default constructor yielding the singular byte_iterator_range object.

stm::byte_iterator_range::byte_iterator_range ( const byte *  first,
const byte *  last 
)

Constructs a byte_iterator_range object representing the range [first, last).

template<class ForwardRange>
stm::byte_iterator_range::byte_iterator_range ( ForwardRange &  that  ) 

Constructs a byte_iterator_range object from that.

template<class ForwardRange>
stm::byte_iterator_range::byte_iterator_range ( const ForwardRange &  that  ) 

Constructs a byte_iterator_range object from that.


Member Function Documentation

template<typename T>
const T& stm::byte_iterator_range::safe_get ( const byte *  ptr  )  const throw (std::logic_error, std::range_error)

Returns a constant reference to the T object beginning at byte address ptr.

Throws std::logic_error, if ptr does not belong to the byte range [begin(), end()) and std::range_error, if the T object beginning at ptr does not fit into the range [ptr, end()).


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).