RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
AnnotationHandler.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// Base implementation class for managing an annotation list. Scoring function
14// classes wishing to store annotations for later retrieval should derive from
15// this class.
16
17#ifndef _RBTANNOTATIONHANDLER_H_
18#define _RBTANNOTATIONHANDLER_H_
19
20#include "rxdock/Annotation.h"
21
22#include <nlohmann/json.hpp>
23
24using json = nlohmann::json;
25
26namespace rxdock {
27
29public:
30 static const std::string _ANNOTATION_FIELD;
31
33 // Constructors/destructors
34 virtual ~AnnotationHandler(); // Default destructor
35
36 friend void to_json(json &j, const AnnotationHandler &annotationHandler);
37 friend void from_json(const json &j, AnnotationHandler &annotationHandler);
38
40 // Public methods
42 bool isAnnotationEnabled() const;
43 // Get a const ref to the annotation list (read-only)
44 const AnnotationList &GetAnnotationList() const;
45 int GetNumAnnotations() const;
46 void RenderAnnotationList(const std::string &strName,
47 std::vector<std::string> &retVal) const;
48
49protected:
51 // Protected methods
53 RBTDLL_EXPORT AnnotationHandler();
54 void AddAnnotation(AnnotationPtr spAnnotation) const;
55 void ClearAnnotationList() const;
56 void EnableAnnotations(bool bEnabled) const;
57
58private:
60 // Private methods
63 const AnnotationHandler &); // Copy constructor disabled by default
65 operator=(const AnnotationHandler &); // Copy assignment disabled by default
66
67protected:
69 // Protected data
71
72private:
74 // Private data
76 mutable bool m_bEnabled;
77 mutable AnnotationList m_annotationList;
78};
79
80void to_json(json &j, const AnnotationHandler &annotationHandler);
81void from_json(const json &j, AnnotationHandler &annotationHandler);
82
83} // namespace rxdock
84
85#endif //_RBTANNOTATIONHANDLER_H_
Definition AnnotationHandler.h:28
Definition SmartPointer.h:48