Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ResId.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 src/protocols/moves/ResId.hh
11 /// @brief A simple base class providing common access to a residue identity for movers and filters.
12 /// The anticipated usage is to derive movers and filters multiply, from the relevant base class and
13 /// from ResId and make these movers/filters use the residue id encapsulated in this class.
14 /// @author Sarel Fleishman (sarelf@uw.edu)
15 
16 #ifndef INCLUDED_protocols_moves_ResId_hh
17 #define INCLUDED_protocols_moves_ResId_hh
18 
19 #include <core/types.hh>
20 // AUTO-REMOVED #include <utility/pointer/ReferenceCount.hh>
22 
23 #include <utility/pointer/ReferenceCount.fwd.hh>
24 
25 
26 namespace protocols {
27 namespace moves {
28 
29 
30 //// Override the get and set methods in containers of ResId objects (see CompoundStatementFilter and DockDesignMover for examples)
31 class ResId{
32 public:
33  ResId();
34  ResId( core::Size const r );
35  virtual void set_resid( core::Size const r );
36  virtual core::Size get_resid() const;
37  virtual core::Size & get_resid();
38  /// @brief should another method be able to modify resid_. This is used by modify_ResId_based_object as a test
39  virtual bool modifiable() const;
40  virtual void modifiable( bool const u );
41  virtual ~ResId();
42 private:
44  bool modifiable_;// defaults to true
45 };
46 
47 /// @brief Checks whether a referencecount object is a derived from ResId and if so, sets its resid
48 void
49 modify_ResId_based_object( utility::pointer::ReferenceCountOP const obj, core::Size const resid );
50 
51 } // moves
52 } // protocols
53 
54 #endif