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

/magnus/back_end/SessionManager/include/ARCSlotID.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: ARCSlotID.h,v 1.2 1998/02/23 17:17:40 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: Declaration of interface class ARCSlotID
00009 //
00010 // Principal Author: Roger Needham
00011 //
00012 // Status: complete
00013 //
00014 // Revision History:
00015 //
00016 
00017 #ifndef _ARCSLOTID_H_
00018 #define _ARCSLOTID_H_
00019 
00020 
00021 #include <iostream.h>
00022 
00023 
00024 //---------------------------------------------------------------------------//
00025 //---------------------------- ARCSlotID ------------------------------------//
00026 //---------------------------------------------------------------------------//
00027 
00028 class ARCSlotID
00029 {
00030 public:
00031 
00032   bool operator == ( const ARCSlotID& asi ) const {
00033          return theARCSlotID == asi.theARCSlotID;
00034   }
00035 
00036   bool operator != ( const ARCSlotID& asi ) const {
00037          return theARCSlotID != asi.theARCSlotID;
00038   }
00039 
00040   inline friend ostream& operator << ( ostream& ostr, const ARCSlotID& asi ) {
00041          return ostr << asi.theARCSlotID;
00042   }
00043 
00044   int unwrap( ) const { return theARCSlotID; }
00045   // We don't want a conversion, even for friends, because of possible
00046   // ambiguity. Making this private creates friendship problems for
00047   // classes in the scope of another class. It seems safe enough to
00048   // permit public unwrapping, since only friends can rewrap.
00049 
00050 protected:
00051 
00052   friend class ComputationManager;
00053   friend class Supervisor;
00054   friend class EnumeratorSupervisor;
00055 
00056   ARCSlotID( int i ) : theARCSlotID( i ) { }
00057   // Used by classes ComputationManager,  Supervisor.
00058 
00059   ARCSlotID( );  // Hidden, not to be implemented.
00060 
00061   int theARCSlotID;
00062 
00063 };
00064 
00065 
00066 struct ThisARCSlotID : public ARCSlotID {
00067   ThisARCSlotID( ) : ARCSlotID( 0 ) { }
00068 };
00069 // By convention, ARCSlotID( 0 ) refers to the Supervisor itself.
00070 // See Supervisor.h.
00071 
00072 #endif

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