1 #if !defined(__EVENT_HPP)
24 #if !defined(__COMMON_HPP)
34 template <
class IdentifierType = Identifier >
46 theIdentifier( NULLPTR )
53 Event(
const IdentifierType & aId )
55 theIdentifier( new IdentifierType(aId) )
63 theIdentifier( NULLPTR )
65 if( aEvent.theIdentifier != NULLPTR )
67 theIdentifier =
new IdentifierType
69 *(aEvent.theIdentifier)
78 if( theIdentifier != NULLPTR )
81 theIdentifier = NULLPTR;
103 if( theIdentifier != NULLPTR )
105 delete theIdentifier;
106 theIdentifier = NULLPTR;
113 if( aEvent.theIdentifier != NULLPTR )
115 theIdentifier =
new IdentifierType
117 *(aEvent.theIdentifier)
132 bool isSame(
false );
134 if( theIdentifier != NULLPTR &&
135 aEvent.theIdentifier != NULLPTR )
137 isSame = (*theIdentifier == *(aEvent.theIdentifier) );
141 isSame = (
this == &aEvent );
149 operator const IdentifierType &( void )
const
152 if( theIdentifier == NULLPTR )
160 return ( *theIdentifier );
165 operator IdentifierType *( void )
const
168 if( theIdentifier == NULLPTR )
177 return theIdentifier;
185 IdentifierType *theIdentifier;
191 #endif // if !defined(__EVENT_HPP)
virtual ~Event(void)
Virtual destructor.
Definition: Event.hpp:76
Event(void)
Default constructor protected.
Definition: Event.hpp:44
Event(const IdentifierType &aId)
Initializing constructor.
Definition: Event.hpp:53
Event & operator=(const Event &aEvent)
Assignment operator.
Definition: Event.hpp:95
NullPointerException is the base exception type for NullPointer.
Definition: NullPointerException.hpp:40
bool operator==(const Event &aEvent) const
Equality operator.
Definition: Event.hpp:130
Event provides a type basis for event ontologies.
Definition: Event.hpp:35
Event(const Event &aEvent)
Copy constructor.
Definition: Event.hpp:61