JX Application Framework
|
#include <JPtrStack.h>
Public Member Functions | |
JPtrStack (const JPtrArrayT::CleanUpAction action) | |
~JPtrStack () override | |
void | PushCopy (const T &newElement) |
void | ClearDelete () |
void | ClearDeleteAsArrays () |
void | UnwindDelete (const JSize numToUnwind) |
void | UnwindDeleteAsArrays (const JSize numToUnwind) |
JPtrArrayT::CleanUpAction | GetCleanUpAction () const |
void | SetCleanUpAction (const JPtrArrayT::CleanUpAction action) |
![]() | |
JStack () | |
JStack (const JStack< T *, S > &source) | |
~JStack () override | |
JStack< T *, S > & | operator= (const JStack< T *, S > &source) |
void | Push (const T * &newElement) |
T * | Pop () |
bool | Pop (T * *element) |
T * | Peek () const |
bool | Peek (T * *element) const |
T * | Peek (const JIndex index) const |
bool | Peek (const JIndex index, T * *element) const |
void | Clear () |
void | Unwind (const JSize numToUnwind) |
JListIterator< T * > * | NewIterator () |
JListIterator< T * > * | NewIterator () const |
![]() | |
JContainer () | |
JContainer (const JContainer &source) | |
JContainer & | operator= (const JContainer &source) |
![]() | |
JCollection () | |
JCollection (const JCollection &source) | |
~JCollection () override | |
JCollection & | operator= (const JCollection &source) |
JSize | GetItemCount () const |
bool | IsEmpty () const |
bool | IndexValid (const JIndex index) const |
JIndex | GetIndexFromEnd (const JIndex index) const |
JString | ToString () const override |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Additional Inherited Members | |
![]() | |
S * | GetElements () |
![]() | |
void | InstallCollection (JCollection *list) |
const JCollection * | GetList () const |
void | Receive (JBroadcaster *sender, const Message &message) override |
![]() | |
void | ItemAdded () |
void | ItemRemoved () |
void | SetItemCount (const JSize newItemCount) |
![]() | |
JBroadcaster (const JBroadcaster &source) | |
void | ListenTo (const JBroadcaster *sender) |
void | StopListening (const JBroadcaster *sender) |
void | ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember) |
void | StopListening (const JBroadcaster *sender, const std::type_info &messageType) |
template<class T > | |
void | Send (JBroadcaster *recipient, const T &message) |
template<class T > | |
void | Broadcast (const T &message) |
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
void | BroadcastWithFeedback (Message *message) |
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
virtual void | ReceiveGoingAway (JBroadcaster *sender) |
Interface for JPtrStack class
JPtrStack< T, S >::JPtrStack | ( | const JPtrArrayT::CleanUpAction | action | ) |
This class provides extra functions that are useful when storing a stack of pointers.
void JPtrStack< T, S >::ClearDelete | ( | ) |
Delete all the elements and remove them from the stack.
void JPtrStack< T, S >::ClearDeleteAsArrays | ( | ) |
Delete all the elements and remove them from the stack.
|
inline |
What to do when the destructor is called. This is especially useful for objects allocated on the stack, because one can set the appropriate action and then never have to worry about short-circuit returns.
void JPtrStack< T, S >::PushCopy | ( | const T & | data | ) |
Not called Push() to avoid shadowing function in base class.
|
inline |
Delete the top few elements and remove them from the stack.
void JPtrStack< T, S >::UnwindDeleteAsArrays | ( | const JSize | numToUnwind | ) |
Delete the top few elements and remove them from the stack.