JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
JCollection Class Reference

#include <JCollection.h>

Inheritance diagram for JCollection:
[legend]

Public Member Functions

 JCollection ()
 
 JCollection (const JCollection &source)
 
 ~JCollection () override
 
JCollectionoperator= (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
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (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)
 

Protected Member Functions

void ItemAdded ()
 
void ItemRemoved ()
 
void SetItemCount (const JSize newItemCount)
 
- Protected Member Functions inherited from JBroadcaster
 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)
 
virtual void Receive (JBroadcaster *sender, const Message &message)
 
void SendWithFeedback (JBroadcaster *recipient, Message *message)
 
void BroadcastWithFeedback (Message *message)
 
virtual void ReceiveWithFeedback (JBroadcaster *sender, Message *message)
 
virtual void ReceiveGoingAway (JBroadcaster *sender)
 

Detailed Description

                        The JCollection Class

Abstract class for a collection of objects arranged in some kind of
data structure. The common ground for collections is that they
contain zero or more items.

Constructor & Destructor Documentation

◆ JCollection() [1/2]

JCollection::JCollection ( )

◆ JCollection() [2/2]

JCollection::JCollection ( const JCollection source)

◆ ~JCollection()

JCollection::~JCollection ( )
override

Member Function Documentation

◆ GetIndexFromEnd()

JIndex JCollection::GetIndexFromEnd ( const JIndex  index) const

◆ GetItemCount()

JSize JCollection::GetItemCount ( ) const
inline

◆ IndexValid()

bool JCollection::IndexValid ( const JIndex  index) const
inline

◆ IsEmpty()

bool JCollection::IsEmpty ( ) const
inline

Returns true if there are no items in the JCollection.

◆ ItemAdded()

void JCollection::ItemAdded ( )
inlineprotected

◆ ItemRemoved()

void JCollection::ItemRemoved ( )
protected

Not inline because it uses assert

◆ operator=()

JCollection & JCollection::operator= ( const JCollection source)

◆ SetItemCount()

void JCollection::SetItemCount ( const JSize  newItemCount)
inlineprotected

◆ ToString()

JString JCollection::ToString ( ) const
overridevirtual

Reimplemented from JBroadcaster.


The documentation for this class was generated from the following files: