RxDock
0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
include
rxdock
Subject.h
1
/***********************************************************************
2
* The rDock program was developed from 1998 - 2006 by the software team
3
* at RiboTargets (subsequently Vernalis (R&D) Ltd).
4
* In 2006, the software was licensed to the University of York for
5
* maintenance and distribution.
6
* In 2012, Vernalis and the University of York agreed to release the
7
* program as Open Source software.
8
* This version is licensed under GNU-LGPL version 3.0 with support from
9
* the University of Barcelona.
10
* http://rdock.sourceforge.net/
11
***********************************************************************/
12
13
// Abstract Subject class for Subject-Observer design pattern. Subject will
14
// notify registered observers of any change of state of the Subject, by
15
// invoking Update method on each observer. It is up to the observer to
16
// interrogate subject as to what has changed.
17
// Main use is for Workspace which manages the model list and notifies
18
// scoring functions and transforms of any changes.
19
//
20
// Design considerations:
21
// Constructor is protected to prevent instantiation of base class.
22
// No smart pointers are used for storing observers.
23
// Subject is NOT responsible for deleting observers in destructor, but will
24
// notify registered observers of impending destruction by invoking Deleted
25
// method on each observer.
26
27
#ifndef _RBTSUBJECT_H_
28
#define _RBTSUBJECT_H_
29
30
#include "rxdock/Config.h"
31
#include "rxdock/Observer.h"
32
33
namespace
rxdock {
34
35
class
Subject
{
36
public
:
38
// Constructors/destructors
39
virtual
~Subject
();
40
42
// Public methods
44
virtual
void
Attach(
Observer
*);
45
virtual
void
Detach(
Observer
*);
46
virtual
void
Notify();
47
48
protected
:
50
// Protected methods
52
Subject
();
// Disable constructor
53
54
private
:
56
// Private methods
58
59
protected
:
61
// Protected data
63
64
private
:
66
// Private data
68
ObserverList m_observers;
69
};
70
71
}
// namespace rxdock
72
73
#endif
//_RBTSUBJECT_H_
rxdock::Observer
Definition
Observer.h:33
rxdock::Subject
Definition
Subject.h:35
Generated by
1.9.7