The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::StateTimerUnit::StateTimer Class Reference

The timer that user can access to start/end tracking state. A StateTimer::Handle is returned from StateTimerUnit upon allocation. More...

#include <StateTimerUnit.hpp>

Public Types

typedef uint32_t TimerId
 
typedef std::shared_ptr< StateTimerHandle
 
typedef std::shared_ptr< std::unordered_map< uint32_t, uint32_t > > StateSetInfo
 

Public Member Functions

template<class EnumClassT >
void startState (EnumClassT state_enum)
 Start timing state.
 
template<class EnumClassT >
void endState (EnumClassT state_enum)
 End timing state.
 
template<class EnumClassT >
void operator= (EnumClassT state_enum)
 Assignment for starting a state in the timer.
 

Friends

class StateTimerPool
 

Detailed Description

The timer that user can access to start/end tracking state. A StateTimer::Handle is returned from StateTimerUnit upon allocation.

Definition at line 44 of file StateTimerUnit.hpp.

Member Typedef Documentation

◆ Handle

typedef std::shared_ptr<StateTimer> sparta::StateTimerUnit::StateTimer::Handle

Definition at line 51 of file StateTimerUnit.hpp.

◆ StateSetInfo

typedef std::shared_ptr<std::unordered_map<uint32_t, uint32_t> > sparta::StateTimerUnit::StateTimer::StateSetInfo

Definition at line 52 of file StateTimerUnit.hpp.

◆ TimerId

typedef uint32_t sparta::StateTimerUnit::StateTimer::TimerId

Definition at line 50 of file StateTimerUnit.hpp.

Constructor & Destructor Documentation

◆ ~StateTimer()

sparta::StateTimerUnit::StateTimer::~StateTimer ( )
inline

Definition at line 54 of file StateTimerUnit.hpp.

Member Function Documentation

◆ endState()

template<class EnumClassT >
void sparta::StateTimerUnit::StateTimer::endState ( EnumClassT  state_enum)
inline

End timing state.

Parameters
state_enumThe enum of the state

Definition at line 103 of file StateTimerUnit.hpp.

◆ operator=()

template<class EnumClassT >
void sparta::StateTimerUnit::StateTimer::operator= ( EnumClassT  state_enum)
inline

Assignment for starting a state in the timer.

Parameters
Theenum of the state need to be started

Definition at line 141 of file StateTimerUnit.hpp.

Here is the call graph for this function:

◆ startState()

template<class EnumClassT >
void sparta::StateTimerUnit::StateTimer::startState ( EnumClassT  state_enum)
inline

Start timing state.

Parameters
state_enumThe enum of the state

Definition at line 61 of file StateTimerUnit.hpp.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ StateTimerPool

friend class StateTimerPool
friend

Definition at line 46 of file StateTimerUnit.hpp.


The documentation for this class was generated from the following file: