![]() |
A fuzzy logic C++ library
|
this is a pure virtual root class for the 2 type of plots for a rule base : PLOT_RB_2D and PLOT_RB_TEXT It holds common attributes (GRID) More...
#include <plot_rb.hpp>
Inheritance diagram for slifis_plot::PLOT_RB:
Collaboration diagram for slifis_plot::PLOT_RB:Public Member Functions | |
| PLOT_RB (const slifis::RULE_BASE &rule_base, int w=400, int h=300) | |
| virtual | ~PLOT_RB () |
| virtual bool | Draw ()=0 |
| Returns a bool, because in some situations, we will not be able to draw the plot (returns false). | |
| virtual std::string | GetPlotName () const =0 |
| bool | GetIndexCoordinates (int x, int y, size_t &idx_col, size_t &idx_row) const |
| Transform Screen coordinates (x,y) into index coordinates. | |
Protected Member Functions | |
| void | Resize (int w, int h) |
| Changes size of plot. | |
Protected Attributes | |
| const slifis::RULE_BASE * | rb |
| Pointer on original rule base, given through constructor. | |
| GRID | _grid |
| the grid... | |
this is a pure virtual root class for the 2 type of plots for a rule base : PLOT_RB_2D and PLOT_RB_TEXT It holds common attributes (GRID)
| slifis_plot::PLOT_RB::PLOT_RB | ( | const slifis::RULE_BASE & | rule_base, |
| int | w = 400, |
||
| int | h = 300 |
||
| ) |
| slifis_plot::PLOT_RB::~PLOT_RB | ( | ) | [virtual] |
| virtual bool slifis_plot::PLOT_RB::Draw | ( | ) | [pure virtual] |
Returns a bool, because in some situations, we will not be able to draw the plot (returns false).
Implements slifis_plot::PLOT.
Implemented in slifis_plot::PLOT_RB_TEXT, and slifis_plot::PLOT_RB_2D.
| virtual std::string slifis_plot::PLOT_RB::GetPlotName | ( | ) | const [pure virtual] |
Implements slifis_plot::PLOT.
Implemented in slifis_plot::PLOT_RB_TEXT, and slifis_plot::PLOT_RB_2D.
| bool slifis_plot::PLOT_RB::GetIndexCoordinates | ( | int | x, |
| int | y, | ||
| size_t & | idx_col, | ||
| size_t & | idx_row | ||
| ) | const |
Transform Screen coordinates (x,y) into index coordinates.
References __IN__, __OUT__, _grid, slifis_plot::PLOT::_margins, slifis_plot::GRID::GetCell(), slifis_plot::GRID_CELL::GetH(), slifis_plot::PLOT::GetH(), slifis_plot::GRID::GetNbCols(), slifis_plot::GRID::GetNbRows(), slifis_plot::GRID_CELL::GetW(), slifis_plot::PLOT::GetW(), slifis_plot::GRID_CELL::GetX(), slifis_plot::GRID_CELL::GetY(), slifis_plot::PLOT_MARGINS::m_hl, slifis_plot::PLOT_MARGINS::m_hr, slifis_plot::PLOT_MARGINS::m_vb, and slifis_plot::PLOT_MARGINS::m_vt.
Referenced by slifis_plot::PLOT_RB_TEXT::GetPositionInfo(), and Mouse_CB_rb_2D().
| void slifis_plot::PLOT_RB::Resize | ( | int | w, |
| int | h | ||
| ) | [protected] |
Changes size of plot.
References __IN__, __OUT__, and slifis_plot::PLOT::P_ChangeSize().
Referenced by slifis_plot::PLOT_RB_2D::Draw(), and slifis_plot::PLOT_RB_TEXT::p_ComputePlotSize().
const slifis::RULE_BASE* slifis_plot::PLOT_RB::rb [protected] |
Pointer on original rule base, given through constructor.
Referenced by slifis_plot::PLOT_RB_2D::Draw(), slifis_plot::PLOT_RB_TEXT::Draw(), slifis_plot::PLOT_RB_TEXT::GetPositionInfo(), slifis_plot::PLOT_RB_TEXT::p_ComputePlotSize(), slifis_plot::PLOT_RB_2D::P_DrawFiringStrength(), slifis_plot::PLOT_RB_2D::P_DrawIndexes(), PLOT_RB(), slifis_plot::PLOT_RB_2D::PLOT_RB_2D(), and slifis_plot::PLOT_RB_TEXT::SelectOutput().
GRID slifis_plot::PLOT_RB::_grid [protected] |
the grid...
Referenced by slifis_plot::PLOT_RB_2D::Draw(), slifis_plot::PLOT_RB_TEXT::Draw(), GetIndexCoordinates(), slifis_plot::PLOT_RB_TEXT::GetPositionInfo(), slifis_plot::PLOT_RB_TEXT::p_ComputePlotSize(), slifis_plot::PLOT_RB_2D::P_DrawFiringStrength(), slifis_plot::PLOT_RB_2D::P_DrawIndexes(), slifis_plot::PLOT_RB_TEXT::p_DrawSelection(), slifis_plot::PLOT_RB_TEXT::P_PrintCell(), and PLOT_RB().
1.7.6.1