VizKit  3.3.7
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
VizKit::VisualNotification Class Reference

A VisualActor is notified about events and messages with a VisualNotification. More...

#include <VisualNotification.h>

Inheritance diagram for VizKit::VisualNotification:
VizKit::VisualObject

List of all members.

Public Member Functions

 VisualNotification ()
 The constructor.
 VisualNotification (const VisualItemIdentifier &anIdentifier)
 Another constructor.
 ~VisualNotification ()
 The destructor.
 VisualNotification (const VisualNotification &other)
 Copy constructor.
VisualNotificationoperator= (const VisualNotification &other)
 Assignment operator.
virtual VisualNotificationclone (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.
VisualObjectgetObject (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.
VisualObjectnotificationObject
 Optional object of the notification.
void * notificationPointer
 Internally stored pointer to some memory address.

Detailed Description

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.


Constructor & Destructor Documentation

The constructor.

Another constructor.

Parameters:
anIdentifierIdentifier of the notification.

The destructor.

Copy constructor.


Member Function Documentation

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.

Parameters:
aKeyThe key of a notification.
outStringThe character string value of the VisualNotificationKey enum value.
void VisualNotification::copy ( const VisualNotification other) [private]

Copy method for assignment operator and copy constructor.

Parameters:
otherAnother VisualNotification.
void * VisualNotification::getData ( uint32 dataSizeInBytes) const

Returns the untyped data of the notification.

Parameters:
[out]dataSizeInBytesThe number of bytes the data occupies in memory.
Returns:
The pointer to the memory location of the data.
Remarks:
To hold the data, the caller has to create and store a copy on his side.

Returns the key of the notification.

Returns:
The key of the notification. Notification keys are implemented as enums.

Returns a pointer to the object of the notification.

Returns:
A pointer to the object of the notification.
Remarks:
The object does not get copied automatically. If the caller wants to retain a copy, the data has to be copied by calling its object member function clone().
void * VisualNotification::getPointer ( void  )

Returns a pointer to some memory address.

Returns:
A pointer to some memory address.
Remarks:
If possible, copying the data is preferred (by using setData() / getData()).
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.

Parameters:
aKeyThe notification key to post.
Remarks:
The notification is pushed at the end of the VisualNotificationQueue.
void VisualNotification::registerNotification ( VisualActor aVisualActor,
const VisualNotificationKey  aNotificationKey 
) [static]

A VisualActor can register for an event/message.

The notification is passed with VisualActor::handleNotification().

Parameters:
aVisualActorA visual actor.
aNotificationKeyAn 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.

Parameters:
aVisualActorA visual actor.
aNotificationKeyAn enum that denotes a notification.
void VisualNotification::setData ( const void *const  someData,
uint32  dataSizeInBytes 
)

Sets the value of a notification.

Parameters:
someDataThe pointer to the memory location of the data.
dataSizeInBytesThe size of the data in bytes.
Remarks:
The data (not only the pointer) is copied.

Sets the key of a notification.

Notification keys are implemented as enums.

Parameters:
aKeyThe enum key.
void VisualNotification::setObject ( const VisualObject anObject)

Sets the object of a notification.

Parameters:
anObjectThe pointer to an object.
Remarks:
The object is copied by calling clone().
void VisualNotification::setPointer ( void *  pointer)

Sets a pointer to some memory address.

Parameters:
pointerA pointer to some memory address.
Remarks:
If possible, copying the data is preferred (by calling setData()).

Member Data Documentation

Optional data of notification.

The length of the optional data in bytes.

Enum value of notification as uint16.

Optional object of the notification.

Internally stored pointer to some memory address.


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

Generated on Sun May 3 2015 20:26:32 for VizKit by doxygen 1.8.0