IMP logo
IMP Reference Guide  2.8.0
The Integrative Modeling Platform
IMP::TextOutput Class Reference

#include <IMP/file.h>

+ Inheritance diagram for IMP::TextOutput:

Detailed Description

A TextOutput can be implicitly constructed from a C++ stream, a Python filelike object or a path to a file. As a result, those can be passed directly to functions which take a TextOutput as an argument.

Files are created lazily, so TextOutput can be passed as arguments to functions that might not produce output.

IMP::atom::write_pdb(particles, "path/to/file.pdb");
IMP::atom::write_pdb(particles, my_fstream);
See Also
TextInput

Definition at line 50 of file file.h.

Public Member Functions

 TextOutput (std::string file_name, bool append=false)
 
 TextOutput (std::ostream &out, std::string name="C++ stream")
 
std::string get_name () const
 
void show (std::ostream &out=std::cout) const
 

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