2013-04-04 16:57:15 +00:00
|
|
|
#ifndef CONDUCTORAUTONUMEROTATION_H
|
|
|
|
#define CONDUCTORAUTONUMEROTATION_H
|
|
|
|
|
2013-04-10 11:10:02 +00:00
|
|
|
#include <conductor.h>
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
class NumStrategy;
|
|
|
|
|
|
|
|
class ConductorAutoNumerotation
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//constructors & destructor
|
|
|
|
ConductorAutoNumerotation ();
|
|
|
|
ConductorAutoNumerotation(Conductor *);
|
|
|
|
~ConductorAutoNumerotation();
|
|
|
|
|
|
|
|
//methods
|
|
|
|
void setConductor(Conductor *);
|
|
|
|
void numerate();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
//methods
|
2013-04-10 11:10:02 +00:00
|
|
|
void setNumStrategy (NumStrategy *);
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
//attributes
|
|
|
|
Conductor *conductor_;
|
|
|
|
Diagram *diagram_;
|
|
|
|
QSet <Conductor *> conductor_list;
|
|
|
|
NumStrategy *strategy_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-04-10 11:10:02 +00:00
|
|
|
class NumStrategy
|
2013-04-04 16:57:15 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 11:10:02 +00:00
|
|
|
NumStrategy ();
|
2013-04-04 16:57:15 +00:00
|
|
|
virtual ~NumStrategy ();
|
2013-04-10 11:10:02 +00:00
|
|
|
virtual void createNumerotation(Conductor *, Diagram *) = 0; //cree la numerotation en fonction de la strategie utilisé
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class SamePotential: public NumStrategy
|
|
|
|
{
|
2013-04-10 11:10:02 +00:00
|
|
|
virtual void createNumerotation(Conductor *, Diagram *);
|
2013-04-04 16:57:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
bool eachIsEqual (const QStringList &);
|
|
|
|
|
|
|
|
#endif // CONDUCTORAUTONUMEROTATION_H
|