OpenGLPrakt --> events --> cEvent

class cStorableEvent

a class which provides a way to store cEvent objects and derived objects

Source:
../src/cEvent.hh:111

Friends:
 friend ostream & operator << ( ostream & , const cStorableEvent & ) ;
mainly for debugging purposes: a way to output an event

Constructors Index

cStorableEvent
[public] default constructor - gets the event to store
cStorableEvent
[public] the copy constructor
~cStorableEvent
[public] destructor


Methods Index

GetName
[public] return name/type of event
operator <
[public] operator < to compare cStorableEvents
operator <
[public] operator < for comparing cStorableEvents with cEvents
operator ==
[public] operator == to compare cStorableEvents
operator ==
[public] operator == for comparing cStorableEvents with cEvents
operator constcEvent&
[public] operator for casting to cEvent


Constructors

cStorableEvent

public cStorableEvent ( const cEvent & e ) ;

default constructor - gets the event to store

(Note: It does not store the event provided but a clone of it, therefore cEvent::Clone() is called.)

Parameters:
e const reference to cEvent object to store

cStorableEvent

public cStorableEvent ( const cStorableEvent & cse ) ;

the copy constructor

This is important as we have a dynamically allocated member.

Parameters:
const reference to cStorableEvent to copy

cStorableEvent

public ~ cStorableEvent ( ) ;

destructor


Methods

operator constcEvent&

public operator const cEvent & ( ) ;

operator for casting to cEvent

Return:
const reference to cEvent

operator ==

public const bool operator == ( const cStorableEvent & se ) const ;

operator == to compare cStorableEvents

This is just delegated to the stored cEvents.

Parameters:
se const reference to cStorableEvent to compare with

Return:
true if the stored event's types match

operator <

public const bool operator < ( const cStorableEvent & se ) const ;

operator < to compare cStorableEvents

This is just delegated to the stored cEvents.

This operator is a bit odd but needed by STL to store cStorableEvents in Sorted Containers.

Parameters:
se const reference to cStorableEvent to compare with

Return:
true if this event's type is lower than se's type in terms of string comparison

operator ==

public const bool operator == ( const cEvent & e ) const ;

operator == for comparing cStorableEvents with cEvents

operator <

public const bool operator < ( const cEvent & e ) const ;

operator < for comparing cStorableEvents with cEvents

GetName

public const string & GetName ( ) const ;

return name/type of event

Return:
const reference to string with name/type of event

This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.

Click here to return to the top of the page.