OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
User.h
Go to the documentation of this file.
1// -*- C++ -*-
2/***************************************************************************
3 *
4 * The IPPL Framework
5 *
6 *
7 * Visit http://people.web.psi.ch/adelmann/ for more details
8 *
9 ***************************************************************************/
10
11#ifndef USER_H
12#define USER_H
13
14/***********************************************************************
15 *
16 * User is a base class for classes which need to be made part of a
17 * UserList. It provides a user ID value (obtained from the Unique
18 * class) and a virtual function which is called when the UserList
19 * needs the User to not be part of it anymore.
20 *
21 ***********************************************************************/
22
23// include files
24#include "Utility/Unique.h"
25
26// forward declarations
27class UserList;
28
29
30// class definition
31class User {
32
33public:
34 // useful typedefs
36
37public:
38 // constructor
39 User();
40
41 // destructor ... nothing to do, subclasses are responsible for
42 // doing checkin's and checkout's
43 virtual ~User();
44
45 // return the ID of this user
46 ID_t get_Id() const { return Id; }
47
48 //
49 // virtual functions for User
50 //
51
52 // Tell the subclass that the FieldLayout is being deleted, so
53 // don't use it anymore
54 virtual void notifyUserOfDelete(UserList *) = 0;
55
56protected:
57 // Each User has a unique Id.
59
60};
61
62#endif // USER_H
63
64/***************************************************************************
65 * $RCSfile: User.h,v $ $Author: adelmann $
66 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
67 * IPPL_VERSION_ID: $Id: User.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
68 ***************************************************************************/
unsigned int type
Definition: Unique.h:31
Definition: User.h:31
Unique::type ID_t
Definition: User.h:35
User()
Definition: User.cpp:32
ID_t get_Id() const
Definition: User.h:46
virtual ~User()
Definition: User.cpp:38
ID_t Id
Definition: User.h:58
virtual void notifyUserOfDelete(UserList *)=0