A writer object accumulates geometry and then writes a file when the object is destroyed. You must set the name of the file being written to before writing using the IMP::display::Writer::set_file_name() method.
Public Member Functions | ||||
def | __disown__ | |||
void | close () | |||
Close the stream. You shouldn't need this, but it doesn't hurt. | ||||
bool | get_stream_is_open () | |||
Return whether a file is open for writing. | ||||
virtual void | set_file_name (std::string name) | |||
Open a new file with the given name. | ||||
virtual void | set_output (TextOutput f) | |||
Writer (std::string name) | ||||
Writer (TextOutput fn, std::string name) | ||||
Create a writer opening the file with the passed name. | ||||
virtual | ~Writer () | |||
Write the data and close the file. | ||||
Geometry Addition methods | ||||
These methods can be used to add geometry to the model. If you do not want the geometry objects to be destroyed upon addition, make sure you store an IMP::Pointer to them externally.
| ||||
void | add_geometry (const Geometries &g) | |||
void | add_geometry (Geometry *g) | |||
Protected Member Functions | ||||
std::ostream & | get_stream () | |||
Get the stream for inhereting classes to write to. | ||||
virtual void | on_close ()=0 | |||
A hook for implementation classes to use to take actions on file close. | ||||
virtual void | on_open ()=0 | |||
A hook for implementation classes to use to take actions on file open. |
virtual void IMP::display::Writer::set_file_name | ( | std::string | name | ) | [virtual] |
Open a new file with the given name.
Set it to "" to close.