Rosetta
|
#include <inline_file_provider.hh>
Public Member Functions | |
void | init_static_inputs () |
void | show_contents () |
void | add_input_file (const std::string &filename, const std::string &contents) |
void | add_black_listed_file (const std::string &filename) |
void | clear_input_files () |
void | remove_input_file (const std::string &filename) |
bool | file_exists (const std::string &filename) |
bool | get_ostream (const std::string &filename, std::ostream **the_stream) |
bool | get_istream (const std::string &filename, std::istream **the_stream) |
bool | get_sstream (const std::string &filename, std::stringstream **the_stream) |
void | add_file_provider_hook (const Inline_File_Provider_HookOP &new_hook) |
![]() | |
SingletonBase () | |
public constructor (the derived class must have a private constructor, of course). More... | |
Private Member Functions | |
bool | is_black_listed_file (const std::string &filename) |
bool | find_sstream (std::vector< std::pair< std::string, std::stringstream * > > &file_catalog, const std::string &filename, std::stringstream **the_stream) |
std::string | standardise_filename (std::string filename) |
Private Attributes | |
std::vector< std::pair< std::string, std::stringstream * > > | input_files |
std::vector< std::pair< std::string, std::stringstream * > > | output_files |
std::vector< Inline_File_Provider_HookOP > | file_provider_hooks_ |
std::vector< std::string > | black_listed_files_ |
Friends | |
class | utility::SingletonBase< Inline_File_Provider > |
Additional Inherited Members | |
![]() | |
static Inline_File_Provider * | get_instance () |
Safely instantiate a singleton class in a (possibly) multithreaded context. More... | |
void utility::Inline_File_Provider::add_black_listed_file | ( | const std::string & | filename | ) |
References black_listed_files_, and utility::filename().
Referenced by nacl_rosetta::RosettaInstance::setup_file_handler().
void utility::Inline_File_Provider::add_file_provider_hook | ( | const Inline_File_Provider_HookOP & | new_hook | ) |
References file_provider_hooks_.
Referenced by nacl_rosetta::RosettaInstance::setup_file_handler().
void utility::Inline_File_Provider::add_input_file | ( | const std::string & | filename, |
const std::string & | contents | ||
) |
References utility::io::oc::cout, utility::filename(), input_files, and standardise_filename().
Referenced by get_istream(), and nacl_rosetta::RosettaInstance::setup_file_handler().
void utility::Inline_File_Provider::clear_input_files | ( | ) |
References input_files.
bool utility::Inline_File_Provider::file_exists | ( | const std::string & | filename | ) |
References utility::filename(), get_istream(), and erraser_analysis::temp.
Referenced by utility::file::file_exists().
|
private |
References utility::filename().
Referenced by get_sstream().
bool utility::Inline_File_Provider::get_istream | ( | const std::string & | filename, |
std::istream ** | the_stream | ||
) |
References add_input_file(), file_provider_hooks_, utility::filename(), get_sstream(), is_black_listed_file(), and standardise_filename().
Referenced by file_exists(), and utility::io::izstream::open().
bool utility::Inline_File_Provider::get_ostream | ( | const std::string & | filename, |
std::ostream ** | the_stream | ||
) |
References utility::io::oc::cout, utility::filename(), output_files, and standardise_filename().
bool utility::Inline_File_Provider::get_sstream | ( | const std::string & | filename, |
std::stringstream ** | the_stream | ||
) |
References utility::io::oc::cout, utility::filename(), find_sstream(), input_files, output_files, and standardise_filename().
Referenced by get_istream().
void utility::Inline_File_Provider::init_static_inputs | ( | ) |
|
private |
References black_listed_files_, utility::filename(), detail::find(), and subloop_histogram::iterator.
Referenced by get_istream().
void utility::Inline_File_Provider::remove_input_file | ( | const std::string & | filename | ) |
References utility::filename(), input_files, and subloop_histogram::iterator.
void utility::Inline_File_Provider::show_contents | ( | ) |
|
private |
References utility::filename(), and create_a3b_hbs::i.
Referenced by add_input_file(), get_istream(), get_ostream(), and get_sstream().
|
friend |
|
private |
Referenced by add_black_listed_file(), and is_black_listed_file().
|
private |
Referenced by add_file_provider_hook(), and get_istream().
|
private |
Referenced by add_input_file(), clear_input_files(), get_sstream(), and remove_input_file().
|
private |
Referenced by get_ostream(), and get_sstream().