
Public Types | |
| typedef void(* | Deallocator )(void *, void *) |
Public Member Functions | |
| void | alloc (std::size_t nbOfElements) |
| void | destroy () |
| void | fillWithValue (const T &val) |
| T * | fromNoInterlace (int nbOfComp) const |
| const T * | getConstPointer () const |
| const T * | getConstPointerLoc (std::size_t offset) const |
| Deallocator | getDeallocator () const |
| std::size_t | getNbOfElem () const |
| std::size_t | getNbOfElemAllocated () const |
| void * | getParameterForDeallocator () const |
| T * | getPointer () |
| template<class InputIterator > | |
| void | insertAtTheEnd (InputIterator first, InputIterator last) |
| bool | isDeallocatorCalled () const |
| bool | isEqual (const MemArray< T > &other, T prec, std::string &reason) const |
| bool | isNull () const |
| MemArray () | |
| MemArray (const MemArray< T > &other) | |
| MemArray< T > & | operator= (const MemArray< T > &other) |
| T | operator[] (std::size_t id) const |
| T & | operator[] (std::size_t id) |
| void | pack () const |
| T | popBack () |
| void | pushBack (T elem) |
| void | reAlloc (std::size_t newNbOfElements) |
| void | repr (int sl, std::ostream &stream) const |
| bool | reprHeader (int sl, std::ostream &stream) const |
| void | reprNotTooLong (int sl, std::ostream &stream) const |
| void | reprZip (int sl, std::ostream &stream) const |
| void | reserve (std::size_t newNbOfElements) |
| void | reverse (int nbOfComp) |
| void | setParameterForDeallocator (void *param) |
| void | setSpecificDeallocator (Deallocator dealloc) |
| void | sort (bool asc) |
| T * | toNoInterlace (int nbOfComp) const |
| void | useArray (const T *array, bool ownership, DeallocType type, std::size_t nbOfElem) |
| void | useExternalArrayWithRWAccess (const T *array, std::size_t nbOfElem) |
| void | writeOnPlace (std::size_t id, T element0, const T *others, std::size_t sizeOfOthers) |
| ~MemArray () | |
Static Public Member Functions | |
| static void | CDeallocator (void *pt, void *param) |
| static void | CPPDeallocator (void *pt, void *param) |
| typedef void(* MEDCoupling::MemArray< T >::Deallocator)(void *, void *) |
| MEDCoupling::MemArray< T >::MemArray | ( | ) |
| MEDCoupling::MemArray< T >::MemArray | ( | const MemArray< T > & | other | ) |
References MEDCoupling::C_DEALLOC, and MEDCoupling::MemArray< T >::useArray().
| MEDCoupling::MemArray< T >::~MemArray | ( | ) |
| bool MEDCoupling::MemArray< T >::isNull | ( | ) | const |
| const T* MEDCoupling::MemArray< T >::getConstPointerLoc | ( | std::size_t | offset | ) | const |
| const T* MEDCoupling::MemArray< T >::getConstPointer | ( | ) | const |
| std::size_t MEDCoupling::MemArray< T >::getNbOfElem | ( | ) | const |
| std::size_t MEDCoupling::MemArray< T >::getNbOfElemAllocated | ( | ) | const |
| T* MEDCoupling::MemArray< T >::getPointer | ( | ) |
| MemArray< T > & MEDCoupling::MemArray< T >::operator= | ( | const MemArray< T > & | other | ) |
| T MEDCoupling::MemArray< T >::operator[] | ( | std::size_t | id | ) | const |
| T& MEDCoupling::MemArray< T >::operator[] | ( | std::size_t | id | ) |
| bool MEDCoupling::MemArray< T >::isEqual | ( | const MemArray< T > & | other, |
| T | prec, | ||
| std::string & | reason | ||
| ) | const |
| void MEDCoupling::MemArray< T >::repr | ( | int | sl, |
| std::ostream & | stream | ||
| ) | const |
| [in] | sl | is typically the number of components |
Referenced by MEDCoupling::DataArrayDouble::reprWithoutNameStream(), and MEDCoupling::DataArrayInt::reprWithoutNameStream().
| bool MEDCoupling::MemArray< T >::reprHeader | ( | int | sl, |
| std::ostream & | stream | ||
| ) | const |
| [in] | sl | is typically the number of components |
| void MEDCoupling::MemArray< T >::reprZip | ( | int | sl, |
| std::ostream & | stream | ||
| ) | const |
| [in] | sl | is typically the number of components |
Referenced by MEDCoupling::DataArrayDouble::reprZipWithoutNameStream(), and MEDCoupling::DataArrayInt::reprZipWithoutNameStream().
| void MEDCoupling::MemArray< T >::reprNotTooLong | ( | int | sl, |
| std::ostream & | stream | ||
| ) | const |
| [in] | sl | is typically the number of components |
Referenced by MEDCoupling::DataArrayDouble::reprNotTooLongWithoutNameStream(), and MEDCoupling::DataArrayInt::reprNotTooLongWithoutNameStream().
| void MEDCoupling::MemArray< T >::fillWithValue | ( | const T & | val | ) |
| T * MEDCoupling::MemArray< T >::fromNoInterlace | ( | int | nbOfComp | ) | const |
| T * MEDCoupling::MemArray< T >::toNoInterlace | ( | int | nbOfComp | ) | const |
| void MEDCoupling::MemArray< T >::sort | ( | bool | asc | ) |
| void MEDCoupling::MemArray< T >::reverse | ( | int | nbOfComp | ) |
| void MEDCoupling::MemArray< T >::alloc | ( | std::size_t | nbOfElements | ) |
| void MEDCoupling::MemArray< T >::reserve | ( | std::size_t | newNbOfElements | ) |
This method performs systematically an allocation of newNbOfElements elements in this. _nb_of_elem and _nb_of_elem_alloc will NOT be systematically equal (contrary to MemArray<T>::reAlloc method. So after the call of this method _nb_of_elem will be equal tostd::min<std::size_t>(_nb_of_elem,newNbOfElements) and _nb_of_elem_alloc equal to newNbOfElements. This method is typically used to perform a pushBack to avoid systematic allocations-copy-deallocation. So after the call of this method the accessible content is perfectly set.
So this method should not be confused with MemArray<T>::reserve that is close to MemArray<T>::reAlloc but not same.
| void MEDCoupling::MemArray< T >::reAlloc | ( | std::size_t | newNbOfElements | ) |
This method performs systematically an allocation of newNbOfElements elements in this. _nb_of_elem and _nb_of_elem_alloc will be equal even if only std::min<std::size_t>(_nb_of_elem,newNbOfElements) come from the . The remaing part of the new allocated chunk are available but not set previouly !
So this method should not be confused with MemArray<T>::reserve that is close to MemArray<T>::reAlloc but not same.
| void MEDCoupling::MemArray< T >::useArray | ( | const T * | array, |
| bool | ownership, | ||
| DeallocType | type, | ||
| std::size_t | nbOfElem | ||
| ) |
Referenced by MEDCoupling::MemArray< T >::MemArray().
| void MEDCoupling::MemArray< T >::useExternalArrayWithRWAccess | ( | const T * | array, |
| std::size_t | nbOfElem | ||
| ) |
| void MEDCoupling::MemArray< T >::writeOnPlace | ( | std::size_t | id, |
| T | element0, | ||
| const T * | others, | ||
| std::size_t | sizeOfOthers | ||
| ) |
| void MEDCoupling::MemArray< T >::insertAtTheEnd | ( | InputIterator | first, |
| InputIterator | last | ||
| ) |
| void MEDCoupling::MemArray< T >::pushBack | ( | T | elem | ) |
| T MEDCoupling::MemArray< T >::popBack | ( | ) |
| void MEDCoupling::MemArray< T >::pack | ( | ) | const |
| bool MEDCoupling::MemArray< T >::isDeallocatorCalled | ( | ) | const |
| Deallocator MEDCoupling::MemArray< T >::getDeallocator | ( | ) | const |
| void MEDCoupling::MemArray< T >::setSpecificDeallocator | ( | Deallocator | dealloc | ) |
| void MEDCoupling::MemArray< T >::setParameterForDeallocator | ( | void * | param | ) |
| void* MEDCoupling::MemArray< T >::getParameterForDeallocator | ( | ) | const |
| void MEDCoupling::MemArray< T >::destroy | ( | ) |
Referenced by MEDCoupling::MemArray< char >::~MemArray().
|
static |
|
static |