byteman  1.3 (Build #225)
Bitstream relocation and manipulation tool
Public Member Functions | Public Attributes | List of all members
CommonDevice2D Class Reference

#include "CommonDevice2D.h"

Inheritance diagram for CommonDevice2D:
Inheritance graph
[legend]
Collaboration diagram for CommonDevice2D:
Collaboration graph
[legend]

Public Member Functions

 CommonDevice2D ()
 
void region (std::string, Rect2D)
 
virtual ~CommonDevice2D ()
 
- Public Member Functions inherited from CommonDevice
 CommonDevice ()
 
void log (std::string message)
 
void printMessage (std::string message)
 
void warn (std::string message)
 
virtual ~CommonDevice ()
 

Public Attributes

std::vector< Rect2DregionSelection
 
- Public Attributes inherited from CommonDevice
int enableLog
 
int enableWarn
 
std::string instanceName
 

Detailed Description

Definition at line 27 of file CommonDevice2D.h.

Constructor & Destructor Documentation

◆ CommonDevice2D()

CommonDevice2D::CommonDevice2D ( )
inline

Definition at line 30 of file CommonDevice2D.h.

31  {
32 
33  };

◆ ~CommonDevice2D()

virtual CommonDevice2D::~CommonDevice2D ( )
inlinevirtual

Definition at line 34 of file CommonDevice2D.h.

34  {
35 
36  };

Member Function Documentation

◆ region()

void CommonDevice2D::region ( std::string  ,
Rect2D   
)

Definition at line 21 of file CommonDevice2D.cpp.

21  {
22  if(params.find("clear") != string::npos) //first do the clearing
23  regionSelection.clear();
24  if(params.find("add") != string::npos){ //before potential adding
25  if(cmdRect.size.row <= 0 || cmdRect.size.col <= 0)
26  throw runtime_error("Regions need to be of positive size.");
27  regionSelection.push_back(cmdRect);
28  }
29 }
std::vector< Rect2D > regionSelection

References Coord2D::col, Coord2D::row, and Rect2D::size.

Member Data Documentation

◆ regionSelection

std::vector<Rect2D> CommonDevice2D::regionSelection

Definition at line 38 of file CommonDevice2D.h.


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