Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
StridedPtr< T > Class Template Reference

#include <StridedPtr.h>

Public Types

using value_type = T
 

Public Member Functions

 StridedPtr ()=default
 Constructors.
 
 StridedPtr (const StridedPtr &inRHS)=default
 
 StridedPtr (T *inPtr, int inStride=sizeof(T))
 
StridedPtroperator= (const StridedPtr &inRHS)=default
 Assignment.
 
StridedPtroperator++ ()
 Incrementing / decrementing.
 
StridedPtroperator-- ()
 
StridedPtr operator++ (int)
 
StridedPtr operator-- (int)
 
StridedPtr operator+ (int inOffset) const
 
StridedPtr operator- (int inOffset) const
 
void operator+= (int inOffset)
 
void operator-= (int inOffset)
 
int operator- (const StridedPtr &inRHS) const
 Distance between two pointers in elements.
 
bool operator== (const StridedPtr &inRHS) const
 Comparison operators.
 
bool operator!= (const StridedPtr &inRHS) const
 
bool operator<= (const StridedPtr &inRHS) const
 
bool operator>= (const StridedPtr &inRHS) const
 
bool operator< (const StridedPtr &inRHS) const
 
bool operator> (const StridedPtr &inRHS) const
 
T & operator* () const
 Access value.
 
T * operator-> () const
 
T & operator[] (int inOffset) const
 
T * GetPtr () const
 Explicit conversion.
 
int GetStride () const
 Get stride in bytes.
 

Detailed Description

template<class T>
class StridedPtr< T >

A strided pointer behaves exactly like a normal pointer except that the elements that the pointer points to can be part of a larger structure. The stride gives the number of bytes from one element to the next.

Member Typedef Documentation

◆ value_type

template<class T >
using StridedPtr< T >::value_type = T

Constructor & Destructor Documentation

◆ StridedPtr() [1/3]

template<class T >
StridedPtr< T >::StridedPtr ( )
default

Constructors.

◆ StridedPtr() [2/3]

template<class T >
StridedPtr< T >::StridedPtr ( const StridedPtr< T > &  inRHS)
default

◆ StridedPtr() [3/3]

template<class T >
StridedPtr< T >::StridedPtr ( T *  inPtr,
int  inStride = sizeof(T) 
)
inline

Member Function Documentation

◆ GetPtr()

template<class T >
T * StridedPtr< T >::GetPtr ( ) const
inline

Explicit conversion.

◆ GetStride()

template<class T >
int StridedPtr< T >::GetStride ( ) const
inline

Get stride in bytes.

◆ operator!=()

template<class T >
bool StridedPtr< T >::operator!= ( const StridedPtr< T > &  inRHS) const
inline

◆ operator*()

template<class T >
T & StridedPtr< T >::operator* ( ) const
inline

Access value.

◆ operator+()

template<class T >
StridedPtr StridedPtr< T >::operator+ ( int  inOffset) const
inline

◆ operator++() [1/2]

template<class T >
StridedPtr & StridedPtr< T >::operator++ ( )
inline

Incrementing / decrementing.

◆ operator++() [2/2]

template<class T >
StridedPtr StridedPtr< T >::operator++ ( int  )
inline

◆ operator+=()

template<class T >
void StridedPtr< T >::operator+= ( int  inOffset)
inline

◆ operator-() [1/2]

template<class T >
int StridedPtr< T >::operator- ( const StridedPtr< T > &  inRHS) const
inline

Distance between two pointers in elements.

◆ operator-() [2/2]

template<class T >
StridedPtr StridedPtr< T >::operator- ( int  inOffset) const
inline

◆ operator--() [1/2]

template<class T >
StridedPtr & StridedPtr< T >::operator-- ( )
inline

◆ operator--() [2/2]

template<class T >
StridedPtr StridedPtr< T >::operator-- ( int  )
inline

◆ operator-=()

template<class T >
void StridedPtr< T >::operator-= ( int  inOffset)
inline

◆ operator->()

template<class T >
T * StridedPtr< T >::operator-> ( ) const
inline

◆ operator<()

template<class T >
bool StridedPtr< T >::operator< ( const StridedPtr< T > &  inRHS) const
inline

◆ operator<=()

template<class T >
bool StridedPtr< T >::operator<= ( const StridedPtr< T > &  inRHS) const
inline

◆ operator=()

template<class T >
StridedPtr & StridedPtr< T >::operator= ( const StridedPtr< T > &  inRHS)
inlinedefault

Assignment.

◆ operator==()

template<class T >
bool StridedPtr< T >::operator== ( const StridedPtr< T > &  inRHS) const
inline

Comparison operators.

◆ operator>()

template<class T >
bool StridedPtr< T >::operator> ( const StridedPtr< T > &  inRHS) const
inline

◆ operator>=()

template<class T >
bool StridedPtr< T >::operator>= ( const StridedPtr< T > &  inRHS) const
inline

◆ operator[]()

template<class T >
T & StridedPtr< T >::operator[] ( int  inOffset) const
inline

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