|
| enum class | PropertyType {
INTEGER
, UINT64
, LONG
, FLOAT
,
DOUBLE
, STRING
} |
| |
| using | EventMemberPtr = boost::variant<int T::*, uint64_t T::*, long T::*, float T::*, double T::*, string T::*> |
| |
| using | VertexId_t = int |
| |
| using | EventMap_t = map<VertexId_t, queue<T>> |
| |
|
| | InputManager () |
| | Constructor.
|
| |
| void | setInputFilePath (const string &inputFilePath) |
| | Sets the path to the input file.
|
| |
| void | readInputs () |
| | Read a list of events from an input file and load them into a map, organized per vertex ID.
|
| |
| CircularBuffer< T > & | getEvents (const VertexId_t &vertexId, uint64_t firstStep, uint64_t lastStep, CircularBuffer< T > &buffer) |
| | Inserts into a the CircularBuffer output parameter the list of events that occur between firstStep (inclusive) and lastStep (exclusive) in the given vertexId.
|
| |
| int | getClockTickSize () |
| | Retrieves the clock tick size as defined in the input file.
|
| |
| string | getClockTickUnit () |
| | Retrieve the clock tick unit as defined in the input file.
|
| |
| T | queueFront (const VertexId_t &vertexId) |
| | Peeks into the event at the front of the vertex queue.
|
| |
| bool | queuePop (const VertexId_t &vertexId) |
| | Removes the event at the front of the vertex queue.
|
| |
| bool | queueEmpty (const VertexId_t &vertexId) |
| | True if the event queue for the given vertex is empty, false otherwise.
|
| |
| bool | registerProperty (const string &propName, EventMemberPtr property) |
| | Registers a property with the given name and a pointer to a member of the Event class. The pointer to member is stored in a boost::variant type that is later used to assign the input event data to the correct member variable.
|
| |
template<typename T>
class InputManager< T >
Definition at line 52 of file InputManager.h.
◆ EventMap_t
template<typename T >
| using InputManager< T >::EventMap_t = map<VertexId_t, queue<T>> |
◆ EventMemberPtr
template<typename T >
| using InputManager< T >::EventMemberPtr = boost::variant<int T::*, uint64_t T::*, long T::*, float T::*, double T::*, string T::*> |
◆ VertexId_t
◆ PropertyType
template<typename T >
| enum class InputManager::PropertyType |
|
strong |
◆ InputManager()
◆ getClockTickSize()
Retrieves the clock tick size as defined in the input file.
- Returns
- The user defined clock tick size
Definition at line 178 of file InputManager.h.
◆ getClockTickUnit()
Retrieve the clock tick unit as defined in the input file.
- Returns
- The user defined clock tick unit
Definition at line 185 of file InputManager.h.
◆ getEvents()
Inserts into a the CircularBuffer output parameter the list of events that occur between firstStep (inclusive) and lastStep (exclusive) in the given vertexId.
- Parameters
-
| vertexId | The ID of the vertex where the events occur |
| firstStep | The first time step (inclusive) for the occurrence of the events |
| lastStep | The last time step (exclusive) for the occurrence of the events |
| buffer | The CircularBuffer where input events will be inserted |
- Returns
- A reference to the CircularBuffer containing the list of events between firstStep and lastStep for the given vertexId
Definition at line 161 of file InputManager.h.
◆ queueEmpty()
template<typename T >
| bool InputManager< T >::queueEmpty |
( |
const VertexId_t & | vertexId | ) |
|
|
inline |
True if the event queue for the given vertex is empty, false otherwise.
- Parameters
-
- Returns
- True if the event queue is empty, false otherwise
Definition at line 216 of file InputManager.h.
◆ queueFront()
template<typename T >
| T InputManager< T >::queueFront |
( |
const VertexId_t & | vertexId | ) |
|
|
inline |
Peeks into the event at the front of the vertex queue.
- Parameters
-
| vertexId | The ID of the vertex |
- Exceptions
-
| out_of_range,if | vertexId is not found in the map |
- Returns
- The event at the front of the given vertex queue
Definition at line 194 of file InputManager.h.
◆ queuePop()
template<typename T >
| bool InputManager< T >::queuePop |
( |
const VertexId_t & | vertexId | ) |
|
|
inline |
Removes the event at the front of the vertex queue.
- Parameters
-
| vertexId | The ID of the vertex |
- Returns
- true if the front of the queue was removed false otherwise. Returns false if there are no events for the given vertex
Definition at line 203 of file InputManager.h.
◆ readInputs()
Read a list of events from an input file and load them into a map, organized per vertex ID.
Definition at line 90 of file InputManager.h.
◆ registerProperty()
template<typename T >
| bool InputManager< T >::registerProperty |
( |
const string & | propName, |
|
|
EventMemberPtr | property ) |
|
inline |
Registers a property with the given name and a pointer to a member of the Event class. The pointer to member is stored in a boost::variant type that is later used to assign the input event data to the correct member variable.
- Parameters
-
| propName | The name of the property as defined in the input file |
| property | The pointer to member variable where the property should be stored |
- Returns
- True if the property was successfully registered, false otherwise
Definition at line 232 of file InputManager.h.
◆ setInputFilePath()
template<typename T >
| void InputManager< T >::setInputFilePath |
( |
const string & | inputFilePath | ) |
|
|
inline |
Sets the path to the input file.
- Parameters
-
| inputFilePath | The path to the input file |
Definition at line 78 of file InputManager.h.
The documentation for this class was generated from the following file: