Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SilentObserver.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file
11 /// @brief
12 /// @author
13 
14 #ifndef INCLUDED_protocols_viewer_SilentObserver_hh
15 #define INCLUDED_protocols_viewer_SilentObserver_hh
16 
17 
18 // Unit headers
20 
21 // Package headers
22 // AUTO-REMOVED #include <core/io/silent/SilentFileData.hh>
24 
25 #include <core/pose/Pose.fwd.hh>
26 // AUTO-REMOVED #include <core/pose/signals/DestructionEvent.fwd.hh>
28 
29 // Project headers
30 #include <utility/pointer/ReferenceCount.hh>
31 #include <utility/pointer/owning_ptr.hh>
32 #include <utility/signals/Link.hh>
33 
34 #include <utility/vector1.hh>
35 #include <iostream>
36 
37 
38 namespace protocols {
39 namespace viewer {
40 
41 // base class
43 
44 private:
45 
47 
48 public:
49 
51 
52  /// @brief default constructor
54 
55  /// @brief constructor
56  SilentObserver( std::string const & name, bool fullatom );
57 
58  /// @brief default destructor
59  virtual ~SilentObserver();
60 
61 private: // disallow copy
62 
63  /// @brief disallow copy constructor
64  // NOTE: if implementing copy constructor, remember to abstain from copying
65  // energy_event_link_ as there is no transferral of subject Pose upon copy
66  SilentObserver( SilentObserver const & rval );
67 
68  /// @brief disallow copy assignment
69  // NOTE: if implementing copy assignment, remember to leave energy_event_link_
70  // untouched as any current subject Pose is kept on copy assign
71  SilentObserver & operator =( SilentObserver const & rval );
72 
73 public :
74 
75  /// @brief attach to a Pose
76  void
77  attach_to( Pose & pose );
78 
79  /// @grief detach from Pose
80  void
81  detach_from();
82 
83  /// @brief upon receiving an EnergyEvent write to silent file
84  void
86 
87 private:
89  bool fullatom_;
92  utility::signals::Link energy_event_link_;
93 
94 };
95 
96 } // viewer
97 } // protocols
98 
99 
100 #endif