IMP  2.1.1
The Integrative Modeling Platform
IMP::display::TextWriter Class Reference

#include <IMP/display/Writer.h>

+ Inheritance diagram for IMP::display::TextWriter:

Public Member Functions

 TextWriter (base::TextOutput fn)
 Create a writer opening the file with the passed sink. More...
 
 TextWriter (std::string name)
 Create a write for a file or files with the passed name or pattern. More...
 
virtual ~TextWriter ()
 Write the data and close the file.
 
std::string get_current_file_name () const
 get the name of the current file being writter
 
- Public Member Functions inherited from IMP::display::Writer
 Writer (std::string name)
 Create a writer opening the file with the passed name.
 
virtual ~Writer ()
 Write the data and close the file.
 
void set_frame (unsigned int i)
 
int get_frame () const
 
void add_geometry (Geometry *g)
 
void add_geometry (const Geometries &g)
 
- Public Member Functions inherited from IMP::base::Object
virtual void clear_caches ()
 
virtual void do_destroy ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
virtual VersionInfo get_version_info () const
 Get information about the module and version of the object.
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 
virtual std::string get_type_name () const
 

Protected Member Functions

virtual void do_set_frame ()
 in case you want to take action on a new frame
 
std::ostream & get_stream ()
 Get the stream for inhereting classes to write to.
 
void open ()
 
- Protected Member Functions inherited from IMP::display::Writer
virtual void do_close ()=0
 A hook for implementation classes to use to take actions on file close.
 
virtual void do_open ()=0
 A hook for implementation classes to use to take actions on file open.
 
- Protected Member Functions inherited from IMP::display::GeometryProcessor
virtual bool handle_anything (Geometry *, Color, std::string)
 
virtual bool handle_bounding_box (BoundingBoxGeometry *, Color, std::string)
 
virtual bool handle_cylinder (CylinderGeometry *, Color, std::string)
 
virtual bool handle_ellipsoid (EllipsoidGeometry *, Color, std::string)
 
void handle_geometry (Geometry *g)
 
virtual bool handle_label (LabelGeometry *, Color, std::string)
 
virtual bool handle_point (PointGeometry *, Color, std::string)
 
virtual bool handle_polygon (PolygonGeometry *, Color, std::string)
 
virtual bool handle_segment (SegmentGeometry *, Color, std::string)
 
virtual bool handle_sphere (SphereGeometry *, Color, std::string)
 
virtual bool handle_surface_mesh (SurfaceMeshGeometry *, Color, std::string)
 
virtual bool handle_triangle (TriangleGeometry *, Color, std::string)
 
- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
 Object ()
 

Detailed Description

A base class for writers which write to text files. By default, separate frames are stored in separate files. To change this, override the do_set_frame() method.

Note
If you inherit from this class, you must use the IMP_TEXT_WRITER() macro and not provide any additional constructors. Sorry, it is necessary in order to ensure that the derived classes handler for opening a file is successfully called, as it can't be directly called from the TextWriter constructor.

Definition at line 92 of file Writer.h.

Constructor & Destructor Documentation

IMP::display::TextWriter::TextWriter ( base::TextOutput  fn)

Frames are not supported with this constructor when using a format such as CMM or Chimera that writes multiple frames to different files.

IMP::display::TextWriter::TextWriter ( std::string  name)

The name should contain %1% if you want to write different frames to separate files. Otherwise, it will either write all frames to the same file (Pymol) or overwrite the file with each new frame, Chimera, CMM.


The documentation for this class was generated from the following file: