Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Field.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 // :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/io/pdb/Field.hh
12 ///
13 /// @brief Each line of a PDB file is a Record which is divided into Fields
14 /// @author Matthew O'Meara (mattjomeara@gmail.com)
15 
16 #ifndef INCLUDED_core_io_pdb_Field_hh
17 #define INCLUDED_core_io_pdb_Field_hh
18 
19 
20 // Unit headers
21 #include <core/io/pdb/Field.fwd.hh>
22 #include <core/types.hh>
23 
24 // Utility headers
25 #include <utility/Show.hh>
26 
27 
28 // c++ headers
29 #include <iostream>
30 #include <string>
31 
32 namespace core {
33 namespace io {
34 namespace pdb {
35 
36 
37 /// @brief Data type Class to represent one field in PDB file.
38 class Field : public utility::Show {
39 public:
40 
41  Field();
42  Field(Size s, Size e);
43  Field(std::string type_, Size s, Size e);
44 
45  /// @brief read field value from given string.
46  void getValueFrom(std::string source);
47 
48 /// This class is intended to be just 'data' type class
49 /// no need to make it private.
50 public:
51 
52  /// @brief string value of field, type of the field.
54 
55  /// @brief begining position in line, ending postion in line
57 
58  /// @brief Debug output.
59  friend
60  std::ostream&
61  operator <<(std::ostream &os, Field const & F);
62 
63  /// @brief collection builder
64  static RecordRef & getRecordCollection();
65 
66 private:
67 
68  /// @brief static holder for collection.
70 
71 };
72 
73 
74 /// @brief Debug printing, serialazing to Tracer like object.
75 std::ostream&
76 operator <<(std::ostream &os, Record const & R);
77 
78 } // namespace
79 } // namespace
80 } // namespace
81 
82 #endif // include guard