8 #ifndef IMPDISPLAY_WRITER_H
9 #define IMPDISPLAY_WRITER_H
11 #include <IMP/display/display_config.h>
13 #include "internal/writers.h"
22 #include <boost/format.hpp>
24 IMPDISPLAY_BEGIN_NAMESPACE
52 void set_frame(
unsigned int i);
53 int get_frame()
const {
72 for (
unsigned int i=0; i< g.size(); ++i) {
82 virtual void do_close()=0;
84 virtual void do_open()=0;
103 std::string file_name_;
131 if (file_name_.find(
"%1%") != std::string::npos) {
133 std::ostringstream oss;
134 oss << boost::format(file_name_)%get_frame();
146 IMPDISPLAYEXPORT Writer *
create_writer(std::string filename);
163 Writer* operator->()
const {
166 operator Writer*()
const {
170 Writer* get_writer()
const {
179 IMPDISPLAY_END_NAMESPACE