8 #ifndef IMPDISPLAY_WRITER_H
9 #define IMPDISPLAY_WRITER_H
11 #include <IMP/display/display_config.h>
13 #include "internal/writers.h"
18 #include <boost/format.hpp>
20 IMPDISPLAY_BEGIN_NAMESPACE
47 void set_frame(
unsigned int i);
48 int get_frame()
const {
return frame_; }
64 for (
unsigned int i = 0; i < g.size(); ++i) {
74 virtual void do_close() = 0;
76 virtual void do_open() = 0;
93 std::string file_name_;
119 std::
string get_current_file_name()
const {
120 if (file_name_.find(
"%1%") != std::string::npos) {
122 std::ostringstream oss;
123 oss << boost::format(file_name_) % get_frame();
134 IMPDISPLAYEXPORT Writer*
create_writer(std::string filename);
150 Writer* operator->()
const {
return writer_; }
151 operator Writer*()
const {
return writer_; }
153 Writer* get_writer()
const {
return writer_; }
160 IMPDISPLAY_END_NAMESPACE
A nullptr-initialized pointer to an IMP Object.
The base class for geometry.
A smart pointer to a ref-counted Object that is a class memeber.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Base class for writing geometry to a file.
virtual void do_set_frame()
in case you want to take action on a new frame
Implement geometry for the basic shapes from IMP.algebra.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Provide a standard geometry processing framework.
#define IMP_CHECK_OBJECT(obj)
Perform some basic validity checks on the object for memory debugging.
Writer * create_writer(std::string filename)
Common base class for heavy weight IMP objects.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Implement GeometryProcessor.
std::ostream & get_stream()
Get the stream for inhereting classes to write to.