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
id
NamedAtomID.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/id/NamedAtomID.cc
11
/// @brief Kinematics Atom identifier
12
/// @author Phil Bradley
13
14
15
// Unit headers
16
#include <
core/id/NamedAtomID.hh
>
17
18
// AUTO-REMOVED #include <utility/exit.hh>
19
20
#include <basic/Tracer.hh>
21
#include <ObjexxFCL/string.functions.hh>
22
#include <ObjexxFCL/format.hh>
23
24
// C++ headers
25
#include <ostream>
26
27
static
basic::Tracer
tr
(
"core.id.NamedAtomID"
,basic::t_info);
28
29
namespace
core {
30
namespace
id {
31
32
std::string
NamedAtomID::to_string
()
const
{
33
return
atom
()+
" "
+ObjexxFCL::string_of(
rsd
() );
34
}
35
36
/// @brief stream << NamedAtomID
37
std::ostream &
38
operator <<
( std::ostream& os,
NamedAtomID
const
& a )
39
{
40
// os << " atom= " << a.atom() << " rsd= " << a.rsd() << ' ';
41
os <<
ObjexxFCL::fmt::A
(4,a.
atom
()) <<
" "
<< ObjexxFCL::fmt::RJ(4,a.
rsd
());
42
return
os;
43
}
44
45
46
/////////////////////////////////////////////////////////////////////////////
47
/// @brief input operator >> NamedAtomID
48
std::istream &
49
operator >>
( std::istream & is,
NamedAtomID
& e )
50
{
51
std::string
tag;
52
is >> tag;
53
if
( tag !=
"atom="
) {
54
is.setstate( std::ios_base::failbit );
55
return
is;
56
}
57
is >> e.
atom
();
58
is >> tag;
59
if
( tag !=
"rsd="
) {
60
is.setstate( std::ios_base::failbit );
61
return
is;
62
}
63
is >> e.
rsd
();
64
return
is;
65
}
66
67
/// @brief Globals
68
NamedAtomID
const
BOGUS_NAMED_ATOM_ID
(
""
, 0 );
69
NamedAtomID
const
CHAINBREAK_BOGUS_NAMED_ATOM_ID
(
""
, 0 );
70
71
72
}
// namespace id
73
}
// namespace core
Generated on Sat Jun 1 2013 11:32:49 for Rosetta 3.5 by
1.8.4