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());
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.
get_search_path
Returns the search path used to locate implicit .prc files.
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.
set_trust_level
Explicitly sets the trust level on this particular page.
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 ...
void write_prc_variables(std::ostream &out) const
Writes all of the prc-set config variables, as they appear in a prc file somewhere,...
The name of a file, such as a texture file or an Egg file.
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.
A hierarchy of directories and files that appears to be one continuous file system,...
bool resolve_filename(Filename &filename, const DSearchPath &searchpath, const std::string &default_extension=std::string()) const
Searches the given search path for the filename.
static void close_read_file(std::istream *stream)
Closes a file opened by a previous call to open_read_file().
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,...
static VirtualFileSystem * get_global_ptr()
Returns the default global VirtualFileSystem.
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.
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...
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_...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.