Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RelativeSequencePosition.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 protocols/forge/build/RelativeSequencePosition.hh
11 /// @brief function objects to compute relative positions for RelativeConnectRight
12 /// @author Yih-En Andrew Ban (yab@u.washington.edu)
13 
14 #ifndef INCLUDED_protocols_forge_build_RelativeSequencePosition_hh
15 #define INCLUDED_protocols_forge_build_RelativeSequencePosition_hh
16 
17 // unit headers
19 
20 // Package headers
22 
23 /// Project headers
24 #include <core/types.hh>
25 
26 // Utility headers
27 #include <utility/pointer/ReferenceCount.hh>
28 
29 #include <utility/vector1.hh>
30 
31 
32 namespace protocols {
33 namespace forge {
34 namespace build {
35 
36 
37 /// @brief computes a position wrt values in given BuildInstruction
40  virtual RelativeSequencePositionOP clone() const = 0;
41  virtual core::Size operator ()( BuildInstructionCAP i ) const = 0;
42 };
43 
44 
45 /// @brief count starting from interval().left in a BuildInstruction
47  inline
49  return new CountFromLeft( *this );
50  }
51 
52  inline
54  return i->interval().left + left_skip + p - 1;
55  }
56 
57  /// @brief the position to re-compute using the instruction's interval: 1-based indexing
59 
60  /// @brief additionally skip 'n' positions prior to computing the position
62 };
63 
64 
65 } // namespace build
66 } // namespace forge
67 } // namespace protocols
68 
69 
70 #endif /* INCLUDED_protocols_forge_build_RelativeSequencePosition_HH */