AmpTools
MISubject.h
Go to the documentation of this file.
1
#if !defined(MINUITINTERFACE_MISUBJECT_H)
2
#define MINUITINTERFACE_MISUBJECT_H
3
4
// This file is a part of MinuitInterface - a front end for the Minuit minimization
5
// package (Minuit itself was authored by Fred James, of CERN)
6
//
7
//
8
// Copyright Cornell University 1993, 1996, All Rights Reserved.
9
//
10
// This software written by Lawrence Gibbons, Cornell University.
11
//
12
// Redistribution and use in source and binary forms, with or without
13
// modification, are permitted provided that the following conditions
14
// are met:
15
// 1. Redistributions of source code must retain the above copyright
16
// notice and author attribution, this list of conditions and the
17
// following disclaimer.
18
// 2. Redistributions in binary form must reproduce the above copyright
19
// notice and author attribution, this list of conditions and the
20
// following disclaimer in the documentation and/or other materials
21
// provided with the distribution.
22
// 3. Neither the name of the University nor the names of its contributors
23
// may be used to endorse or promote products derived from this software
24
// without specific prior written permission.
25
//
26
// Creation of derivative forms of this software for commercial
27
// utilization may be subject to restriction; written permission may be
28
// obtained from Cornell University.
29
//
30
// CORNELL MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. By way
31
// of example, but not limitation, CORNELL MAKES NO REPRESENTATIONS OR
32
// WARRANTIES OF MERCANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
33
// THE USE OF THIS SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS,
34
// COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS. Cornell University shall not be
35
// held liable for any liability with respect to any claim by the user or any
36
// other party arising from use of the program.
37
//
38
39
#include <list>
40
41
class
MIObserver
;
42
43
class
MISubject
44
{
45
46
public
:
47
48
typedef
std::list<MIObserver*>
ObserverList
;
49
50
virtual
~MISubject
();
51
52
void
attach
(
MIObserver
* );
53
void
detach
(
MIObserver
* );
54
55
void
notify
();
56
ObserverList&
observerList
() {
return
m_observerList;}
57
protected
:
58
MISubject
();
59
60
private
:
61
MISubject
(
const
MISubject
& );
// stop default
62
63
64
// --------- member data ----------
65
ObserverList m_observerList;
66
67
};
68
#endif
MISubject
Definition:
MISubject.h:43
MISubject::MISubject
MISubject()
Definition:
MISubject.cc:40
MIObserver
Definition:
MIObserver.h:41
MISubject::notify
void notify()
Definition:
MISubject.cc:60
MISubject::ObserverList
std::list< MIObserver * > ObserverList
Definition:
MISubject.h:48
MISubject::attach
void attach(MIObserver *)
Definition:
MISubject.cc:48
MISubject::detach
void detach(MIObserver *)
Definition:
MISubject.cc:54
MISubject::~MISubject
virtual ~MISubject()
Definition:
MISubject.cc:44
MISubject::observerList
ObserverList & observerList()
Definition:
MISubject.h:56
AmpTools
MinuitInterface
MISubject.h
Generated on Sun May 7 2017 06:12:49 for AmpTools by
1.8.13