Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
moves
ResId.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
11
/// @brief
12
/// @author Sarel Fleishman (sarelf@uw.edu)
13
14
// Unit Headers
15
#include <
core/types.hh
>
16
#include <
protocols/moves/ResId.hh
>
17
#include <utility/pointer/ReferenceCount.fwd.hh>
18
// AUTO-REMOVED #include <protocols/filters/Filter.hh>
19
// AUTO-REMOVED #include <protocols/moves/Mover.hh>
20
// AUTO-REMOVED #include <protocols/protein_interface_design/DockDesign.hh>
21
// AUTO-REMOVED #include <boost/foreach.hpp>
22
23
#include <
protocols/filters/Filter.fwd.hh
>
24
#include <utility/pointer/ReferenceCount.hh>
25
26
#define foreach BOOST_FOREACH
27
28
namespace
protocols {
29
namespace
moves {
30
31
ResId::ResId
() {
32
modifiable
(
true
);
33
}
34
35
ResId::~ResId
() {}
36
37
ResId::ResId
(
core::Size
const
r ){
38
set_resid
( r );
39
modifiable
(
true
);
40
}
41
42
core::Size
43
ResId::get_resid
()
const
{
44
return
(
resid_
);
45
}
46
47
core::Size
&
48
ResId::get_resid
(){
49
return
(
resid_
);
50
}
51
52
bool
53
ResId::modifiable
()
const
{
54
return
(
modifiable_
);
55
}
56
57
void
58
ResId::modifiable
(
bool
const
u ) {
59
modifiable_
= u;
60
}
61
62
void
63
ResId::set_resid
(
core::Size
const
r ){
64
resid_
= r;
65
}
66
67
/// @details a recursive function that sets the resid of obj to the resid parameter.
68
/// If the type of obj is a CompoundFilter or a DockDesignMover then each of the
69
/// members of these containers are probed to see whether they are ResId types.
70
/// Recursion ensures that any nesting structure would be supported.
71
/// Non-ResId objects will pass through this function without being changed.
72
void
73
modify_ResId_based_object
( utility::pointer::ReferenceCountOP
const
obj,
core::Size
const
resid ){
74
using namespace
protocols::filters;
75
76
ResId
* resid1 =
dynamic_cast<
ResId
*
>
( obj() );
77
bool
const
is_this_a_resid( resid1 );
78
if
( is_this_a_resid ){
79
if
( resid1->modifiable() )
80
resid1->set_resid( resid );
81
}
82
}
83
84
}
// moves
85
}
// protocols
Generated on Sat Jun 1 2013 12:00:36 for Rosetta 3.5 by
1.8.4