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

/magnus/back_end/SessionManager/include/viewStructure.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: viewStructure.h,v 1.3 1998/02/23 17:17:50 alex Exp $
00003  */
00004 
00005 // Copyright (C) 1995 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Declarations of FE interface classes which define
00009 //           viewStructures
00010 //
00011 // Principal Author: Roger Needham
00012 //
00013 // Status: in progress
00014 //
00015 // Revision History:
00016 //
00017 
00018 #ifndef _VIEWSTRUCTURE_H_
00019 #define _VIEWSTRUCTURE_H_
00020 
00021 
00022 #include "FEData.h"
00023 #include "ARCSlotID.h"
00024 #include "ViewContents.h"
00025 
00026 
00027 //---------------------------------------------------------------------------//
00028 //--------------------------- ObjectView ------------------------------------//
00029 //---------------------------------------------------------------------------//
00030 
00031 class ObjectView
00032 {
00033 public:
00034 
00035   ObjectView(ostream& ostr, OID oid, Chars heritage);
00036 };
00037 
00038 
00039 //---------------------------------------------------------------------------//
00040 //--------------------------- ProblemView -----------------------------------//
00041 //---------------------------------------------------------------------------//
00042 
00043 class ProblemView : public FEData
00044 {
00045 public:
00046 
00047   ProblemView(ostream& o, OID oid, const Text& title, const Text& banner,
00048               const char* helpID = "none", const Chars abbreviation = "none");
00049 
00050   void startItemGroup( );
00051   void startItemGroup(const Expression& E);
00052 
00053   void add(const Text& name, ARCSlotID asi, int value = 0, bool enabled = true);
00054 
00055   void done( );
00056 
00057 private:
00058 
00059   enum StateType { INIT, ITEM_GROUP, DONE };
00060 
00061   StateType state;
00062 
00063   ostream& ostr;
00064 
00065 };
00066 
00067 // ------------------------- EnumertatorProblemView -------------------------//
00068 
00069 class EnumertatorProblemView : public FEData
00070 {
00071  public: 
00072   EnumertatorProblemView(OID oid,const Chars& title, const Chars& banner, 
00073                          const char* helpID = "none",
00074                          const Chars abbreviation = "none")
00075     : theOID( oid ),
00076     theTitle( title ),
00077     theBanner( banner ),
00078     theHelpID( helpID ),
00079     theAbbreviation( abbreviation ),
00080     theParameters("Parameters"),
00081     theSubproblems("Subproblems")
00082     { }
00083   
00084   void addProblem(const Subproblem& sp){
00085     theSubproblems.add(sp);
00086   }
00087   
00088   void addParameter(const ViewContent& c){
00089     theParameters.add(c);
00090   }
00091   
00092   void done(ostream& ostr) const;
00093 
00094   ParameterStructure extractParameters()const {
00095     return ParameterStructure(theOID, theParameters);
00096   }
00097   
00098  private:
00099   OID theOID;
00100   Chars theTitle;
00101   Chars theBanner;
00102   Chars theHelpID;
00103   Chars theAbbreviation;
00104   GroupWindow theParameters;
00105   GroupWindow theSubproblems;
00106 };
00107 
00108 
00109 #endif

Generated at Tue Jun 19 09:49:39 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001