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

#include <GeneralFileManager.hh>

Inheritance diagram for utility::io::GeneralFileManagerVector:
Inheritance graph
[legend]

Public Member Functions

utility::vector1< std::string > const & get_file_contents (std::string const &filename) const
 Get a vector of file contents. Load it from disk if it has not already been loaded. More...
 
- Public Member Functions inherited from utility::SingletonBase< GeneralFileManagerVector >
 SingletonBase ()
 public constructor (the derived class must have a private constructor, of course). More...
 

Private Member Functions

 GeneralFileManagerVector ()
 Empty constructor. More...
 
 GeneralFileManagerVector (GeneralFileManagerVector const &)=delete
 Explicitly deleted copy constructor. More...
 
GeneralFileManagerVector operator= (GeneralFileManagerVector const &)=delete
 Explicitly deleted assignment operator. More...
 

Static Private Member Functions

static GeneralFileContentsVectorOP create_instance (std::string const &script_file)
 Create an instance of a GeneralFileContents object, by owning pointer. More...
 

Private Attributes

std::map< std::string, GeneralFileContentsVectorOPfilename_to_filecontents_map_
 A map of filename to file contents. More...
 

Friends

class utility::SingletonBase< GeneralFileManagerVector >
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ GeneralFileManagerVector() [1/2]

utility::io::GeneralFileManagerVector::GeneralFileManagerVector ( )
private

Empty constructor.

◆ GeneralFileManagerVector() [2/2]

utility::io::GeneralFileManagerVector::GeneralFileManagerVector ( GeneralFileManagerVector const &  )
privatedelete

Explicitly deleted copy constructor.

Member Function Documentation

◆ create_instance()

GeneralFileContentsVectorOP utility::io::GeneralFileManagerVector::create_instance ( std::string const &  filename)
staticprivate

Create an instance of a GeneralFileContents object, by owning pointer.

Needed for threadsafe creation. Loads data from disk. NOT for repeated calls!

Note
Not intended for use outside of GeneralFileManager.

References utility::filename().

Referenced by get_file_contents().

◆ get_file_contents()

utility::vector1< std::string > const & utility::io::GeneralFileManagerVector::get_file_contents ( std::string const &  filename) const

Get a vector of file contents. Load it from disk if it has not already been loaded.

Threadsafe and lazily loaded.

References create_instance(), utility::filename(), filename_to_filecontents_map_, plot::function, ptr(), utility::thread::safely_check_map_for_key_and_insert_if_absent(), and SAFELY_PASS_MUTEX.

◆ operator=()

GeneralFileManagerVector utility::io::GeneralFileManagerVector::operator= ( GeneralFileManagerVector const &  )
privatedelete

Explicitly deleted assignment operator.

Friends And Related Function Documentation

◆ utility::SingletonBase< GeneralFileManagerVector >

Member Data Documentation

◆ filename_to_filecontents_map_

std::map< std::string, GeneralFileContentsVectorOP > utility::io::GeneralFileManagerVector::filename_to_filecontents_map_
mutableprivate

A map of filename to file contents.

Referenced by get_file_contents().


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