Go to the documentation of this file.
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
void set_text()
Indicates that the filename represents a text file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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,...
A global object that maintains the set of ConfigPages everywhere in the world, and keeps them in sort...
bool delete_explicit_page(ConfigPage *page)
Removes a previously-constructed ConfigPage from the set of active pages, and deletes it.
A page of ConfigDeclarations that may be loaded or unloaded.
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...
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...
void write_prc_variables(std::ostream &out) const
Writes all of the prc-set config variables, as they appear in a prc file somewhere,...
set_trust_level
Explicitly sets the trust level on this particular page.
static VirtualFileSystem * get_global_ptr()
Returns the default global VirtualFileSystem.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void close_read_file(std::istream *stream)
Closes a file opened by a previous call to open_read_file().
bool unload_prc_file(ConfigPage *page)
Unloads (and deletes) a ConfigPage that represents a prc file that was previously loaded by load_prc_...
Stores a 128-bit value that represents the hashed contents (typically MD5) of a file or buffer.
bool read_prc(std::istream &in)
Reads the contents of a complete prc file, as returned by the indicated istream, into the current pag...
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...
bool resolve_filename(Filename &filename, const DSearchPath &searchpath, const std::string &default_extension=std::string()) const
Searches the given search path for the filename.
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,...
DSearchPath & get_search_path()
Returns the search path used to locate implicit .prc files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ConfigPage * make_explicit_page(const std::string &name)
Creates and returns a new, empty ConfigPage.
The name of a file, such as a texture file or an Egg file.