Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations

Link.h

Aller à la documentation de ce fichier.
00001 /***************************************************************************
00002                           Link.h  -  description
00003                              -------------------
00004     begin                : ven jun 27 2003
00005     copyright            : (C) 2003 by Michel Dubois, Yann Le Guyadec
00006     email                : Michel.Dubois@univ-ubs.fr, Yann.Le-Guyadec@univ-ubs.fr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef LINK_H
00019 #define LINK_H
00020 #include "Leg.h"
00021 #include "SimLink.h"
00022 #include "SimLinkedLeg.h"
00023 #include "Molecule.h"
00024 
00025 //#include "Edge.h"
00026 #ifndef LEGLINK
00027 class SimLink;
00028 #endif
00029 
00030 namespace API {
00031   class Edge;
00032   class Leg;
00033   class Molecule;
00044   class Link 
00045   {
00046     class Util;
00047     friend class Util;
00048 
00049     public:
00057       class Util {
00058         friend class Link;
00059         private:
00060           #ifndef LEGLINK
00061             SimLink * slink;
00062           #endif
00063           #ifdef LEGLINK
00064             SimLinkedLeg * slink;
00065           #endif
00066 
00067           Link * link;
00068           Util(Link * link);
00069           ~Util();
00070         public:
00071 
00075           void print() const;
00076           #ifndef LEGLINK
00077 
00083             SimLink * getSimulatedObject() const;
00084           #endif
00085           #ifdef LEGLINK
00086             SimLinkedLeg * getSimulatedObject() const;
00087           #endif
00088        };
00089 
00094       Util * util;
00095 
00096     private:
00097       Leg * leg1;
00098       Leg * leg2;
00099       Molecule * molecule;
00100 
00101       public:
00107         Molecule * getMolecule() const;
00108 
00109 
00114       Leg * getLeg1() const;
00115 
00120       Leg * getLeg2() const;
00121 
00128       bool isUsing(Leg * aLeg) const;
00129 
00136       Leg * getOtherLeg(Leg * aLeg) const;
00137 
00141       void swap();
00142   
00143     protected:
00144 
00151       Link(Leg * aLeg, Leg * anotherLeg);
00152 
00157       ~Link();
00158 
00163       void setMolecule(Molecule * aMolecule);
00164       
00165   friend class Leg;  
00166 //  friend class Edge;
00167   };
00168 }
00169 #endif

Généré le Mon Mar 1 01:29:41 2004 par doxygen 1.3.3