47 if (file ==
nullptr) {
49 <<
"Unable to open " << path <<
"\n";
54 <<
"Reading " << path <<
"\n";
57 bool read_ok = page->
read_prc(*file);
65 <<
"Unable to read " << path <<
"\n";
82 std::istringstream strm(data);
95 <<
"Unable to read explicit prc data " << name <<
"\n";
123 hash_prc_variables(
HashVal &hash) {
124 std::ostringstream strm;
127 hash.hash_string(strm.str());
130 #endif // HAVE_OPENSSL set_trust_level
Explicitly sets the trust level on this particular page.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A hierarchy of directories and files that appears to be one continuous file system,...
std::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.
bool resolve_filename(Filename &filename, const DSearchPath &searchpath, const std::string &default_extension=std::string()) const
Searches the given search path for the filename.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool read_prc(std::istream &in)
Reads the contents of a complete prc file, as returned by the indicated istream, into the current pag...
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...
static void close_read_file(std::istream *stream)
Closes a file opened by a previous call to open_read_file().
ConfigPage * load_prc_file(const Filename &filename)
A convenience function for loading explicit prc files from a disk file or from within a multifile (vi...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The name of a file, such as a texture file or an Egg file.
EXPCL_PANDA_PUTIL ConfigPage * load_prc_file_data(const std::string &name, const std::string &data)
Another convenience function to load a prc file from an explicit string, which represents the content...
bool unload_prc_file(ConfigPage *page)
Unloads (and deletes) a ConfigPage that represents a prc file that was previously loaded by load_prc_...
static VirtualFileSystem * get_global_ptr()
Returns the default global VirtualFileSystem.
ConfigPage * make_explicit_page(const std::string &name)
Creates and returns a new, empty ConfigPage.
A page of ConfigDeclarations that may be loaded or unloaded.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool delete_explicit_page(ConfigPage *page)
Removes a previously-constructed ConfigPage from the set of active pages, and deletes it.
DSearchPath & get_search_path()
Returns the search path used to locate implicit .prc files.
void write_prc_variables(std::ostream &out) const
Writes all of the prc-set config variables, as they appear in a prc file somewhere,...