48 return this->operator[](0);
55 return this->operator[](0);
62 return this->operator[](this->size()-1);
69 return this->operator[](this->size()-1);
92 return append(
const_cast<autoPtr<T>&
>(aptr).ptr());
102 return append(
const_cast<tmp<T>&
>(t).ptr());
109 return ptrs_[i] != NULL;
129 return set(i,
const_cast<autoPtr<T>&
>(aptr).ptr());
140 return set(i,
const_cast<tmp<T>&
>(t).ptr());
159 <<
"hanging pointer of type " <<
typeid(
T).
name()
161 <<
" (size " << size()
162 <<
"), cannot dereference" 176 <<
"hanging pointer of type " <<
typeid(
T).
name()
178 <<
" (size " << size()
179 <<
"), cannot dereference" 206 return ptr_ == iter.ptr_;
213 return ptr_ != iter.ptr_;
321 return (iter1.ptr_ - iter2.ptr_)/
sizeof(
T*);
335 return ptr_ < iter.ptr_;
342 return ptr_ > iter.ptr_;
349 return ptr_ <= iter.ptr_;
356 return ptr_ >= iter.ptr_;
363 return ptrs_.begin();
391 inline bool Foam::PtrList<T>::const_iterator::operator==
396 return ptr_ == iter.ptr_;
401 inline bool Foam::PtrList<T>::const_iterator::operator!=
406 return ptr_ != iter.ptr_;
514 return (iter1.ptr_ - iter2.ptr_)/
sizeof(
T*);
526 inline bool Foam::PtrList<T>::const_iterator::operator<
531 return ptr_ < iter.ptr_;
536 inline bool Foam::PtrList<T>::const_iterator::operator>
541 return ptr_ > iter.ptr_;
546 inline bool Foam::PtrList<T>::const_iterator::operator<=
551 return ptr_ <= iter.ptr_;
556 inline bool Foam::PtrList<T>::const_iterator::operator>=
561 return ptr_ >= iter.ptr_;
569 return ptrs_.begin();
585 return ptrs_.begin();
const_iterator operator-=(label)
bool empty() const
Return true if the PtrList is empty (ie, size() is zero).
label size() const
Return the number of elements in the PtrList.
bool set(const label) const
Is element set.
word name(const complex &)
Return a string representation of a complex.
bool operator<(const iterator &) const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
T & last()
Return reference to the last element of the list.
tmp< fvMatrix< Type > > operator+(const fvMatrix< Type > &, const fvMatrix< Type > &)
bool operator>=(const iterator &) const
Xfer< PtrList< T > > xfer()
Transfer contents to the Xfer container.
A simple container for copying or transferring objects of type <T>.
iterator operator+=(label)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const_iterator cbegin() const
Return an const_iterator to begin traversing the PtrList.
const T * operator()(const label) const
Return element const pointer.
An STL-conforming iterator.
bool operator!=(const iterator &) const
bool operator>(const iterator &) const
iterator end()
Return an iterator to end traversing the PtrList.
void resize(const label)
Alias for setSize(const label)
bool operator==(const iterator &) const
const_iterator operator+=(label)
tmp< fvMatrix< Type > > operator-(const fvMatrix< Type > &)
const T & operator[](label)
const_iterator(const T *const *)
Construct for a given PtrList entry.
An STL-conforming const_iterator.
errorManip< error > abort(error &err)
const_iterator operator--()
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
iterator(T **)
Construct for a given PtrList entry.
points setSize(newPointi)
const_iterator operator++()
const_iterator cend() const
Return an const_iterator to end traversing the PtrList.
T & first()
Return reference to the first element of the list.
iterator begin()
Return an iterator to begin traversing the PtrList.
void append(T *)
Append an element at the end of the list.
bool operator<=(const iterator &) const
iterator operator-=(label)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class for managing temporary objects.
const T & operator[](const label) const
Return element const reference.