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

/magnus/back_end/SessionManager/include/SMFPGroup.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: SMFPGroup.h,v 1.9 2000/03/03 01:35:17 bormotov 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: Declaration of class SMFPGroup
00009 //
00010 // Principal Author: Roger Needham
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 #ifndef _SMFPGROUP_H_
00018 #define _SMFPGROUP_H_
00019 
00020 
00021 #include "AlgebraicObject.h"
00022 #include "FPGroup.h"
00023 #include "GIC.h"
00024 #include "GCM.h"
00025 #include "Supervisor.h"
00026 
00027 
00028 // This class is used to wrap all types of finitely presented groups,
00029 // including free ones. The main reason is the strong typing required by
00030 // the interface to the FE; if, e.g., free groups were a separate type,
00031 // we would need four kinds of maps: FP -> FP, FP -> Free, etc.
00032 // 
00033 // Unfortunately, this leads to other hassles: to do a specialized
00034 // computation for a certain kind of group, one must either `intercept'
00035 // the computation request with a specialized computation manager, or
00036 // check for the special kind in the generic computation manager.
00037 // 
00038 // This class also records information about the group which is true by
00039 // the end user's definition:
00040 // 
00041 //   * The group was entered with an empty relator set. The more general
00042 //     information that the group is free (on some set of generators) is
00043 //     recorded by the GIC.
00044 // 
00045 //   * The group was entered as an abelian (resp. nilpotent)
00046 //     presentation. The commutators are not stored in the relator set of
00047 //     the `theGroup' member (unless the end user typed them). All
00048 //     computations with abelian (resp. nilpotent) groups are intercepted
00049 //     by specialized CMs which use the commutators implicitly.
00050 
00051 //@rn Perhaps free is the only special case in this sense?
00052 
00053 
00054 //---------------------------------------------------------------------------//
00055 //--------------------------- SMFPGroup -------------------------------------//
00056 //---------------------------------------------------------------------------//
00057 
00058 class SMFPGroup : public AlgebraicObject
00059 {
00060 public:
00061 
00062   enum Checkin_Type {
00063          FP, FREE, ABELIAN, NILPOTENT, SMALL_CANCELLATION, ONE_RELATOR,
00064          AP_FREE, AP_FREE_CYCLIC, FREE_NILPOTENT, HNN_FREE, ONE_RELATOR_WITH_TORSION
00065   };
00066 
00067   /////////////////////////////////////////////////////////////////////////
00068   //                                                                     //
00069   // Constructors:                                                       //
00070   //                                                                     //
00071   /////////////////////////////////////////////////////////////////////////
00072 
00073   SMFPGroup(const FPGroup& G, const Chars heritage, Checkin_Type t = FP,
00074             Chars def = Chars());
00075 
00076   SMFPGroup( ) : AlgebraicObject( "" ), gic( oid() ), theGCM( 0 ) { }
00077   //@rn Bogus ctor; see `But no' comment in Menu.h.
00078 
00079   /////////////////////////////////////////////////////////////////////////
00080   //                                                                     //
00081   // Accessors:                                                          //
00082   //                                                                     //
00083   /////////////////////////////////////////////////////////////////////////
00084 
00085   FPGroup getFPGroup( ) const { return theGroup; }
00086 
00087   FreeGroup getFreePreimage( ) const { return theFreePreimage; }
00088   // When this group is F/R, it may be handy to have F.
00089 
00090   GCM& gcm() const { return *theGCM; }
00091 
00092   Checkin_Type getCheckinType( ) const { return checkin_type; }
00093 
00094   Chars getCheckinTypeStr( ) const;
00095   // Returns the checkin_type as a string of characters.
00096   
00097   
00098         InformationCenter* infoCenter()       { return &gic; }
00099   const InformationCenter* infoCenter() const { return &gic; }
00100 
00101   /////////////////////////////////////////////////////////////////////////
00102   //                                                                     //
00103   // Front End Interfacing:                                              //
00104   //                                                                     //
00105   /////////////////////////////////////////////////////////////////////////
00106 
00107   static const char* type( ) { return "SMFPGroup"; }
00108 
00109   const IconID iconID( ) const { return IconID::group; }  // overrides SMObject
00110 
00111   const char* typeID( ) const { return type(); }          // overrides SMObject
00112 
00113   void viewStructure(ostream& ostr) const;                // overrides SMObject
00114 
00115   void printProperties(ostream& ostr) const;              // overrides SMObject
00116 
00117   void printDefinition(ostream& ostr) const;              // overrides SMObject
00118 
00119   static void printGlobalMessageTemplates(ostream& ostr) {
00120 
00121     ostr << "init_map_gens_msg_ {${viewID} " << GENS_MAP_REQUEST
00122          << " ${oid2} ${message} }" << endl;
00123     
00124   }
00125 
00126 protected:
00127 
00128   /////////////////////////////////////////////////////////////////////////
00129   //                                                                     //
00130   // Restricted Access:                                                  //
00131   //                                                                     //
00132   /////////////////////////////////////////////////////////////////////////
00133 
00134   void readMessage(istream&);                          // overrides SMObject
00135 
00136 
00137   /////////////////////////////////////////////////////////////////////////
00138   //                                                                     //
00139   // Data Members:                                                       //
00140   //                                                                     //
00141   /////////////////////////////////////////////////////////////////////////
00142 
00143 public:
00144 
00145   GIC gic;
00146 
00147 private:
00148 
00149   // These are the tags for messages handled by objects in this class:
00150   enum MessageTag {
00151     GENS_MAP_REQUEST
00152   };
00153 
00154   GCM* theGCM;  // TheObjects removes theGCM when this is removed.
00155 
00156   const FPGroup theGroup;
00157 
00158   const FreeGroup theFreePreimage;
00159 
00160   Checkin_Type  checkin_type;
00161 
00162   Chars definition;
00163   
00164 };
00165 
00166 #endif

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