RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
TransformAgg.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// Transform aggregate class. Manages collection of child transforms
14
15#ifndef _RBTTRANSFORMAGG_H_
16#define _RBTTRANSFORMAGG_H_
17
18#include "rxdock/BaseTransform.h"
19
20namespace rxdock {
21
22// Only check transform aggregate assertions in debug build
23#ifdef _NDEBUG
24const Bool TRANSFORMAGG_CHECK = false;
25#else
26const bool TRANSFORMAGG_CHECK = true;
27#endif //_NDEBUG
28
29// Useful typedefs
30
32public:
33 // Static data member for class type (i.e. "TransformAgg")
34 static const std::string _CT;
35
37 // Constructors/destructors
38 RBTDLL_EXPORT TransformAgg(const std::string &strName = "dock");
39 virtual ~TransformAgg();
40
42 // Public methods
44
45 // Aggregate handling methods
46 virtual void Add(BaseTransform *);
47 virtual void Remove(BaseTransform *);
48 virtual bool isAgg() const;
49 virtual unsigned int GetNumTransforms() const;
50 virtual BaseTransform *GetTransform(unsigned int iTransform) const;
51
52 // WorkSpace handling methods
53 // Register scoring function with a workspace
54 // Aggregate version registers all children, but NOT itself
55 //(Aggregates are just containers, and have no need for model information
56 virtual void Register(WorkSpace *);
57 // Unregister with a workspace
58 // Aggregate version unregisters all children, but NOT itself
59 virtual void Unregister();
60
61 // Override Observer pure virtual
62 // Notify observer that subject has changed
63 // Does nothing in TransformAgg as aggregates do not require updating
64 virtual void Update(Subject *theChangedSubject);
65
66 // Request Handling method
67 virtual void HandleRequest(RequestPtr spRequest);
68
69 // Virtual function for dumping transform details to an output stream
70 // Called by operator <<
71 virtual void Print(std::ostream &s) const;
72
73protected:
75 // Protected methods
77 // Actually apply the transform
78 // Aggregate version loops over all child transforms
79 virtual void Execute();
80
81private:
83 // Private methods
85 TransformAgg(const TransformAgg &); // Copy constructor disabled by default
87 operator=(const TransformAgg &); // Copy assignment disabled by default
88
89protected:
91 // Protected data
93
94private:
96 // Private data
98 BaseTransformList m_transforms;
99};
100
101// Useful typedefs
102typedef SmartPtr<TransformAgg> TransformAggPtr; // Smart pointer
103typedef std::vector<TransformAggPtr>
104 TransformAggList; // Vector of smart pointers
105typedef TransformAggList::iterator TransformAggListIter;
106typedef TransformAggList::const_iterator TransformAggListConstIter;
107
108} // namespace rxdock
109
110#endif //_RBTTRANSFORMAGG_H_
Definition BaseTransform.h:29
Definition Subject.h:35
Definition TransformAgg.h:31
Definition WorkSpace.h:38