5 #include <libutl/Array.h> 22 template <
class T = Object>
57 return Array::add(
object);
78 if (this->_items == 0)
return nullptr;
79 auto res = utl::cast<T>(this->last());
89 if (this->_items == 0)
return nullptr;
90 auto res = utl::cast<T>(this->last());
91 FlagGuard fgo(
this, Collection::flg_owner,
false);
#define UTL_CLASS_IMPL_TPL(className, T)
Implementation of standard UTL++ functionality for a template class.
void push(const T *object)
Push an object onto the stack.
#define UTL_CLASS_DEFID
Default init() and deInit() (which are merely place-holders).
void remove(FwdIt &begin, const FwdIt &end, bool cmp=false, const Predicate *pred=nullptr, bool predVal=false)
Remove objects from a sequence.
Template version of Array.
LIFO (last-in, first-out) data structure.
#define UTL_CLASS_DECL_TPL(DC, T, BC)
Declaration of standard UTL++ functionality for a template class with one parameter.
Stack(bool owner)
Constructor.
bool push(const T &object)
Push an object onto the stack.