Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CandidatesCollector.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 
10 /// @file protocols/frag_picker/CandidatesCollector.hh
11 /// @brief Pure virtual base class for a container holding fragment candidates
12 /// @author Dominik Gront (dgront@chem.uw.edu.pl)
13 
14 #ifndef INCLUDED_protocols_frag_picker_CandidatesCollector_hh
15 #define INCLUDED_protocols_frag_picker_CandidatesCollector_hh
16 
17 // type headers
18 #include <utility/pointer/ReferenceCount.hh>
19 
20 // package headers
24 
26 
27 
28 namespace protocols {
29 namespace frag_picker {
30 
31 /// TODO write collector for mixed fragment lengths
32 /// @brief A base class for collecting fragments.
33 /// @detailed The purpose of a collector is to keep fragment candidates to the end
34 /// of vall processing. Then a selector will go through all the candidates stored
35 /// in a collector and select the final fragments
36 /// @see GrabAll collector for a possible implementation
38 public:
39  /// @brief Insert a fragment candidate to the container
40  virtual bool add( ScoredCandidate ) = 0;
41 
42  /// @brief removes all candidates from the container
43  virtual void clear() = 0;
44 
45  /// @brief inserts candidates from another collector
46  /// Candidates may or may not get inserted depending on the candidate and type of storage
47  virtual void insert( Size, CandidatesCollectorOP ) = 0;
48 
49  /// @brief Check how many candidates have been already collected for a given position
50  virtual Size count_candidates(Size) const = 0;
51 
52  /// @brief Check how many candidates have been already collected for all positions
53  virtual Size count_candidates() const = 0;
54 
55  /// @brief Check the size of query sequence that this object knows.
56  /// This is mainly to be ale to check if it is the same as in the other parts of
57  /// fragment picking machinery.
58  virtual Size query_length() const =0;
59 
60  virtual ScoredCandidatesVector1 & get_candidates( Size position_in_query) = 0;
61 
62  /// @brief Describes what has been collected
63  virtual void print_report(
64  std::ostream & output,
66  ) const = 0;
67 };
68 
69 } // frag_picker
70 } // protocols
71 
72 #endif /* INCLUDED_protocols_frag_picker_CandidatesCollector_HH */