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
picking_old
concepts
Book.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
/// @file core/fragment/picking_old/concepts/Book.hh
10
/// @brief wrapper class demonstrating the Book concept
11
/// @author Yih-En Andrew Ban (yab@u.washington.edu)
12
13
#ifndef INCLUDED_core_fragment_picking_old_concepts_Book_hh
14
#define INCLUDED_core_fragment_picking_old_concepts_Book_hh
15
16
// unit headers
17
#include <
core/fragment/picking_old/concepts/Book.fwd.hh
>
18
19
// type headers
20
#include <
core/types.hh
>
21
22
#include <
core/fragment/picking_old/vall/VallResidue.hh
>
23
24
25
namespace
core {
26
namespace
fragment {
27
namespace
picking_old {
28
namespace
concepts {
29
30
31
/// @brief class demonstrating the Book concept
32
/// @remarks Class is usable as a concrete implementation of a Book.
33
template
<
typename
Pages >
34
class
Book {
35
36
37
public
:
// typedefs
38
39
40
typedef
core::Size
Size
;
41
typedef
typename
Pages::Page
Page
;
42
typedef
typename
Pages::const_iterator
PageConstIterator
;
43
typedef
typename
Pages::iterator
PageIterator
;
44
45
46
public
:
// construct/destruct
47
48
49
/// @brief default constructor
50
Book
() {}
51
52
53
/// @brief Pages constructor
54
Book
( Pages
const
&
pages
) :
pages_
( pages ) {}
55
56
57
/// @brief default destructor
58
~Book
() {}
59
60
61
public
:
// iterators
62
63
64
/// @brief return an iterator that points to the first Page in this book
65
inline
66
PageConstIterator
begin
()
const
{
67
return
pages_
.begin();
68
}
69
70
71
/// @brief return an iterator that points to the first Page in this book
72
inline
73
PageIterator
begin
() {
74
return
pages_
.begin();
75
}
76
77
78
/// @brief return an iterator that points just beyond the last Page of this book
79
inline
80
PageConstIterator
end
()
const
{
81
return
pages_
.end();
82
}
83
84
85
/// @brief return an iterator that points just beyond the last Page of this book
86
inline
87
PageIterator
end
() {
88
return
pages_
.end();
89
}
90
91
92
public
:
// page management
93
94
95
/// @brief number of pages in the book
96
inline
97
Size
size
()
const
{
98
return
pages_
.size();
99
}
100
101
102
/// @brief clear the book
103
inline
104
void
clear
() {
105
pages_
.clear();
106
}
107
108
109
protected
:
// page management
110
111
112
/// @brief return the pages in this book
113
inline
114
Pages
const
&
pages
()
const
{
115
return
pages_
;
116
}
117
118
119
/// @brief return the pages in this book
120
inline
121
Pages &
pages
() {
122
return
pages_
;
123
}
124
125
126
private
:
// data
127
128
129
/// @brief continuous section of lines from a fragment library
130
Pages
pages_
;
131
132
};
133
134
135
// Concrete version for PyRosetta
136
class
Book_VallResidues
:
public
Book
<core::fragment::picking_old::vall::VallResidues> {};
137
138
}
// concepts
139
}
// picking_old
140
}
// fragment
141
}
// core
142
143
144
#endif
/* INCLUDED_core_fragment_picking_old_concepts_Book_HH */
Generated on Sat Jun 1 2013 11:32:36 for Rosetta 3.5 by
1.8.4