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
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
The base class for geometry.
#define IMP_CHECK_OBJECT(obj)
Perform some basic validity checks on the object for memory debugging.
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.
Provide a standard geometry processing framework.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Common base class for heavy weight IMP objects.
A smart pointer to a ref-counted Object that is a class member.
Writer * create_writer(std::string filename)
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
A nullptr-initialized pointer to an IMP Object.
Provide a standard geometry processing framework.
std::ostream & get_stream()
Get the stream for inheriting classes to write to.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
void add_geometry(RMF::FileHandle file, display::Geometry *r)
Add a single geometry to the file.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.