|
Rosetta 3.5
|
Class Array0 is a c-style array wrapper that does bounds checking in debug mode. It indexes from 0 just like regular c-arrays. Class Array0 does not manage it's own memory. It does not allocate memory if you want to make it larger, nor does it deallocate memory when you destroy it. Bounds checking only ensures that the user does not go outside of the memory Array0 thinks it's in charge of. If the user should happen to point the array0 at memory that has not been allocated, Array0 is not responsible for segmentation fault that will likely occur. Garbage in, garbage out. More...
#include <ArrayPool.fwd.hh>

Public Member Functions | |
| Array0 () | |
| Default ctor points at null. More... | |
| Array0 (T *mem_begin, platform::Size size) | |
| Array and size constructor – point this Array0 at a block of memory. More... | |
| Array0 (Array0< T > const &other) | |
| Copy constructor – point this Array0 at a block of memory. More... | |
| Array0< T > const & | operator= (Array0< T > const &rhs) |
| Assignment operator – point this Array0 at a different block of memory. More... | |
| ~Array0 () | |
| The destructor does not deallocate the memory that this Array0 points at. That is the responsibility of some other class. Array0 is for bounds checking only. More... | |
| T & | operator[] (platform::Size index) |
| Accessors and mutators. More... | |
| T const & | operator[] (platform::Size index) const |
| T & | operator[] (int index) |
| T const & | operator[] (int index) const |
| platform::Size | size () const |
Private Member Functions | |
| bool | bounds_check (platform::Size index) const |
| bool | bounds_check (int index) const |
Private Attributes | |
| T * | array_ |
| platform::Size | size_ |
Class Array0 is a c-style array wrapper that does bounds checking in debug mode. It indexes from 0 just like regular c-arrays. Class Array0 does not manage it's own memory. It does not allocate memory if you want to make it larger, nor does it deallocate memory when you destroy it. Bounds checking only ensures that the user does not go outside of the memory Array0 thinks it's in charge of. If the user should happen to point the array0 at memory that has not been allocated, Array0 is not responsible for segmentation fault that will likely occur. Garbage in, garbage out.
Definition at line 24 of file ArrayPool.fwd.hh.
|
inline |
Default ctor points at null.
Definition at line 43 of file ArrayPool.hh.
|
inline |
Array and size constructor – point this Array0 at a block of memory.
Definition at line 49 of file ArrayPool.hh.
|
inline |
Copy constructor – point this Array0 at a block of memory.
Definition at line 55 of file ArrayPool.hh.
|
inline |
The destructor does not deallocate the memory that this Array0 points at. That is the responsibility of some other class. Array0 is for bounds checking only.
Definition at line 72 of file ArrayPool.hh.
|
inlineprivate |
Definition at line 102 of file ArrayPool.hh.
Referenced by core::graph::Array0< Real >::operator[]().
|
inlineprivate |
Definition at line 107 of file ArrayPool.hh.
|
inline |
Assignment operator – point this Array0 at a different block of memory.
Definition at line 62 of file ArrayPool.hh.
|
inline |
Accessors and mutators.
Definition at line 77 of file ArrayPool.hh.
|
inline |
Definition at line 82 of file ArrayPool.hh.
|
inline |
Definition at line 87 of file ArrayPool.hh.
|
inline |
Definition at line 92 of file ArrayPool.hh.
|
inline |
Definition at line 97 of file ArrayPool.hh.
|
private |
Definition at line 112 of file ArrayPool.hh.
Referenced by core::graph::Array0< Real >::operator=(), and core::graph::Array0< Real >::operator[]().
|
private |
Definition at line 113 of file ArrayPool.hh.
Referenced by core::graph::Array0< Real >::bounds_check(), core::graph::Array0< Real >::operator=(), and core::graph::Array0< Real >::size().
1.8.4