.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
EventType.h
1 
10 #ifndef __EVENT_TYPE_H__
11 #define __EVENT_TYPE_H__
12 
13 #include <string>
14 
15 namespace MDSimulation
16 {
17  #define GUARD_TYPE(typ) (assert((typ) == UpdateSystemEvent || \
18  (typ) == BubbleWallEvent || \
19  (typ) == CellCrossingEvent || \
20  (typ) == ConeWallEvent || \
21  (typ) == CollisionEvent))
22 
23 
28  enum EventType
29  {
30  // Associated with one particle
31  CellCrossingEvent = 0,
32  BubbleWallEvent = 1,
33  ConeWallEvent = 2,
34 
35  // Associated with two particles
36  CollisionEvent = 3,
37 
38  // Associated with no particles
39  UpdateSystemEvent = 4,
40  };
41 
49  std::string getEventName(const EventType type);
50 
58  int associatedObjects(const EventType type);
59 
68  bool
69  invalidatesAssociated(const EventType type);
70 }
71 
72 #endif
bool invalidatesAssociated(const EventType type)
Check function to determine whether or not the occurrence of a given event will invalidate ones alrea...
Definition: EventType.cpp:95
EventType
Enumeration of the various event types in the system.
Definition: EventType.h:28
std::string getEventName(const EventType type)
Function for translating an event type to an appropriate string representing the event.
Definition: EventType.cpp:42
int associatedObjects(const EventType type)
Produces the number of objects associated with the event.
Definition: EventType.cpp:72