Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CachingScoringMethod.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/scores/CachingScoringMethod.hh
11 /// @brief adds cashing functionality to a FragmentScoringMethod object
12 /// @author Dominik Gront (dgront@chem.uw.edu.pl)
13 
14 #ifndef INCLUDED_protocols_frag_picker_scores_CachingScoringMethod_hh
15 #define INCLUDED_protocols_frag_picker_scores_CachingScoringMethod_hh
16 
17 // type headers
18 #include <core/types.hh>
19 // package headers
24 
25 #include <utility/exit.hh>
26 
27 #include <string>
28 
29 #include <utility/vector1.hh>
30 
31 
32 namespace protocols {
33 namespace frag_picker {
34 namespace scores {
35 
36 /// APL: Always always declare your OP typedefs if you're declaring a polymorphic class.
37 /// I shouldn't have to do this for you.
41 
42 
43 /// @brief
45 public:
46 
47  CachingScoringMethod(Size priority, Real lowest_acceptable_value,
48  bool use_lowest, std::string name) :
49  FragmentScoringMethod(priority, lowest_acceptable_value, use_lowest, name) {
50  }
51 
52  virtual void do_caching(VallChunkOP) = 0;
53  virtual void clean_up() = 0;
55  utility_exit_with_message( "ERROR: unimplemented cached_score() method. Your score function could not use cache\n" );
56  return true;
57  }
58  virtual bool score(FragmentCandidateOP fragment,
59  FragmentScoreMapOP scores) {
60  return score(fragment,scores); };
61 };
62 
63 } // scores
64 } // frag_picker
65 } // protocols
66 
67 
68 #endif /* INCLUDED_protocols_frag_picker_scores_CachingScoringMethod_HH */