Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
agg::pod_array< T > Class Template Reference

#include <src/agg/agg_array.h>

+ Inheritance diagram for agg::pod_array< T >:

Public Types

typedef T value_type
 
typedef pod_array< T > self_type
 

Public Member Functions

 ~pod_array ()
 
 pod_array ()
 
 pod_array (unsigned size)
 
 pod_array (const self_type &v)
 
void resize (unsigned size)
 
const self_typeoperator= (const self_type &v)
 
unsigned size () const
 
const T & operator[] (unsigned i) const
 
T & operator[] (unsigned i)
 
const T & at (unsigned i) const
 
T & at (unsigned i)
 
value_at (unsigned i) const
 
const T * data () const
 
T * data ()
 

Private Attributes

T * m_array
 
unsigned m_size
 

Detailed Description

template<class T>
class agg::pod_array< T >

Member Typedef Documentation

◆ self_type

template<class T >
typedef pod_array<T> agg::pod_array< T >::self_type

◆ value_type

template<class T >
typedef T agg::pod_array< T >::value_type

Constructor & Destructor Documentation

◆ ~pod_array()

template<class T >
agg::pod_array< T >::~pod_array ( )
inline
T * m_array
Definition agg_array.h:152
unsigned m_size
Definition agg_array.h:153
static void deallocate(T *ptr, unsigned)
Definition agg_basics.h:39

References agg::pod_allocator< T >::deallocate(), agg::pod_array< T >::m_array, and agg::pod_array< T >::m_size.

+ Here is the call graph for this function:

◆ pod_array() [1/3]

template<class T >
agg::pod_array< T >::pod_array ( )
inline
113: m_array(0), m_size(0) {}

◆ pod_array() [2/3]

template<class T >
agg::pod_array< T >::pod_array ( unsigned  size)
inline
115 :
117 m_size(size)
118 {}
unsigned size() const
Definition agg_array.h:142
static T * allocate(unsigned num)
Definition agg_basics.h:38

◆ pod_array() [3/3]

template<class T >
agg::pod_array< T >::pod_array ( const self_type v)
inline
120 :
122 m_size(v.m_size)
123 {
124 memcpy(m_array, v.m_array, sizeof(T) * m_size);
125 }

References agg::pod_array< T >::m_array, and agg::pod_array< T >::m_size.

Member Function Documentation

◆ at() [1/2]

template<class T >
T & agg::pod_array< T >::at ( unsigned  i)
inline
146{ return m_array[i]; }

References agg::pod_array< T >::m_array.

◆ at() [2/2]

template<class T >
const T & agg::pod_array< T >::at ( unsigned  i) const
inline
145{ return m_array[i]; }

References agg::pod_array< T >::m_array.

◆ data() [1/2]

template<class T >
T * agg::pod_array< T >::data ( )
inline
150{ return m_array; }

References agg::pod_array< T >::m_array.

◆ data() [2/2]

template<class T >
const T * agg::pod_array< T >::data ( ) const
inline
149{ return m_array; }

References agg::pod_array< T >::m_array.

◆ operator=()

template<class T >
const self_type & agg::pod_array< T >::operator= ( const self_type v)
inline
136 {
137 resize(v.size());
138 memcpy(m_array, v.m_array, sizeof(T) * m_size);
139 return *this;
140 }
void resize(unsigned size)
Definition agg_array.h:127

References agg::pod_array< T >::m_array, agg::pod_array< T >::m_size, agg::pod_array< T >::resize(), and agg::pod_array< T >::size().

+ Here is the call graph for this function:

◆ operator[]() [1/2]

template<class T >
T & agg::pod_array< T >::operator[] ( unsigned  i)
inline
144{ return m_array[i]; }

References agg::pod_array< T >::m_array.

◆ operator[]() [2/2]

template<class T >
const T & agg::pod_array< T >::operator[] ( unsigned  i) const
inline
143{ return m_array[i]; }

References agg::pod_array< T >::m_array.

◆ resize()

template<class T >
void agg::pod_array< T >::resize ( unsigned  size)
inline

References agg::pod_allocator< T >::allocate(), agg::pod_allocator< T >::deallocate(), agg::pod_array< T >::m_array, agg::pod_array< T >::m_size, and agg::pod_array< T >::size().

Referenced by agg::row_ptr_cache< T >::attach(), agg::pod_array< T >::operator=(), agg::scanline_p8::reset(), and agg::scanline32_p8::reset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

template<class T >
unsigned agg::pod_array< T >::size ( ) const
inline
142{ return m_size; }

References agg::pod_array< T >::m_size.

Referenced by agg::row_ptr_cache< T >::attach(), agg::pod_array< T >::operator=(), agg::scanline32_p8::reset(), and agg::pod_array< T >::resize().

+ Here is the caller graph for this function:

◆ value_at()

template<class T >
T agg::pod_array< T >::value_at ( unsigned  i) const
inline
147{ return m_array[i]; }

References agg::pod_array< T >::m_array.

Member Data Documentation

◆ m_array

◆ m_size


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