15 #include "load_prc_file.h" 16 #include "configPageManager.h" 17 #include "configVariableManager.h" 18 #include "virtualFileSystem.h" 19 #include "config_express.h" 20 #include "config_util.h" 42 load_prc_file(
const Filename &filename) {
53 if (file == (istream *)NULL) {
55 <<
"Unable to open " << path <<
"\n";
60 <<
"Reading " << path <<
"\n";
63 bool read_ok = page->
read_prc(*file);
71 <<
"Unable to read " << path <<
"\n";
90 load_prc_file_data(
const string &name,
const string &data) {
104 <<
"Unable to read explicit prc data " << name <<
"\n";
137 hash_prc_variables(
HashVal &hash) {
141 hash.hash_string(strm.str());
144 #endif // HAVE_OPENSSL void write_prc_variables(ostream &out) const
Writes all of the prc-set config variables, as they appear in a prc file somewhere, one per line, very concisely.
bool resolve_filename(Filename &filename, const DSearchPath &searchpath, const string &default_extension=string()) const
Searches the given search path for the filename.
A hierarchy of directories and files that appears to be one continuous file system, even though the files may originate from several different sources that may not be related to the actual OS's file system.
istream * open_read_file(const Filename &filename, bool auto_unwrap) const
Convenience function; returns a newly allocated istream if the file exists and can be read...
void set_text()
Indicates that the filename represents a text file.
Stores a 128-bit value that represents the hashed contents (typically MD5) of a file or buffer...
static void close_read_file(istream *stream)
Closes a file opened by a previous call to open_read_file().
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...
A global object that maintains the set of ConfigPages everywhere in the world, and keeps them in sort...
The name of a file, such as a texture file or an Egg file.
bool read_prc(istream &in)
Reads the contents of a complete prc file, as returned by the indicated istream, into the current pag...
static VirtualFileSystem * get_global_ptr()
Returns the default global VirtualFileSystem.
A page of ConfigDeclarations that may be loaded or unloaded.
void set_trust_level(int trust_level)
Explicitly sets the trust level on this particular page.
bool delete_explicit_page(ConfigPage *page)
Removes a previously-constructed ConfigPage from the set of active pages, and deletes it...
ConfigPage * make_explicit_page(const string &name)
Creates and returns a new, empty ConfigPage.
DSearchPath & get_search_path()
Returns the search path used to locate implicit .prc files.