Chi-Tech
|
#include <TimingLog.h>
Public Member Functions | |
TimingBlock & | CreateTimingBlock (const std::string &name, const std::string &parent_name="") |
TimingBlock & | CreateOrGetTimingBlock (const std::string &name, const std::string &parent_name="") |
TimingBlock & | GetTimingBlock (const std::string &name) |
Protected Attributes | |
std::map< std::string, std::unique_ptr< TimingBlock > > | timing_blocks_ |
Utility class for defining time logs.
Definition at line 16 of file TimingLog.h.
TimingBlock & chi::TimingLog::CreateOrGetTimingBlock | ( | const std::string & | name, |
const std::string & | parent_name = "" |
||
) |
If the timing block with the given exists, this method returns that block, otherwise it creates a time block and returns a reference to it. If the parent name is not found then this method throws std::invalid_argument
. The parent name may be empty, i.e. "", which will revert to the main timing block "ChiTech"
Definition at line 53 of file TimingLog.cc.
TimingBlock & chi::TimingLog::CreateTimingBlock | ( | const std::string & | name, |
const std::string & | parent_name = "" |
||
) |
Creates a time block and returns a reference to it. If the name is already taken or the parent name is not found then this method throws std::invalid_argument
. The parent name may be empty, i.e. "", which will revert to the main timing block "ChiTech"
Definition at line 15 of file TimingLog.cc.
TimingBlock & chi::TimingLog::GetTimingBlock | ( | const std::string & | name | ) |
Returns a reference to the timing block with the given name. If a timing block with that name does not exist then this method will throw std::invalid_argument
.
Definition at line 63 of file TimingLog.cc.
|
protected |
Definition at line 38 of file TimingLog.h.