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

#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)
 

Static Public Member Functions

static Inline_File_Providerget_instance ()
 

Private Member Functions

 Inline_File_Provider ()
 
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_
 

Static Private Attributes

static Inline_File_Providerinstance_ = NULL
 

Constructor & Destructor Documentation

utility::Inline_File_Provider::Inline_File_Provider ( )
inlineprivate

Referenced by get_instance().

Member Function Documentation

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

References black_listed_files_.

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

References file_provider_hooks_.

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

References input_files.

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

References get_istream().

Referenced by utility::file::file_exists().

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

Referenced by get_sstream().

Inline_File_Provider * utility::Inline_File_Provider::get_instance ( )
static
bool utility::Inline_File_Provider::get_istream ( const std::string &  filename,
std::istream **  the_stream 
)
bool utility::Inline_File_Provider::get_ostream ( const std::string &  filename,
std::ostream **  the_stream 
)
bool utility::Inline_File_Provider::get_sstream ( const std::string &  filename,
std::stringstream **  the_stream 
)
void utility::Inline_File_Provider::init_static_inputs ( )
bool utility::Inline_File_Provider::is_black_listed_file ( const std::string &  filename)
private

References black_listed_files_, and utility::filename().

Referenced by get_istream().

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

References input_files.

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

Member Data Documentation

std::vector< std::string > utility::Inline_File_Provider::black_listed_files_
private
std::vector<Inline_File_Provider_HookOP> utility::Inline_File_Provider::file_provider_hooks_
private
std::vector< std::pair < std::string, std::stringstream* > > utility::Inline_File_Provider::input_files
private
Inline_File_Provider * utility::Inline_File_Provider::instance_ = NULL
staticprivate

Referenced by get_instance().

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: