Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

plist::AutoCollectionListener Struct Reference

Monitors a collection to keep tabs on all its entries, so PrimitiveListener::plistValueChanged will be called if any entry is changed. More...

#include <plistCollections.h>

Inheritance diagram for plist::AutoCollectionListener:

Detailed Description

Monitors a collection to keep tabs on all its entries, so PrimitiveListener::plistValueChanged will be called if any entry is changed.

Definition at line 206 of file plistCollections.h.

List of all members.

Public Member Functions

 AutoCollectionListener (const plist::Collection &source, bool updateOnNewEntry)
 constructor, specify collection to monitor and whether you want plistValueChanged to be called when new entries are added
 ~AutoCollectionListener ()
 destructor, unsubscribe from everything
AutoCollectionListeneroperator= (const AutoCollectionListener &)
 assignment (no-op)
virtual void plistCollectionEntryAdded (plist::Collection &col, ObjectBase &primitive)
 This will be called whenever an entry is added to the collection.
virtual void plistCollectionEntryRemoved (plist::Collection &col, ObjectBase &primitive)
 This will be called whenever an entry is added to the collection.
virtual void plistCollectionEntriesChanged (plist::Collection &col)
 This will be called whenever an entry is replaced, or multiple entries are added/removed at once, such as when an assignment occurs.
virtual void plistSubCollectionAdded (plist::Collection &)
 called if any sub collections are added for potential recursive handling
virtual void plistSubCollectionRemoved (plist::Collection &)
 called if any sub collections are removed for potential recursive handling
virtual void activate (bool callNow=true)
 add listeners
virtual void deactivate ()
 remove listeners

Public Attributes

const plist::Collectionsrc
 the collection being monitored
bool updateOnNew
 whether to call plistValueChanged whenever new primitives are added to the collection

Private Member Functions

 AutoCollectionListener (const AutoCollectionListener &)
 copy is a bad idea: as a member of a collection, don't want to listen to original collection's values

Constructor & Destructor Documentation

plist::AutoCollectionListener::AutoCollectionListener ( const plist::Collection source,
bool  updateOnNewEntry 
)

constructor, specify collection to monitor and whether you want plistValueChanged to be called when new entries are added

Definition at line 208 of file plistCollections.h.

plist::AutoCollectionListener::~AutoCollectionListener (  ) 

destructor, unsubscribe from everything

Definition at line 214 of file plistCollections.h.

plist::AutoCollectionListener::AutoCollectionListener ( const AutoCollectionListener  )  [private]

copy is a bad idea: as a member of a collection, don't want to listen to original collection's values


Member Function Documentation

virtual void plist::AutoCollectionListener::activate ( bool  callNow = true  )  [virtual]
void plist::AutoCollectionListener::deactivate (  )  [virtual]

remove listeners

Definition at line 248 of file plistCollections.cc.

Referenced by ~AutoCollectionListener().

AutoCollectionListener& plist::AutoCollectionListener::operator= ( const AutoCollectionListener  ) 

assignment (no-op)

Definition at line 218 of file plistCollections.h.

void plist::AutoCollectionListener::plistCollectionEntriesChanged ( plist::Collection  )  [virtual]

This will be called whenever an entry is replaced, or multiple entries are added/removed at once, such as when an assignment occurs.

Reimplemented from plist::CollectionListener.

Definition at line 276 of file plistCollections.cc.

Referenced by activate().

void plist::AutoCollectionListener::plistCollectionEntryAdded ( plist::Collection ,
ObjectBase  
) [virtual]

This will be called whenever an entry is added to the collection.

Reimplemented from plist::CollectionListener.

Definition at line 262 of file plistCollections.cc.

void plist::AutoCollectionListener::plistCollectionEntryRemoved ( plist::Collection ,
ObjectBase  
) [virtual]

This will be called whenever an entry is added to the collection.

Reimplemented from plist::CollectionListener.

Definition at line 270 of file plistCollections.cc.

virtual void plist::AutoCollectionListener::plistSubCollectionAdded ( plist::Collection  )  [virtual]

called if any sub collections are added for potential recursive handling

Definition at line 223 of file plistCollections.h.

Referenced by plistCollectionEntryAdded().

virtual void plist::AutoCollectionListener::plistSubCollectionRemoved ( plist::Collection  )  [virtual]

called if any sub collections are removed for potential recursive handling

Definition at line 224 of file plistCollections.h.

Referenced by plistCollectionEntryRemoved().


Member Data Documentation

the collection being monitored

Definition at line 235 of file plistCollections.h.

Referenced by activate(), deactivate(), and plistCollectionEntriesChanged().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:24 2016 by Doxygen 1.6.3