|
JX Application Framework
|
#include <JContainer.h>
Public Member Functions | |
| JContainer () | |
| JContainer (const JContainer &source) | |
| JContainer & | operator= (const JContainer &source) |
Public Member Functions inherited from JCollection | |
| 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 |
Public Member Functions inherited from JBroadcaster | |
| 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) |
Protected Member Functions | |
| void | InstallCollection (JCollection *list) |
| const JCollection * | GetList () const |
| void | Receive (JBroadcaster *sender, const Message &message) override |
Protected Member Functions inherited from JCollection | |
| 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) |
| void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
| void | BroadcastWithFeedback (Message *message) |
| virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
| virtual void | ReceiveGoingAway (JBroadcaster *sender) |
Interface for the JContainer class
The JContainer Class Class for a collection of objects stored in a JList. By calling InstallCollection in the constructors and copy constructors, derived classes need not worry about keeping JCollection::itsItemCount up to date. This class does it automatically by listening to Broadcast from the specified JList. Implementation notes: We store a JCollection* only to avoid making this class a template. We should actually store an JList*. But instantiating templates is such a pain, and, in this case, is conceptually unnecessary.
| JContainer::JContainer | ( | ) |
| JContainer::JContainer | ( | const JContainer & | source | ) |
|
inlineprotected |
|
protected |
| JContainer & JContainer::operator= | ( | const JContainer & | source | ) |
|
overrideprotectedvirtual |
Keep the number of items up to date.
Reimplemented from JBroadcaster.
Reimplemented in JNamedTreeList, JTreeList, and JXCheckboxGroup.