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
fragment
FrameIterator.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
// :noTabs=false:tabSize=4:indentSize=4:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available under license.
7
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10
11
/// @file core/fragments/FrameIterator.cc
12
/// @brief
13
/// @author Oliver Lange ( olange@u.washington.edu)
14
/// @date
15
16
// Unit Headers
17
#include <
core/fragment/FrameIterator.hh
>
18
19
// Package Headers
20
#include <
core/fragment/FrameIteratorWorker_.hh
>
21
// AUTO-REMOVED #include <core/fragment/FragID_Iterator.hh>
22
23
// Project Headers
24
#include <
core/types.hh
>
25
26
// ObjexxFCL Headers
27
28
// Utility headers
29
// AUTO-REMOVED #include <utility/vector1.hh>
30
#include <utility/pointer/ReferenceCount.hh>
31
32
#include <utility/vector1.hh>
33
34
35
// std Headers
36
37
/*
38
Might change the FrameIterator to return FrameOP instead of Frame&...
39
This has the advantage of bein closer to the std:: implementations...
40
for instance one could do a
41
FrameList my_list;
42
FrameIterator it=fragset.begin(), eit=fragset.end();
43
copy( it, eit,back_inserter( my_list ));
44
45
the it-> wouldn't change, it still returns a Frame*
46
the *it would change and return a Frame* ...
47
48
*/
49
50
namespace
core {
51
namespace
fragment {
52
53
FrameIterator::FrameIterator
(
FrameIteratorWorker_OP
it ) : it_( it ) {}
54
FrameIterator::FrameIterator
() : it_( NULL ) {}
55
FrameIterator::~FrameIterator
() {}
56
57
bool
FrameIterator::operator !=
(
FrameIterator
const
& fi)
const
{
58
return
(*
it_
)!=(*fi.
it_
);
59
}
60
61
bool
FrameIterator::operator ==
(
FrameIterator
const
& fi)
const
{
62
return
(*
it_
)==(*fi.
it_
);
63
}
64
65
FrameIterator
&
FrameIterator::operator++
() {
66
++(*it_);
67
return
*
this
;
68
}
69
70
FrameIterator
&
FrameIterator::operator+
(
Size
offset ) {
71
(*it_)+( offset);
72
return
*
this
;
73
}
74
75
FrameIterator
const
&
FrameIterator::operator =
(
FrameIterator
const
& itr ) {
76
it_
=itr.
it_
;
//copy the pointers to the real iterators
77
return
*
this
;
78
}
79
80
FrameOP
FrameIterator::operator*
() {
81
return
frame_ptr
();
82
}
83
84
FrameCOP
FrameIterator::operator*
()
const
{
85
return
frame_ptr
();
86
}
87
88
FrameOP
FrameIterator::operator->
() {
89
return
frame_ptr
();
90
}
91
92
FrameCOP
FrameIterator::operator->
()
const
{
93
return
frame_ptr
();
94
}
95
96
FrameOP
FrameIterator::frame_ptr
() {
97
return
it_
->frame_ptr();
98
}
99
100
FrameCOP
FrameIterator::frame_ptr
()
const
{
101
return
it_
->frame_ptr();
102
}
103
104
105
106
}
107
}
Generated on Sat Jun 1 2013 11:32:35 for Rosetta 3.5 by
1.8.4