Rosetta
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
utility::Inline_File_Provider Class Reference

#include <inline_file_provider.hh>

Inheritance diagram for utility::Inline_File_Provider:
Inheritance graph
[legend]

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)
 
- Public Member Functions inherited from utility::SingletonBase< Inline_File_Provider >
 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_HookOPfile_provider_hooks_
 
std::vector< std::string > black_listed_files_
 

Friends

class utility::SingletonBase< Inline_File_Provider >
 

Additional Inherited Members

- Static Public Member Functions inherited from utility::SingletonBase< Inline_File_Provider >
static Inline_File_Providerget_instance ()
 Safely instantiate a singleton class in a (possibly) multithreaded context. More...
 

Member Function Documentation

◆ add_black_listed_file()

void utility::Inline_File_Provider::add_black_listed_file ( const std::string &  filename)

◆ add_file_provider_hook()

void utility::Inline_File_Provider::add_file_provider_hook ( const Inline_File_Provider_HookOP new_hook)

◆ add_input_file()

void utility::Inline_File_Provider::add_input_file ( const std::string &  filename,
const std::string &  contents 
)

◆ clear_input_files()

void utility::Inline_File_Provider::clear_input_files ( )

References input_files.

◆ file_exists()

bool utility::Inline_File_Provider::file_exists ( const std::string &  filename)

◆ find_sstream()

bool utility::Inline_File_Provider::find_sstream ( std::vector< std::pair< std::string, std::stringstream * > > &  file_catalog,
const std::string &  filename,
std::stringstream **  the_stream 
)
private

References utility::filename().

Referenced by get_sstream().

◆ get_istream()

bool utility::Inline_File_Provider::get_istream ( const std::string &  filename,
std::istream **  the_stream 
)

◆ get_ostream()

bool utility::Inline_File_Provider::get_ostream ( const std::string &  filename,
std::ostream **  the_stream 
)

◆ get_sstream()

bool utility::Inline_File_Provider::get_sstream ( const std::string &  filename,
std::stringstream **  the_stream 
)

◆ init_static_inputs()

void utility::Inline_File_Provider::init_static_inputs ( )

◆ is_black_listed_file()

bool utility::Inline_File_Provider::is_black_listed_file ( const std::string &  filename)
private

◆ remove_input_file()

void utility::Inline_File_Provider::remove_input_file ( const std::string &  filename)

◆ show_contents()

void utility::Inline_File_Provider::show_contents ( )

◆ standardise_filename()

std::string utility::Inline_File_Provider::standardise_filename ( std::string  filename)
private

Friends And Related Function Documentation

◆ utility::SingletonBase< Inline_File_Provider >

Member Data Documentation

◆ black_listed_files_

std::vector< std::string > utility::Inline_File_Provider::black_listed_files_
private

◆ file_provider_hooks_

std::vector<Inline_File_Provider_HookOP> utility::Inline_File_Provider::file_provider_hooks_
private

◆ input_files

std::vector< std::pair < std::string, std::stringstream* > > utility::Inline_File_Provider::input_files
private

◆ output_files

std::vector< std::pair < std::string, std::stringstream* > > utility::Inline_File_Provider::output_files
private

Referenced by get_ostream(), and get_sstream().


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