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
core
io
serialization
Pipe.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 core/io/serialization/Pipe.cc
11
/// @brief Quick typedef of a vector of PoseSP
12
/// @author Ken Jung
13
14
#include <
core/io/serialization/Pipe.fwd.hh
>
15
#include <
core/pose/Pose.hh
>
16
17
#ifdef USELUA
18
#include <luabind/iterator_policy.hpp>
19
#endif
20
21
namespace
core {
22
namespace
io {
23
namespace
serialization {
24
// this is a crutch function, luabind needs a wrapper to a stl to return a stl itr
25
Pipe
&
each
(
PipeSP
p ) {
26
return
*p;
27
}
28
29
core::pose::PoseSP
at
(
PipeSP
p,
int
idx ){
30
return
(*p)[idx];
31
}
32
33
// this is a deep copy, every PoseSP is dereferenced and copied
34
PipeSP
clone
(
PipeSP
p ) {
35
PipeSP
newpipe =
PipeSP
(
new
Pipe
);
36
for
( Pipe::iterator jtr = p->begin(); jtr != p->end(); jtr++ ){
37
newpipe->push_back(
core::pose::PoseSP
(
new
core::pose::Pose
( **jtr ) ) );
38
}
39
return
newpipe;
40
}
41
#ifdef USELUA
42
void
lregister_Pipe( lua_State * lstate ) {
43
luabind::module(lstate,
"core"
)
44
[
45
luabind::namespace_(
"io"
)
46
[
47
luabind::namespace_(
"serialization"
)
48
[
49
luabind::class_<Pipe>(
"Pipe"
)
50
.def(
"each"
, (
Pipe
& (*) (
PipeSP
) ) &
each
, luabind::return_stl_iterator)
51
.def(
"at"
, (
core::pose::PoseSP
(*) (
PipeSP
,
int
idx) ) &
at
)
52
.def(
"size"
, &
Pipe::size
)
53
]
54
]
55
];
56
}
57
#endif
58
}
//serialization
59
}
//io
60
}
//core
61
Generated on Sat Jun 1 2013 11:32:58 for Rosetta 3.5 by
1.8.4