VizKit
3.3.7
|
A VisualActor is notified about events and messages with a VisualNotification. More...
#include <VisualNotification.h>
Public Member Functions | |
VisualNotification () | |
The constructor. | |
VisualNotification (const VisualItemIdentifier &anIdentifier) | |
Another constructor. | |
~VisualNotification () | |
The destructor. | |
VisualNotification (const VisualNotification &other) | |
Copy constructor. | |
VisualNotification & | operator= (const VisualNotification &other) |
Assignment operator. | |
virtual VisualNotification * | clone (void) const |
Copies the current VisualNotification and returns a pointer to a new VisualNotification. | |
void | setKey (const VisualNotificationKey aKey) |
Sets the key of a notification. | |
VisualNotificationKey | getKey (void) const |
Returns the key of the notification. | |
void | setData (const void *const someData, uint32 dataSizeInBytes) |
Sets the value of a notification. | |
void * | getData (uint32 &dataSizeInBytes) const |
Returns the untyped data of the notification. | |
void | setObject (const VisualObject &anObject) |
Sets the object of a notification. | |
VisualObject * | getObject (void) const |
Returns a pointer to the object of the notification. | |
void | setPointer (void *pointer) |
Sets a pointer to some memory address. | |
void * | getPointer (void) |
Returns a pointer to some memory address. | |
void | post (void) |
The notification is posted to the VisualNotificationQueue (pushed at the end of the VisualNotificationQueue). | |
Static Public Member Functions | |
static void | convertNotificationKeyToString (const VisualNotificationKey aKey, char *outString) |
Static helper function that converts a VisualNotificationKey to the string. | |
static void | post (const VisualNotificationKey aKey) |
Static function for convenient posting of simple enum value of VisualNotificationKey. | |
static void | registerNotification (VisualActor *aVisualActor, const VisualNotificationKey aNotificationKey) |
A VisualActor can register for an event/message. | |
static void | removeNotification (VisualActor *aVisualActor, const VisualNotificationKey aNotificationKey) |
A VisualActor can be removed from the list of observers for a specific notification. | |
Private Member Functions | |
void | copy (const VisualNotification &other) |
Copy method for assignment operator and copy constructor. | |
Private Attributes | |
VisualNotificationKey | notificationEnumKey |
Enum value of notification as uint16. | |
void * | notificationData |
Optional data of notification. | |
uint32 | notificationDataSize |
The length of the optional data in bytes. | |
VisualObject * | notificationObject |
Optional object of the notification. | |
void * | notificationPointer |
Internally stored pointer to some memory address. |
A VisualActor is notified about events and messages with a VisualNotification.
The VisualActor can query the VisualNotification for details. The VisualActor can also set a value to pass it back to the caller.
The constructor.
VisualNotification::VisualNotification | ( | const VisualItemIdentifier & | anIdentifier | ) |
Another constructor.
anIdentifier | Identifier of the notification. |
The destructor.
VisualNotification::VisualNotification | ( | const VisualNotification & | other | ) |
Copy constructor.
VisualNotification * VisualNotification::clone | ( | void | ) | const [virtual] |
Copies the current VisualNotification and returns a pointer to a new VisualNotification.
Implements VizKit::VisualObject.
void VisualNotification::convertNotificationKeyToString | ( | const VisualNotificationKey | aKey, |
char * | outString | ||
) | [static] |
Static helper function that converts a VisualNotificationKey to the string.
Possibly useful for debugging or tracing purposes.
aKey | The key of a notification. |
outString | The character string value of the VisualNotificationKey enum value. |
void VisualNotification::copy | ( | const VisualNotification & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
other | Another VisualNotification. |
void * VisualNotification::getData | ( | uint32 & | dataSizeInBytes | ) | const |
Returns the untyped data of the notification.
[out] | dataSizeInBytes | The number of bytes the data occupies in memory. |
VisualNotificationKey VisualNotification::getKey | ( | void | ) | const |
Returns the key of the notification.
VisualObject * VisualNotification::getObject | ( | void | ) | const |
Returns a pointer to the object of the notification.
void * VisualNotification::getPointer | ( | void | ) |
VisualNotification & VisualNotification::operator= | ( | const VisualNotification & | other | ) |
Assignment operator.
void VisualNotification::post | ( | void | ) |
The notification is posted to the VisualNotificationQueue (pushed at the end of the VisualNotificationQueue).
void VisualNotification::post | ( | const VisualNotificationKey | aKey | ) | [static] |
Static function for convenient posting of simple enum value of VisualNotificationKey.
aKey | The notification key to post. |
void VisualNotification::registerNotification | ( | VisualActor * | aVisualActor, |
const VisualNotificationKey | aNotificationKey | ||
) | [static] |
A VisualActor can register for an event/message.
The notification is passed with VisualActor::handleNotification().
aVisualActor | A visual actor. |
aNotificationKey | An enum that denotes a notification. |
void VisualNotification::removeNotification | ( | VisualActor * | aVisualActor, |
const VisualNotificationKey | aNotificationKey | ||
) | [static] |
A VisualActor can be removed from the list of observers for a specific notification.
aVisualActor | A visual actor. |
aNotificationKey | An enum that denotes a notification. |
void VisualNotification::setData | ( | const void *const | someData, |
uint32 | dataSizeInBytes | ||
) |
Sets the value of a notification.
someData | The pointer to the memory location of the data. |
dataSizeInBytes | The size of the data in bytes. |
void VisualNotification::setKey | ( | const VisualNotificationKey | aKey | ) |
Sets the key of a notification.
Notification keys are implemented as enums.
aKey | The enum key. |
void VisualNotification::setObject | ( | const VisualObject & | anObject | ) |
Sets the object of a notification.
anObject | The pointer to an object. |
void VisualNotification::setPointer | ( | void * | pointer | ) |
Sets a pointer to some memory address.
pointer | A pointer to some memory address. |
void* VizKit::VisualNotification::notificationData [private] |
Optional data of notification.
The length of the optional data in bytes.
Enum value of notification as uint16.
Optional object of the notification.
void* VizKit::VisualNotification::notificationPointer [private] |
Internally stored pointer to some memory address.