Ion
|
The TraceCallExtractor class parses an OpenGL trace output generated by a GraphicsManager, segmenting it into a vector of calls with arguments. More...
#include "tracecallextractor.h"
Public Member Functions | |
TraceCallExtractor () | |
TraceCallExtractor (const std::string &trace) | |
Utility constructor also sets trace string and extracts vector of calls. More... | |
~TraceCallExtractor () | |
void | SetTrace (const std::string &trace) |
Sets trace string and extracts vector of calls. More... | |
const std::vector< std::string > & | GetCalls () |
size_t | GetCallCount () const |
Returns the number of OpenGL calls in the stream. More... | |
size_t | GetCountOf (const std::string &call_prefix) const |
Returns the number of times the passed call start occurs in the trace stream. More... | |
size_t | GetNthIndexOf (size_t n, const std::string &call_prefix) const |
Returns the index of the nth call in the trace stream beginning with start, if it exists, otherwise returns base::kInvalidIndex. More... | |
The TraceCallExtractor class parses an OpenGL trace output generated by a GraphicsManager, segmenting it into a vector of calls with arguments.
It also contains utility functions to locate and count particular calls. Calls are tested using one or more strings that must match the beginnings of the resulting trace strings. This scheme is used, rather than exact full-string matches, to allow for differences in trace formatting on different platforms.
Definition at line 33 of file tracecallextractor.h.
ion::gfx::TraceCallExtractor::TraceCallExtractor | ( | ) |
Definition at line 29 of file tracecallextractor.cc.
References SetTrace().
|
explicit |
Utility constructor also sets trace string and extracts vector of calls.
Definition at line 33 of file tracecallextractor.cc.
References SetTrace().
|
inline |
Definition at line 38 of file tracecallextractor.h.
size_t ion::gfx::TraceCallExtractor::GetCallCount | ( | ) | const |
Returns the number of OpenGL calls in the stream.
Definition at line 42 of file tracecallextractor.cc.
|
inline |
Definition at line 43 of file tracecallextractor.h.
size_t ion::gfx::TraceCallExtractor::GetCountOf | ( | const std::string & | call_prefix | ) | const |
Returns the number of times the passed call start occurs in the trace stream.
Definition at line 46 of file tracecallextractor.cc.
References ion::base::StartsWith().
size_t ion::gfx::TraceCallExtractor::GetNthIndexOf | ( | size_t | n, |
const std::string & | call_prefix | ||
) | const |
Returns the index of the nth call in the trace stream beginning with start, if it exists, otherwise returns base::kInvalidIndex.
Note that n == 0 returns the first index, n == 1 returns the second index, and so on.
Definition at line 55 of file tracecallextractor.cc.
References ion::base::kInvalidIndex, and ion::base::StartsWith().
void ion::gfx::TraceCallExtractor::SetTrace | ( | const std::string & | trace | ) |
Sets trace string and extracts vector of calls.
Definition at line 37 of file tracecallextractor.cc.
Referenced by TraceCallExtractor().