Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Recon.h

Go to the documentation of this file.
00001 // $Id: Recon.h,v 1.4 2001/01/26 02:09:31 burnett Exp $
00002 
00003 #ifndef __RECON_H
00004 #define __RECON_H 1
00005 
00006 #include "reconstruction/LbldData.h"
00007 #include <iostream>
00008 #include <list>
00009 
00010 class ReconVisitor;
00011 namespace gui { class DisplayRep; }
00012 
00013 class Recon;
00014 typedef std::list<Recon *> ReconList;
00015 typedef std::list<Recon *>::iterator ReconListIterator;
00016 typedef std::list<Recon *>::const_iterator ReconListConstIterator;
00017 
00018 
00019 
00020 class Recon 
00021 {
00022 public:
00023     
00024     enum ReconState {RESET, DONE, FAIL};
00025     
00026     Recon ();
00027     
00028     Recon (Recon* prnt);
00029     
00030     virtual ~Recon ();
00031     
00032     
00033     virtual Recon& addRecon (Recon* nextRecon);
00034     
00035     virtual Recon& removeRecon (Recon* oldRecon);
00036     
00037     Recon& setParent (Recon* rc)
00038     {
00039         _parent = rc; return *this;
00040     }
00041     
00042     void deleteRecons ();
00043     
00044     virtual const char* nameOf () const
00045     {
00046         return "Recon"; 
00047     }
00048     
00049     Recon& setTitle (const char* newTitle);
00050     
00051     const char* title () const
00052     {
00053         return _title? _title : "no title";
00054     }
00055     
00056     virtual void clear ();
00057     
00058     virtual void accept (ReconVisitor& a);
00059     
00060     virtual void readData (std::istream& is);
00061     
00062     virtual void writeData (std::ostream& os);
00063     
00064     enum Recon::ReconState state () const
00065     {
00066         return _state;
00067     }
00068     
00069     void setState (enum Recon::ReconState s)
00070     {
00071         _state = s;
00072     }
00073     
00074     //  Printing and GUI Methods
00075     virtual void printOn (std::ostream& os = std::cout) const;
00076 
00078     gui::DisplayRep* displayRep();
00079 
00081     virtual void draw (gui::DisplayRep& v);
00082     
00083     // Data Members for Associations
00084     
00085     LbldData data;
00086     
00087     int & mode(){return s_mode;}
00088 private:
00089         
00090     class Rep;  // nested class, forward declaration
00091     char* _title;
00092     enum Recon::ReconState _state;
00093     //  The Recon which depends on this, null for root
00094     Recon *_parent;
00095     ReconList  _reconList;
00096     
00097     static int s_mode; // mode that can be set, examined
00098 };
00099 
00100 #endif

Generated at Wed Nov 21 12:20:45 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000