DCFG
Dynamic Control Flow Graph
 All Classes Functions
Public Member Functions | Static Public Member Functions | List of all members
dcfg_api::DCFG_DATA Class Referenceabstract

Interface to all data in a DCFG. More...

#include <dcfg_api.H>

Public Member Functions

virtual bool read (std::istream &strm, std::string &errMsg, bool readToEof=true)=0
 Set internal DCFG data from a C++ istream.
 
virtual bool read (const std::string filename, std::string &errMsg)=0
 Open a file for reading and set internal DCFG data from its contents.
 
virtual void write (std::ostream &strm) const =0
 Write internal DCFG data to a C++ ostream.
 
virtual bool write (const std::string &filename, std::string &errMsg) const =0
 Write internal DCFG data to a file.
 
virtual void clearCounts ()=0
 Set all dynamic counts to zero.
 
virtual UINT32 get_process_ids (DCFG_ID_CONTAINER &process_ids) const =0
 Get list of process IDs.
 
virtual DCFG_PROCESS_CPTR get_process_info (DCFG_ID process_id) const =0
 Get access to data for a process.
 

Static Public Member Functions

static DCFG_DATAnew_dcfg ()
 Create a new DCFG.
 

Detailed Description

Interface to all data in a DCFG.

This is an interface; use DCFG_DATA::new_dcfg() to create an object that implements the interface.

Member Function Documentation

virtual UINT32 dcfg_api::DCFG_DATA::get_process_ids ( DCFG_ID_CONTAINER process_ids) const
pure virtual

Get list of process IDs.

Returns
Number of IDs that were added to process_ids.
Parameters
[out]process_idsContainer to which process 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: DCFG_ID_VECTOR, DCFG_ID_SET, etc.
virtual DCFG_PROCESS_CPTR dcfg_api::DCFG_DATA::get_process_info ( DCFG_ID  process_id) const
pure virtual

Get access to data for a process.

Returns
Pointer to interface object for specified process or NULL if process_id is invalid.
Parameters
[in]process_idID of desired process.
static DCFG_DATA* dcfg_api::DCFG_DATA::new_dcfg ( )
static

Create a new DCFG.

This is a factory method to create a new object that implements the DCFG_DATA interface.

Returns
Pointer to new object. It can be freed with delete.
virtual bool dcfg_api::DCFG_DATA::read ( std::istream &  strm,
std::string &  errMsg,
bool  readToEof = true 
)
pure virtual

Set internal DCFG data from a C++ istream.

Returns
true on success, false otherwise (and sets errMsg).
Parameters
[in]strmStream to read from. Reads one JSON value, which must follow the DCFG JSON format.
[out]errMsgContains error message upon failure.
[in]readToEofDefines what to do after the JSON value is read. If true, continue reading to end of input stream and fail if any non-whitespace characters are found. If false, stop reading after the the JSON value.
virtual bool dcfg_api::DCFG_DATA::read ( const std::string  filename,
std::string &  errMsg 
)
pure virtual

Open a file for reading and set internal DCFG data from its contents.

Returns
true on success, false otherwise (and sets errMsg).
Parameters
[in]filenameName of file to open. Reads one JSON value, which must follow the DCFG JSON format.
[out]errMsgContains error message upon failure.
virtual void dcfg_api::DCFG_DATA::write ( std::ostream &  strm) const
pure virtual

Write internal DCFG data to a C++ ostream.

Parameters
[out]strmStream to write to. Output will conform to the DCFG JSON format.
virtual bool dcfg_api::DCFG_DATA::write ( const std::string &  filename,
std::string &  errMsg 
) const
pure virtual

Write internal DCFG data to a file.

Returns
true on success, false otherwise (and sets errMsg).
Parameters
[in]filenameName of file to open. Output will conform to the DCFG JSON format.
[out]errMsgContains error message upon failure.

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