-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDiscreteEvent.cxx
68 lines (52 loc) · 1.51 KB
/
DiscreteEvent.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*ckwg +5
* Copyright 2010 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#include <DiscreteEvent.h>
#include <EventManager.h>
#include <RightTrackDefs.h>
namespace RightTrack {
// ----------------------------------------------------------------
/** Constructor.
*
* @param[in] name - descriptive name for this event. A method or
* function name is good for events that cover the whole function or
* method.
*
* @param[in] group - name for logically grouping events. Method
* events that all relate to the same class could be grouped under the
* class name. Groups can be hierarchically composed using
* '.'separated names, such as "foo.bar".
*
* @param[in] color - a 24 bit value specifying the RGB components
* using the HTML color encoding scheme. You can use a set of
* predefined color names or just encode them as a literal.
*/
DiscreteEvent::
DiscreteEvent(vcl_string name, vcl_string group, int color)
: Event(name, group, color)
{
Manager()->RegisterEvent(this);
}
DiscreteEvent::
~DiscreteEvent()
{
}
void DiscreteEvent::
Start(::RightTrack::EventData_t val)
{
Manager()->StartEvent( this, val );
}
void DiscreteEvent::
End(::RightTrack::EventData_t val)
{
// should never be called
// Raise an error
}
Internal::Event::EventType_t DiscreteEvent::
EventType() const
{
return ::RightTrack::Internal::Event::ET_DISCRETE_EVENT;
}
} // end namespace