LOOS
4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
src
pdb_remarks.hpp
1
/*
2
This file is part of LOOS.
3
4
LOOS (Lightweight Object-Oriented Structure library)
5
Copyright (c) 2008, Tod D. Romo, Alan Grossfield
6
Department of Biochemistry and Biophysics
7
School of Medicine & Dentistry, University of Rochester
8
9
This package (LOOS) is free software: you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation under version 3 of the License.
12
13
This package is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
23
24
#if !defined(LOOS_PDB_REMARKS_HPP)
25
#define LOOS_PDB_REMARKS_HPP
26
27
28
#include <iostream>
29
#include <string>
30
#include <stdexcept>
31
#include <vector>
32
33
namespace
loos
{
34
36
41
class
Remarks
{
42
public
:
43
int
numberOf(
void
)
const
;
44
int
size(
void
)
const
;
46
std::string
get
(
const
int
i)
const
;
48
void
add
(
const
std::string s);
50
void
add
(
const
std::vector<std::string>& s);
52
void
erase
(
const
int
i);
53
54
#if !defined(SWIG)
56
std::string&
operator[]
(
const
int
i);
58
const
std::string&
operator[]
(
const
int
i)
const
;
59
61
friend
std::ostream&
operator<<
(std::ostream& os,
const
Remarks
& r);
62
#endif
// !defined(SWIG)
63
65
std::vector<std::string>
allRemarks
(
void
)
const
{
return
(remarks); }
66
67
68
private
:
69
void
rangeCheck(
const
unsigned
int
i)
const
;
70
std::string sanitize(
const
std::string s)
const
;
71
72
private
:
73
std::vector<std::string> remarks;
74
};
75
76
77
}
78
79
#endif
loos::Remarks
Class for handling PDB Remarks.
Definition
pdb_remarks.hpp:41
loos::Remarks::erase
void erase(const int i)
Erase the ith remark.
Definition
pdb_remarks.cpp:69
loos::Remarks::get
std::string get(const int i) const
Access the ith remark.
Definition
pdb_remarks.cpp:46
loos::Remarks::operator[]
std::string & operator[](const int i)
Access the ith remark.
Definition
pdb_remarks.cpp:75
loos::Remarks::operator<<
friend std::ostream & operator<<(std::ostream &os, const Remarks &r)
Output the Remark(s) in PDB format.
Definition
pdb_remarks.cpp:102
loos::Remarks::allRemarks
std::vector< std::string > allRemarks(void) const
Returns a copy of the remarks vector.
Definition
pdb_remarks.hpp:65
loos::Remarks::add
void add(const std::string s)
Add a remark.
Definition
pdb_remarks.cpp:52
loos
Namespace for most things not already encapsulated within a class.
Definition
version.cpp:3
Generated by
1.10.0