winIDEA SDK
isys::CCoverageStatistic2 Class Reference

Description

This class contains information about coverage area (function or data), which coverage has been measured.

#include <CCoverageData2.h>

Public Types

enum  EAreaType {
  EAnyArea , EImages ,
  EImage , EFolder ,
  EModule , EFunction ,
  ESrcLine , EAsm ,
  ERange , ERanges
}
 Defines possible area types. More...
 

Public Member Functions

CCoverageStatistic2SPtr getParent ()
 Returns parent of this statistic. More...
 
size_t getNumChildren ()
 Returns the number of children areas, for example the number of source files in a folder (use only when complete file is loaded to memory (method createInstance() was called with isLoadDataInMemory = true)). More...
 
CCoverageStatistic2SPtr getChild (int idx)
 Returns child area for the given index (available only when complete file is loaded to memory (method createInstance() was called with isLoadDataInMemory = true)). More...
 
EAreaType getAreaType ()
 Returns coverage area type. More...
 
std::string getAreaName () const
 Returns area name, for example source file name, function name, source line text, ...
 
int getLinesAll () const
 Returns the number of all source code lines in area.
 
int getLinesExecuted () const
 Returns the number of executed source code lines in area.
 
int getBytesAll () const
 Returns the number of object code bytes in area.
 
int getBytesExecuted () const
 Returns the number of executed object code bytes in area.
 
int getConditionsAll () const
 Returns the number of object code conditions in area.
 
int getConditionsExecuted () const
 Returns the number of object code conditions which executed as true.
 
int getConditionsTrue () const
 Returns the number of object code conditions which executed as true.
 
int getConditionsFalse () const
 Returns the number of object code conditions which executed as false.
 
int getConditionsBoth () const
 Returns the number of object code conditions which executed both ways.
 
int getExecutionCount () const
 Returns execution count. More...
 
int getItemsCount () const
 Returns items count. More...
 
int getCallCount () const
 Returns the number of all calls in a range, function, module, ...
 
int getExecutedCallCount () const
 Returns the number of executed calls in a range, function, module, ...
 
virtual std::string getTextOrAbsPath ()
 Returns source line text for CCoverageStatistic2::ESrcLine areas, and absolute path for CCoverageStatistic2::EFolder and CCoverageStatistic2::EModule areas. More...
 
virtual std::string getRelPath ()
 Returns relative path. More...
 
virtual int getLineNumber ()
 Returns source line number (this method is available only for areas of type CCoverageStatistic2::ESrcLine). More...
 
virtual size_t getNumSourceLines ()
 This method returns the number of source lines in area of type CCoverageStatistic2::EModule. More...
 
virtual CCoverageSourceSPtr getSourceLineInfo (int idx)
 This method returns source line coverage info (available only for areas of type CCoverageStatistic2::EModule). More...
 
size_t getNumAsmLines ()
 Returns the number of lines with ASM info for this node.
 
CCoverageStatistic2AsmSPtr getAsmLine (int idx)
 Returns ASM info aththe given index for this node.
 

Static Public Member Functions

static std::string areaType2Str (EAreaType areaType)
 Returns string representation of the given enum.
 

Member Enumeration Documentation

◆ EAreaType

Defines possible area types.

Enumerator
EAnyArea 

Matches any other area when retrieving data.

EImages 

This area contains statistic for all download files.

EImage 

This area contains statistic for one download file.

EFolder 

This area contains statistic for source files in one folder.

EModule 

This area contains statistic for one source file.

EFunction 

This area contains statistic for one function.

ESrcLine 

This area contains statistic for one source line.

EAsm 

This area contains statistic for one assembler instruction.

ERange 

This area contains statistic for one memory range, usually this is one assembler instruction.

ERanges 

This area contains statistic for memory ranges which were not found in debug information.

Member Function Documentation

◆ getAreaType()

EAreaType isys::CCoverageStatistic2::getAreaType ( )
inline

Returns coverage area type.

Python example: test_get_iterator.py

◆ getChild()

CCoverageStatistic2SPtr isys::CCoverageStatistic2::getChild ( int  idx)
inline

Returns child area for the given index (available only when complete file is loaded to memory (method createInstance() was called with isLoadDataInMemory = true)).

Python example: test_get_iterator.py

◆ getExecutionCount()

int isys::CCoverageStatistic2::getExecutionCount ( ) const
inline

Returns execution count.

For example, if this is coverage statistics for a module, this method returns number of functions in module called at least once. For function this is number of calls of a function, for lines this is number of executions of a line.

See also
getItemsCount

◆ getItemsCount()

int isys::CCoverageStatistic2::getItemsCount ( ) const
inline

Returns items count.

For example, if this is coverage statistics for a module, this method returns number of all functions in a module. For functions this is number of lines in a function.

See also
getExecutionCount

◆ getLineNumber()

virtual int isys::CCoverageStatistic2::getLineNumber ( )
virtual

Returns source line number (this method is available only for areas of type CCoverageStatistic2::ESrcLine).

Exceptions
IllegalStateExceptionif this is not line area.

◆ getNumChildren()

size_t isys::CCoverageStatistic2::getNumChildren ( )
inline

Returns the number of children areas, for example the number of source files in a folder (use only when complete file is loaded to memory (method createInstance() was called with isLoadDataInMemory = true)).

Python example: test_get_iterator.py

◆ getNumSourceLines()

virtual size_t isys::CCoverageStatistic2::getNumSourceLines ( )
virtual

This method returns the number of source lines in area of type CCoverageStatistic2::EModule.

Exceptions
IllegalStateExceptionif this is not module area.

◆ getParent()

CCoverageStatistic2SPtr isys::CCoverageStatistic2::getParent ( )
inline

Returns parent of this statistic.

Hierarchy parentArea -> childrenAreas is defined as:

images -> image -> folder -> module -> function -> line -> asm -> range

Parent information is available only when complete file is loaded into memory. If CCoverageData2::createInstance() was called with isLoadDataInMemory = false, then this method always returns null reference.

◆ getRelPath()

virtual std::string isys::CCoverageStatistic2::getRelPath ( )
virtual

Returns relative path.

This method is available only for folder and module areas.

Exceptions
IllegalStateExceptionif this is not folder or module area.

◆ getSourceLineInfo()

virtual CCoverageSourceSPtr isys::CCoverageStatistic2::getSourceLineInfo ( int  idx)
virtual

This method returns source line coverage info (available only for areas of type CCoverageStatistic2::EModule).

Exceptions
IllegalStateExceptionif this is not module area.

◆ getTextOrAbsPath()

virtual std::string isys::CCoverageStatistic2::getTextOrAbsPath ( )
virtual

Returns source line text for CCoverageStatistic2::ESrcLine areas, and absolute path for CCoverageStatistic2::EFolder and CCoverageStatistic2::EModule areas.

This method is not available for areas of other type.

Exceptions
IllegalStateExceptionif this is not line, folder or module area.