Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FormatStringOutputter.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=1 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/outputter/FormatStringOutputter.hh
11 /// @brief An abstract base class that implements format string parsing
12 /// @author Ken Jung
13 
14 #ifndef INCLUDED_protocols_outputter_FormatStringOutputter_hh
15 #define INCLUDED_protocols_outputter_FormatStringOutputter_hh
16 
17 // Unit Headers
20 
21 // Project headers
24 #include <boost/unordered_map.hpp>
25 
26 namespace protocols {
27 namespace outputter {
28 
29  using namespace core::io::serialization;
30  using core::pose::PoseSP;
31 
32 #ifdef USELUA
33  void lregister_FormatStringOutputter( lua_State * lstate );
34 #endif
35 
37 
38  public:
40  virtual ~FormatStringOutputter();
41 
42  std::string format_string() { return format_string_; }
43  void format_string( std::string s ) { format_string_ = s; }
44 
45  virtual void write( PipeMap & p );
46  virtual void write( Pipe & p );
47  virtual void write( Pose & p )=0;
48 
49  void parse_format_string( boost::unordered_map< std::string, std::string> & filenameparts, std::string const & format_string, std::string & filename );
50 #ifdef USELUA
51  virtual void parse_def( utility::lua::LuaObject const & def,
52  utility::lua::LuaObject const & tasks );
53  virtual void lregister( lua_State * lstate );
54 #endif
55 
56  // factory functions but this won't actually be created
57  OutputterSP create();
58  static std::string name() {
59  return "FormatStringOutputter";
60  }
61 
62  protected:
63  boost::unordered_map<std::string, std::string> filenameparts_;
65 
66 }; // end
67 
68 } // outputter
69 } // protocols
70 
71 
72 #endif //INCLUDED_protocols_outputter_FormatStringOutputter_hh