Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RelativeConnectRight.cc
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 protocols/forge/build/RelativeConnectRight.cc
11 /// @brief version of ConnectRight instruction that depends upon results from
12 /// another BuildInstruction
13 /// @author Yih-En Andrew Ban (yab@u.washington.edu)
14 
15 // unit headers
18 
19 // project headers
20 #include <core/pose/Pose.hh>
21 
22 #include <utility/vector1.hh>
23 
24 
25 #ifdef WIN32
26 // apparently this is required for a Visual Studio build.
28 #endif
29 
30 
31 namespace protocols {
32 namespace forge {
33 namespace build {
34 
35 
36 /// @brief default constructor
38  Super()
39 {}
40 
41 
42 /// @brief RelativeSequencePosition + position on-right jump constructor
43 /// @param[in] rp RelativeSequencePosition defining the type of computation to perform.
44 /// (will be cloned)
45 /// @param[in] right_position connect at this position on 'pose_right'
46 /// @param[in] pose_right connect this pose to the right of pose_left when
47 /// modify( pose_left ) is called
49  RelativeSequencePositionOP const & rp,
50  Size const right_position,
51  Pose const & pose_right
52 ) :
53  Super( 0, right_position, pose_right ),
54  rp_( rp->clone() )
55 {}
56 
57 
58 /// @brief copy constructor
60  Super( rval ),
61  rp_( rval.rp_->clone() )
62 {}
63 
64 
65 /// @brief default destructor
67 
68 
69 /// @brief copy assignment
71  if ( this != &rval ) {
72  Super::operator =( rval );
73  rp_ = rval.rp_->clone();
74  }
75 
76  return *this;
77 }
78 
79 
80 /// @brief clone this object
82  return new RelativeConnectRight( *this );
83 }
84 
85 
86 /// @brief do the actual work of modifying the Pose
88  // modify 'left_position' to refer to proper jump takeoff wrt RelativeSequencePosition
89  // function object
90  assert( n_dependencies() == 1 );
91  left_position( (*rp_)( *dependencies().begin() ) );
92 
93  // do the actual work
94  Super::modify_impl( pose_left );
95 }
96 
97 
98 /// @brief return set of any fixed positions necessary with respect to the original
99 /// interval and original Pose numbering
100 /// @return always empty set, no fixed positions
101 /// @remarks Used for ensuring build regions for instructions do not overlap and
102 /// so that jumps may be placed correctly. There is currently no way to
103 /// represent the dependent fixed position, so we're forced to return an empty
104 /// set.
106  return Positions();
107 }
108 
109 
110 } // namespace build
111 } // namespace forge
112 } // namespace protocols