4 #include "GridApparance.h"
6 #include "GraphObserver_I.h"
12 //#include <boost/thread/mutex.hpp>
15 /*----------------------------------------------------------------------*\
17 \*---------------------------------------------------------------------*/
19 /*--------------------------------------*\
21 \*-------------------------------------*/
26 /*--------------------------------------*\
28 \*-------------------------------------*/
30 Graph(Title title
, Domaine domaine
, Apparance apparance
);
33 * L'intervalY du domaine du graph est calcul� automatiquement.
35 Graph(Title title
, Interval intervalX
, Apparance apparance
);
40 * Graph with title fontType TIMES_ROMAN_24
48 Graph(const Graph
& src
);
50 /*--------------------------------------*\
52 \*-------------------------------------*/
57 /*--------------------------------------*\
59 \*-------------------------------------*/
63 void add(Figure
* ptrFigure
);
65 void remove(Figure
* ptrFigure
);
67 void attach(GraphObserver_I
* observer
);
69 void detach(GraphObserver_I
* observer
);
71 void notifyAddFigure(Figure
* ptrFigure
);
73 void notifyRemoveFigure(Figure
* ptrFigure
);
77 * return true if need repaint
79 virtual bool animationStep();
83 void computeDomaine();
85 /*--------------------------------------*\
87 \*-------------------------------------*/
92 * getistFigures fourni une copie du vector de figure
94 vector
<Figure
*> getListFigures() const;
96 Figure
* getFigure(int i
);
98 GridApparance
* getGridApparance() const;
100 Apparance
* getApparance() const;
102 Title
* getTitle() const;
104 Domaine
* getDomaine() const;
106 int getFigureSize() const;
108 /*--------------------------------------*\
110 \*-------------------------------------*/
112 void setApparance(Apparance apparance
);
115 * set Title with fontType TIMES_ROMAN_24
117 void setTitle(string title
);
119 void setTitle(Title title
);
121 void setDomaine(Domaine domaine
);
123 void setIntervalX(Interval intervalX
);
125 void setGridApparance(GridApparance gridApparance
);
127 /*--------------------------------------*\
129 \*-------------------------------------*/
136 Apparance
* apparance
;
137 bool isIntervalYAuto
;
140 GridApparance
* gridApparance
;
141 vector
<Figure
*> listFigures
;
142 vector
<GraphObserver_I
*> listObserver
;
143 mutex mutexListObserver
;
144 mutex mutexListFigures
;
149 /*----------------------------------------------------------------------*\
151 \*---------------------------------------------------------------------*/