Inheritance diagram for CP_DataSource:
Data | |
virtual CP_DataValueHolder | GetData (SInt32 inID) |
virtual CP_DataValueHolder | GetData (SInt32 inID, UInt32 inOptionalProperty) |
virtual void | HandleChangedData (CP_S_DataSource_ChangedData &inChangedData) |
Public Member Functions | |
void | SetID (FourCharCode inIdentifier) |
FourCharCode | GetID () |
void | RegisterSignal (const CP_SignalHolder &inSignal) |
CP_DataValueSignal * | FindSignal (const CP_String &inSignalName) |
UInt32 | GetNumberSignals () |
CP_String | GetNthSignalName (UInt32 inSignalIndex) |
void | RegisterSlot (const CP_SlotHolder &inSlot) |
CP_DataValueSlot | FindSlot (const CP_String &inSlotName) |
UInt32 | GetNumberSlots () |
CP_String | GetNthSlotName (UInt32 inSlotIndex) |
template<class R, class P1, class P2> | |
CP_CommandHandlerSignal * | Connect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode) |
template<class R, class P1, class P2> | |
void | Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2)) |
void | disconnect_all () |
void | signal_connect (CP_Signal *inSender) |
void | signal_disconnect (CP_Signal *inSender) |
Constructor / Destructor | |
CP_DataSource () | |
Constructor. | |
virtual | ~CP_DataSource () throw () |
Destructor. | |
Sorting | |
virtual bool | Compare (SInt32 inIDLeft, SInt32 inIDRight, bool inSortUp) |
Static Public Member Functions | |
static void | Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false) |
static void | Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue) |
Protected Attributes | |
CP_DataValueSignal | fValueChangedSignal |
CP_DataValueSlot | fDataChangedSlot |
CP_Signals_Array * | fSignals |
CP_Slots_Array * | fSlots |
FourCharCode | fObjectID |
sender_set | fSenders |
Static Protected Attributes | |
static FourCharCode | fObjectIDCount = 0 |
Private Member Functions | |
void | DataChangedSlot (CP_DataValueHolder &inValue, OSStatus &inOutStatus) |
|
Constructor.
|
|
Destructor.
|
|
Returns the data for the passed in identifier. Subclasses neet to override this to return the actual data. This base class just returns an empty data value.
Reimplemented in CP_DataSource_Strings. |
|
Returns the data for the passed in identifier. Subclasses neet to override this to return the actual data. This base class just returns an empty data value.
Reimplemented in CP_DataSource_Strings. |
|
|
|
Method to call when something has caused the data value stored by this class with the passed in id to change. This will send out a kCP_Signal_ValueChanged signal to notifiy users of this data that the data has changed in someway.
|
|
Method that can be called when the data managed by this class needs to be sorted. Subclasses need to override to provide the actual sorting. This base class method always returns true.
Reimplemented in CP_DataSource_Strings. |
|
Slot to allow users of this data to notify this class when they have done something to cause the underlying data to change. When called, this will call the HandleChangedData method to allow subclasses to handle the changed data.
|
|
Add a reference to our object, returning the new reference count.
|
|
Remove a reference to our object, returning the new reference count. If the count is 0, then this object is also deleted, and 0 is returned.
|
|
Add the object to the topmost auto-release pool. This will ensure that the object is eventually released.
|
|
Returns the current ref count.
|
|
Sets the identifier for this object. If a specific identifier is not set with this function, then a default id is used, which is simply a running count of the number of objects created.
|
|
Returns the objects identifier.
|
|
Registers the signal / signal name contained in the passed in inSignal object.
|
|
Finds the CP_DataValueSignal object that matches the passed in inSignalName.
|
|
Returns the number of signals for this object.
|
|
Returns the signal name of the passed in signal index.
|
|
Registers the slot / slot name contained in the passed in inSlot object.
|
|
Finds the CP_Slot1 object that matches the passed in inSlotName.
|
|
Returns the number of slots for this object.
|
|
Returns the slot name of the passed in signal index.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signal sent when the value of any item changes. |
|
|
|
List of registered signals for this object. |
|
List of registered slots for this object. |
|
Object identifier. |
|
|