bactria
0.0.1
The bactria library is a header-only C++14 library for profiling and tracing.
|
The range class. More...
#include <Range.hpp>
Public Member Functions | |
Range () | |
The default constructor. More... | |
Range (std::string name, std::uint32_t color=color::bactria_cyan, Category category=Category{}, bool autostart=true) | |
The constructor. More... | |
Range (Range const &other) | |
The copy constructor. More... | |
auto | operator= (Range const &rhs) -> Range & |
The copy assignment operator. More... | |
Range (Range &&other) noexcept | |
The move constructor. More... | |
auto | operator= (Range &&rhs) noexcept -> Range & |
The move assignment operator. More... | |
~Range () override | |
The destructor. More... | |
auto | start () noexcept -> void |
Manual start. More... | |
auto | stop () noexcept -> void |
Manual stop. More... | |
auto | is_running () const noexcept -> bool |
Query status. More... | |
Public Member Functions inherited from bactria::ranges::Marker | |
Marker ()=default | |
Default constructor. More... | |
Marker (std::string name, std::uint32_t color, Category category) | |
Constructor. More... | |
Marker (Marker const &other)=default | |
Copy constructor. More... | |
auto | operator= (Marker const &rhs) -> Marker &=default |
Copy-assignment operator. More... | |
Marker (Marker &&other)=default | |
Move constructor. More... | |
auto | operator= (Marker &&rhs) -> Marker &=default |
Move-assignment operator. More... | |
virtual | ~Marker ()=default |
Destroy the Marker object. | |
auto | get_name () const noexcept -> std::string const & |
Return the marker's name. More... | |
auto | get_c_name () const noexcept -> char const * |
Return the marker's name (C string). More... | |
auto | get_color () const noexcept -> std::uint32_t |
Return the marker's color. More... | |
auto | get_category () const noexcept -> Category const & |
Return the marker's category. More... | |
Additional Inherited Members | |
Protected Attributes inherited from bactria::ranges::Marker | |
std::string | m_name {"BACTRIA_GENERIC_MARKER"} |
The name assigned to the Marker. More... | |
std::uint32_t | m_color {color::orange} |
The color assigned to the Marker. More... | |
Category | m_category {} |
The Category assigned to the Marker. More... | |
The range class.
The range class is intended for improving the user's visualization experience. By using a range the user can define time spans that will be highlighted in the visualizer (if supported by the corresponding back-end). Back-ends which do not support user-defined visualization will silently ignore any user-defined ranges.
Unlike sectors, ranges can freely overlap and do not need to be correctly nested.
This class can be inherited from to create ranged objects. The objects' lifetimes will then be highlighted in the visualizer.
|
inline |
|
inline |
The constructor.
Constructs a Range with the name name, the color color and the Category category.
name | The name of the range as it should be shown on the visualizer. |
color | The range's color in ARGB format as it should be shown on the visualizer. Default: bactria::color::bactria_cyan. |
category | The range's category. Default: bactria's default category. |
autostart | If true start the range on construction. Default: true. |
|
inline |
|
inlinenoexcept |
|
inlineoverride |
|
inlinenoexcept |
Query status.
|
inlinenoexcept |
Manual start.
Manually starts the Range. If this was already started before the method will do nothing.
|
inlinenoexcept |
Manual stop.
Manually stops the range. If this was not running before the method will do nothing.