-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCRingItemProcessor.h
98 lines (88 loc) · 2.94 KB
/
CRingItemProcessor.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
This software is Copyright by the Board of Trustees of Michigan
State University (c) Copyright 2017.
You may use this software under the terms of the GNU public license
(GPL). The terms of this license are described at:
http://www.gnu.org/licenses/gpl.txt
Authors:
Ron Fox
Jeromy Tompkins
Aaron Chester
FRIB
Michigan State University
East Lansing, MI 48824-1321
*/
/**
* @file CRingItemProcessor.h
* @brief Defines an abstract base class for ring item processing.
*/
#ifndef CRINGITEMPROCESSOR_H
#define CRINGITEMPROCESSOR_H
class CRingScalerItem;
class CRingStateChangeItem;
class CRingTextItem;
class CPhysicsEventItem;
class CRingPhysicsEventCountItem;
class CDataFormatItem;
class CGlomParameters;
class CRingItem;
/**
* @class CRingItemProcessor
* @brief Abstract base class to support type-independent ring-item processing.
*
* @details
* The concept of this class is really simple. A virtual method for each
* ring-item type that we differentiate between. Similarly a virtual
* method for ring-item types that we don't break out. The default behavior
* for each type is to do a formatted dump to stdout.
*/
class CRingItemProcessor
{
public:
/** @brief Constructor. */
CRingItemProcessor() {};
/** @brief Destructor. */
virtual ~CRingItemProcessor() {};
public:
/**
* @brief Output an abbreviated scaler dump to stdout.
* @param item Reference to the scaler ring item to process.
*/
virtual void processScalerItem(CRingScalerItem& item);
/**
* @brief Output a state change item to stdout.
* @param item Reference to the state change item.
*/
virtual void processStateChangeItem(CRingStateChangeItem& item);
/**
* @brief Output a text item to stdout.
* @param item Refereinces the CRingTextItem we got.
*/
virtual void processTextItem(CRingTextItem& item);
/**
* @brief Output a physics event item to stdout.
* @param item Reference the physics event item.
*/
virtual void processEvent(CPhysicsEventItem& item);
/**
* @brief Output an event count item to stdout.
* @param item References the CPhysicsEventCountItem being dumped.
*/
virtual void processEventCount(CRingPhysicsEventCountItem& item);
/**
* @brief Output the ring item format to stdout.
* @param item References the format item.
*/
virtual void processFormat(CDataFormatItem& item);
/**
* @brief Output a glom parameters item to stdout.
* @param item References the glom parameter record.
*/
virtual void processGlomParams(CGlomParameters& item);
/**
* @brief Output a ring item with unknown type to stdout.
* @param item References the ring item for the event.
*/
virtual void processUnknownItemType(CRingItem& item);
};
#endif