Interface to all data in a DCFG edge trace.
More...
#include <dcfg_trace_api.H>
|
virtual bool | open (const std::string filename, UINT32 tid, std::string &errMsg)=0 |
| Open a file for reading from the given thread.
|
|
virtual bool | get_edge_ids (dcfg_api::DCFG_ID_CONTAINER &edge_ids, bool &done, std::string &errMsg)=0 |
| Read a chunk of edge IDs.
|
|
Interface to all data in a DCFG edge trace.
This is an interface; use DCFG_TRACE::new_trace() to create an object that implements the interface.
virtual bool dcfg_trace_api::DCFG_TRACE_READER::get_edge_ids |
( |
dcfg_api::DCFG_ID_CONTAINER & |
edge_ids, |
|
|
bool & |
done, |
|
|
std::string & |
errMsg |
|
) |
| |
|
pure virtual |
Read a chunk of edge IDs.
They will be added to edge_ids
in the order in which they were recorded. This method will not typically read all the values at once. Call it repeatedly until done
is set to true
.
- Returns
true
on success, false
otherwise (and sets errMsg
).
- Parameters
-
[out] | edge_ids | Container to which edge IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER that maintains insertion order: DCFG_ID_VECTOR, etc. |
[out] | done | Set to true when end of sequence has been reached, false if there are more to read. |
[out] | errMsg | Contains error message upon failure. |
static DCFG_TRACE_READER* dcfg_trace_api::DCFG_TRACE_READER::new_reader |
( |
dcfg_api::DCFG_ID |
process_id | ) |
|
|
static |
Create a new DCFG edge-trace reader.
This is a factory method to create a new object that implements the DCFG_TRACE_READER interface. A reader can access only one process. Create multiple readers to read multiple processes.
- Returns
- Pointer to new object. It can be freed with
delete
.
- Parameters
-
[in] | process_id | ID of process to read. This can be determined from the DCFG data object corresponding to the trace. |
virtual bool dcfg_trace_api::DCFG_TRACE_READER::open |
( |
const std::string |
filename, |
|
|
UINT32 |
tid, |
|
|
std::string & |
errMsg |
|
) |
| |
|
pure virtual |
Open a file for reading from the given thread.
- Returns
true
on success, false
otherwise (and sets errMsg
).
- Parameters
-
[in] | filename | Name of file to open, which must follow the DCFG-Trace JSON format. |
[in] | tid | ID number of thread to read. |
[out] | errMsg | Contains error message upon failure. |
The documentation for this class was generated from the following file: