src/Utility/User.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://people.web.psi.ch/adelmann/ for more details
00008  *
00009  ***************************************************************************/
00010 
00011 #ifndef USER_H
00012 #define USER_H
00013 
00014 /***********************************************************************
00015  * 
00016  * User is a base class for classes which need to be made part of a
00017  * UserList.  It provides a user ID value (obtained from the Unique
00018  * class) and a virtual function which is called when the UserList
00019  * needs the User to not be part of it anymore.
00020  *
00021  ***********************************************************************/
00022 
00023 // include files
00024 #include "Utility/Unique.h"
00025 
00026 // forward declarations
00027 class UserList;
00028 
00029 
00030 // class definition
00031 class User {
00032 
00033 public:
00034   // useful typedefs
00035   typedef Unique::type ID_t;
00036 
00037 public:
00038   // constructor
00039   User();
00040 
00041   // destructor ... nothing to do, subclasses are responsible for
00042   // doing checkin's and checkout's
00043   virtual ~User();
00044 
00045   // return the ID of this user
00046   ID_t get_Id() const { return Id; }
00047 
00048   //
00049   // virtual functions for User
00050   //
00051 
00052   // Tell the subclass that the FieldLayout is being deleted, so
00053   // don't use it anymore
00054   virtual void notifyUserOfDelete(UserList *) = 0;
00055 
00056 protected: 
00057   // Each User has a unique Id.
00058   ID_t Id;
00059 
00060 };
00061 
00062 #endif // USER_H
00063 
00064 /***************************************************************************
00065  * $RCSfile: User.h,v $   $Author: adelmann $
00066  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:33 $
00067  * IPPL_VERSION_ID: $Id: User.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $ 
00068  ***************************************************************************/

Generated on Mon Jan 16 13:23:59 2006 for IPPL by  doxygen 1.4.6