#ifndef __pLogicalFunction_h__ #define __pLogicalFunction_h__ // ---------------------------------------------------------------------------- // WX headers inclusion. // For compilers that support precompilation, includes . // ---------------------------------------------------------------------------- #include #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include #endif //---------------------------------------------------------------------------- // Includes //---------------------------------------------------------------------------- #include "pFunctionPoint.h" #include #include #include class pLogicalFunction; //---------------------------------------------------------------------------- // Class definition //---------------------------------------------------------------------------- #define MAX_POINTS 50 //if your are going to change se sensible region you have to change MOVE in pPlotterLayer #define SENSIBLE_REGION 5 class pLogicalFunction: public wxObject { public: //---------------------------------------------------------------------------- // Constructors //---------------------------------------------------------------------------- pLogicalFunction( ); ~pLogicalFunction( ); /** *Rewind */ /*virtual void Rewind() { node = realPoints.GetFirst(); } */ /** Get locus value for next N. Override this function in your implementation. @param x Returns X value @param y Returns Y value */ /*virtual bool GetNextXY(double & x, double & y) { if(node) { pFunctionPoint* p=(pFunctionPoint*)node->GetData(); x=p->getRealX(); y=p->getRealY(); node=node->GetNext(); return true; } return false; } */ /** Get Point list of the funcion @param return points */ /*virtual*/ void GetPoints(wxList &points) { points = realPoints; } /* * validate if the function has that point in a sensible area returning the index where the point was found or -1 if is in not part of the function: define the sensible area is * x1-validPointRange