ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::SpanBase< ValueType, Derived > Class Template Reference

#include <span.h>

Inheritance diagram for Common::SpanBase< ValueType, Derived >:
Collaboration diagram for Common::SpanBase< ValueType, Derived >:

List of all members.

Public Types

typedef ValueType value_type
typedef int32 difference_type
typedef uint32 index_type
typedef uint32 size_type
typedef
SpanInternal::SpanIterator
< derived_type, true > 
const_iterator
typedef
SpanInternal::SpanIterator
< derived_type, false > 
iterator
typedef value_typepointer
typedef const value_typeconst_pointer
typedef value_typereference
typedef const value_typeconst_reference

Public Member Functions

size_type byteSize () const
const_reference operator[] (const index_type index) const
reference operator[] (const index_type index)
int8 getInt8At (const index_type index) const
uint8 getUint8At (const index_type index) const
int16 getInt16BEAt (const index_type index) const
int16 getInt16LEAt (const index_type index) const
uint16 getUint16BEAt (const index_type index) const
uint16 getUint16LEAt (const index_type index) const
uint32 getUint24LEAt (const index_type index) const
uint32 getUint32At (const index_type index) const
int32 getInt32BEAt (const index_type index) const
int32 getInt32LEAt (const index_type index) const
uint32 getUint32BEAt (const index_type index) const
uint32 getUint32LEAt (const index_type index) const
String getStringAt (const index_type index, size_type numEntries=kSpanMaxSize) const
const_pointer getUnsafeDataAt (const index_type index, size_type numEntries=kSpanMaxSize) const
 Returns a raw pointer to memory after validating the given index and size.
pointer getUnsafeDataAt (const index_type index, size_type numEntries=kSpanMaxSize)
MemoryReadStream toStream (const index_type index=0, size_type numEntries=kSpanMaxSize) const
template<typename Other >
bool operator== (const Other &other) const
template<typename Other >
bool operator!= (const Other &other) const
template<typename Other >
difference_type operator- (const Other &other) const
template<typename Other >
bool operator< (const Other &other) const
template<typename Other >
bool operator<= (const Other &other) const
template<typename Other >
bool operator> (const Other &other) const
template<typename Other >
bool operator>= (const Other &other) const
void unsafeCopyDataTo (void *target) const
 Copies data from this span to a raw pointer.
template<typename Other >
void copyDataTo (Other &target) const
 Copies the data from this span to the given target span.

Protected Member Functions

 SpanBase ()
 SpanBase (const SpanBase &)
SpanBaseoperator= (const SpanBase &)
 ~SpanBase ()
const_derived_typeimpl () const
mutable_derived_typeimpl ()
void clear ()
size_type size () const
const_iterator cbegin () const
const_iterator cend () const
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
pointer data () const
bool operator_bool () const
bool checkInvalidBounds (const index_type index, const difference_type deltaInBytes) const
void validate (const index_type index, const difference_type deltaInBytes, const SpanValidationMode mode=kValidateRead) const

Private Types

typedef Derived< ValueType > derived_type
typedef AddConst< derived_type >
::type 
const_derived_type
typedef RemoveConst
< derived_type >::type 
mutable_derived_type

Friends

class SpanInternal::SpanIterator
class SpanBase
struct SafeBool

Detailed Description

template<typename ValueType, template< typename > class Derived>
class Common::SpanBase< ValueType, Derived >

Definition at line 255 of file span.h.


Member Typedef Documentation

template<typename ValueType, template< typename > class Derived>
typedef SpanInternal::SpanIterator<derived_type, true> Common::SpanBase< ValueType, Derived >::const_iterator

Definition at line 274 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef const value_type* Common::SpanBase< ValueType, Derived >::const_pointer

Definition at line 277 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef const value_type& Common::SpanBase< ValueType, Derived >::const_reference

Definition at line 279 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef Derived<ValueType> Common::SpanBase< ValueType, Derived >::derived_type [private]

Definition at line 256 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef int32 Common::SpanBase< ValueType, Derived >::difference_type

Definition at line 271 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef uint32 Common::SpanBase< ValueType, Derived >::index_type

Definition at line 272 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef SpanInternal::SpanIterator<derived_type, false> Common::SpanBase< ValueType, Derived >::iterator

Definition at line 275 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef value_type* Common::SpanBase< ValueType, Derived >::pointer

Definition at line 276 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef value_type& Common::SpanBase< ValueType, Derived >::reference

Definition at line 278 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef uint32 Common::SpanBase< ValueType, Derived >::size_type

Definition at line 273 of file span.h.

template<typename ValueType, template< typename > class Derived>
typedef ValueType Common::SpanBase< ValueType, Derived >::value_type

Definition at line 270 of file span.h.


Constructor & Destructor Documentation

template<typename ValueType, template< typename > class Derived>
Common::SpanBase< ValueType, Derived >::SpanBase (  )  [inline, protected]

Definition at line 288 of file span.h.

template<typename ValueType, template< typename > class Derived>
Common::SpanBase< ValueType, Derived >::SpanBase ( const SpanBase< ValueType, Derived > &   )  [inline, protected]

Definition at line 289 of file span.h.

template<typename ValueType, template< typename > class Derived>
Common::SpanBase< ValueType, Derived >::~SpanBase (  )  [inline, protected]

Definition at line 291 of file span.h.


Member Function Documentation

template<typename ValueType, template< typename > class Derived>
const_iterator Common::SpanBase< ValueType, Derived >::begin (  )  const [inline, protected]
template<typename ValueType, template< typename > class Derived>
iterator Common::SpanBase< ValueType, Derived >::begin (  )  [inline, protected]
template<typename ValueType, template< typename > class Derived>
size_type Common::SpanBase< ValueType, Derived >::byteSize (  )  const [inline]

Definition at line 281 of file span.h.

template<typename ValueType, template< typename > class Derived>
const_iterator Common::SpanBase< ValueType, Derived >::cbegin (  )  const [inline, protected]
template<typename ValueType, template< typename > class Derived>
const_iterator Common::SpanBase< ValueType, Derived >::cend (  )  const [inline, protected]
template<typename ValueType, template< typename > class Derived>
bool Common::SpanBase< ValueType, Derived >::checkInvalidBounds ( const index_type  index,
const difference_type  deltaInBytes 
) const [inline, protected]
Returns:
true if bounds are invalid.

Definition at line 523 of file span.h.

template<typename ValueType, template< typename > class Derived>
void Common::SpanBase< ValueType, Derived >::clear (  )  [inline, protected]
template<typename ValueType, template< typename > class Derived>
template<typename Other >
void Common::SpanBase< ValueType, Derived >::copyDataTo ( Other &  target  )  const [inline]

Copies the data from this span to the given target span.

To only copy a portion of the span, call subspan first.

Definition at line 506 of file span.h.

template<typename ValueType, template< typename > class Derived>
pointer Common::SpanBase< ValueType, Derived >::data (  )  const [inline, protected]
template<typename ValueType, template< typename > class Derived>
const_iterator Common::SpanBase< ValueType, Derived >::end (  )  const [inline, protected]
template<typename ValueType, template< typename > class Derived>
iterator Common::SpanBase< ValueType, Derived >::end (  )  [inline, protected]
template<typename ValueType, template< typename > class Derived>
int16 Common::SpanBase< ValueType, Derived >::getInt16BEAt ( const index_type  index  )  const [inline]

Definition at line 342 of file span.h.

template<typename ValueType, template< typename > class Derived>
int16 Common::SpanBase< ValueType, Derived >::getInt16LEAt ( const index_type  index  )  const [inline]

Definition at line 347 of file span.h.

template<typename ValueType, template< typename > class Derived>
int32 Common::SpanBase< ValueType, Derived >::getInt32BEAt ( const index_type  index  )  const [inline]

Definition at line 376 of file span.h.

template<typename ValueType, template< typename > class Derived>
int32 Common::SpanBase< ValueType, Derived >::getInt32LEAt ( const index_type  index  )  const [inline]

Definition at line 381 of file span.h.

template<typename ValueType, template< typename > class Derived>
int8 Common::SpanBase< ValueType, Derived >::getInt8At ( const index_type  index  )  const [inline]

Definition at line 331 of file span.h.

template<typename ValueType, template< typename > class Derived>
String Common::SpanBase< ValueType, Derived >::getStringAt ( const index_type  index,
size_type  numEntries = kSpanMaxSize 
) const [inline]

Definition at line 398 of file span.h.

template<typename ValueType, template< typename > class Derived>
uint16 Common::SpanBase< ValueType, Derived >::getUint16BEAt ( const index_type  index  )  const [inline]

Definition at line 352 of file span.h.

template<typename ValueType, template< typename > class Derived>
uint16 Common::SpanBase< ValueType, Derived >::getUint16LEAt ( const index_type  index  )  const [inline]

Definition at line 358 of file span.h.

template<typename ValueType, template< typename > class Derived>
uint32 Common::SpanBase< ValueType, Derived >::getUint24LEAt ( const index_type  index  )  const [inline]

Definition at line 364 of file span.h.

template<typename ValueType, template< typename > class Derived>
uint32 Common::SpanBase< ValueType, Derived >::getUint32At ( const index_type  index  )  const [inline]

Definition at line 370 of file span.h.

template<typename ValueType, template< typename > class Derived>
uint32 Common::SpanBase< ValueType, Derived >::getUint32BEAt ( const index_type  index  )  const [inline]

Definition at line 386 of file span.h.

template<typename ValueType, template< typename > class Derived>
uint32 Common::SpanBase< ValueType, Derived >::getUint32LEAt ( const index_type  index  )  const [inline]

Definition at line 392 of file span.h.

template<typename ValueType, template< typename > class Derived>
uint8 Common::SpanBase< ValueType, Derived >::getUint8At ( const index_type  index  )  const [inline]

Definition at line 336 of file span.h.

template<typename ValueType, template< typename > class Derived>
const_pointer Common::SpanBase< ValueType, Derived >::getUnsafeDataAt ( const index_type  index,
size_type  numEntries = kSpanMaxSize 
) const [inline]

Returns a raw pointer to memory after validating the given index and size.

Use this only in performance-critical code, like processing pixel data in a loop, where validating each read independently would introduce unnecessary overhead.

Definition at line 416 of file span.h.

template<typename ValueType, template< typename > class Derived>
pointer Common::SpanBase< ValueType, Derived >::getUnsafeDataAt ( const index_type  index,
size_type  numEntries = kSpanMaxSize 
) [inline]

Definition at line 425 of file span.h.

template<typename ValueType, template< typename > class Derived>
mutable_derived_type& Common::SpanBase< ValueType, Derived >::impl (  )  [inline, protected]

Definition at line 294 of file span.h.

template<typename ValueType, template< typename > class Derived>
const_derived_type& Common::SpanBase< ValueType, Derived >::impl (  )  const [inline, protected]

Definition at line 293 of file span.h.

template<typename ValueType, template< typename > class Derived>
template<typename Other >
bool Common::SpanBase< ValueType, Derived >::operator!= ( const Other &  other  )  const [inline]

Definition at line 453 of file span.h.

template<typename ValueType, template< typename > class Derived>
template<typename Other >
difference_type Common::SpanBase< ValueType, Derived >::operator- ( const Other &  other  )  const [inline]

Definition at line 458 of file span.h.

template<typename ValueType, template< typename > class Derived>
template<typename Other >
bool Common::SpanBase< ValueType, Derived >::operator< ( const Other &  other  )  const [inline]

Definition at line 463 of file span.h.

template<typename ValueType, template< typename > class Derived>
template<typename Other >
bool Common::SpanBase< ValueType, Derived >::operator<= ( const Other &  other  )  const [inline]

Definition at line 468 of file span.h.

template<typename ValueType, template< typename > class Derived>
SpanBase& Common::SpanBase< ValueType, Derived >::operator= ( const SpanBase< ValueType, Derived > &   )  [inline, protected]

Definition at line 290 of file span.h.

template<typename ValueType, template< typename > class Derived>
template<typename Other >
bool Common::SpanBase< ValueType, Derived >::operator== ( const Other &  other  )  const [inline]

Definition at line 448 of file span.h.

template<typename ValueType, template< typename > class Derived>
template<typename Other >
bool Common::SpanBase< ValueType, Derived >::operator> ( const Other &  other  )  const [inline]

Definition at line 473 of file span.h.

template<typename ValueType, template< typename > class Derived>
template<typename Other >
bool Common::SpanBase< ValueType, Derived >::operator>= ( const Other &  other  )  const [inline]

Definition at line 478 of file span.h.

template<typename ValueType, template< typename > class Derived>
reference Common::SpanBase< ValueType, Derived >::operator[] ( const index_type  index  )  [inline]

Definition at line 326 of file span.h.

template<typename ValueType, template< typename > class Derived>
const_reference Common::SpanBase< ValueType, Derived >::operator[] ( const index_type  index  )  const [inline]

Definition at line 321 of file span.h.

template<typename ValueType, template< typename > class Derived>
bool Common::SpanBase< ValueType, Derived >::operator_bool (  )  const [inline, protected]

Definition at line 487 of file span.h.

template<typename ValueType, template< typename > class Derived>
size_type Common::SpanBase< ValueType, Derived >::size (  )  const [inline, protected]
template<typename ValueType, template< typename > class Derived>
MemoryReadStream Common::SpanBase< ValueType, Derived >::toStream ( const index_type  index = 0,
size_type  numEntries = kSpanMaxSize 
) const [inline]

Definition at line 434 of file span.h.

template<typename ValueType, template< typename > class Derived>
void Common::SpanBase< ValueType, Derived >::unsafeCopyDataTo ( void *  target  )  const [inline]

Copies data from this span to a raw pointer.

To only copy a portion of the span, call subspan first.

Definition at line 497 of file span.h.

template<typename ValueType, template< typename > class Derived>
void Common::SpanBase< ValueType, Derived >::validate ( const index_type  index,
const difference_type  deltaInBytes,
const SpanValidationMode  mode = kValidateRead 
) const [inline, protected]

Definition at line 532 of file span.h.


Friends And Related Function Documentation

template<typename ValueType, template< typename > class Derived>
friend struct SafeBool [friend]

Definition at line 263 of file span.h.

template<typename ValueType, template< typename > class Derived>
friend class SpanBase [friend]

Definition at line 262 of file span.h.

template<typename ValueType, template< typename > class Derived>
friend class SpanInternal::SpanIterator [friend]

Definition at line 261 of file span.h.


The documentation for this class was generated from the following file:


Generated on Sat Sep 26 2020 05:03:12 for ResidualVM by doxygen 1.7.1
curved edge   curved edge