Version 6 (modified by 15 years ago) (diff) | ,
---|
La Structure de Données Lofig
La structure de données {{Lofig}} est conçue pour représenter les netlists en mémoire. Les attributs des différents objets constituants cette structure ont été présentés en cours. Nous allons maintenant compléter avec les déclarations des fonctions membres.
Fonctions membres de la class Locon
Les constructeurs :
- Un
Locon
peut appartenir, soit à un modèle (Lofig
), soit à une instance (Loins
). Il y aura donc deux constructeurs correspondants à chacune de ces possibilités. On fournit en outre son nom et sa direction. Le type sera déduit à partir du constructeur appelé.Locon ( Lofig*, const std::string& name, unsigned int dir );
Locon ( Loins*, const std::string& name, unsigned int dir );
Les accesseurs :
std::string getName ();
Losig* getSignal ();
Lofig* getModel ();
Loins* getInstance ();
unsigned int getDirection();
Les modificateurs (mutators, en VO) :
- Un
Locon
peut (doit) être associé à un signal. On pourra le faire de deux façons différentes, soit en donnant explicitement un pointeur sur leLosig
, soit en indiquant simplement le nom du signal.void setSignal ( Losig* );
void setSignal ( const std::string& );
- Positionnement de la direction :
void setDirection ( unsigned int );
De plus, le code de trois fonctions membres vous sont fournies pour pouvoir
afficher l'objet dans un flux. Dans Locon.h
:
class Locon { public: static std::string typeToString ( unsigned int ); static std::string dirToString ( unsigned int ); public: void xmlDrive ( std::ostream& ); };
Fonctions membres de la class Losig
Le constructeur :
Losig ( Lofig*, const std::string&, unsigned int type );
Les arguments correspondent respectivement à la Lofig
auxquel le
signal appartient, son nom et son type. L'identificateur sera demandé
directement à la Lofig
dans le corps du constructeur.
Les accesseurs :
Lofig* getOwner ();
std::string& getName ();
unsigned int getId ();
unsigned int getType ();
Le code de la fonction utilitaire d'affichage dans un flux : Losig-Skeleton.cpp
Attachments (12)
- fulladder-1.png (14.4 KB) - added by 15 years ago.
- fulladder-2.png (25.9 KB) - added by 15 years ago.
- Library-1.png (5.0 KB) - added by 15 years ago.
-
Locon-Skeleton.cpp (963 bytes) - added by 15 years ago.
Skeleton of Locon.cpp
-
Losig-Skeleton.cpp (256 bytes) - added by 15 years ago.
Skeleton of Losig.cpp
-
Loins-Skeleton.cpp (475 bytes) - added by 15 years ago.
Skeleton of Loins.cpp
-
Lofig-Skeleton.cpp (1.3 KB) - added by 15 years ago.
Skeleton of Lofig.cpp
-
Indentation.h (520 bytes) - added by 15 years ago.
Indentation Header
-
Indentation.cpp (974 bytes) - added by 15 years ago.
Indentation C++ Module
-
Library.h (586 bytes) - added by 15 years ago.
Mini cell (Lofig) library C++ header
-
Library.cpp (2.2 KB) - added by 15 years ago.
Mini cell (Lofig) library C++ module
-
Main-Skeleton.cpp (1.5 KB) - added by 15 years ago.
Main C++module
Download all attachments as: .zip