14#ifndef CONFIGVARIABLESEARCHPATH_H
15#define CONFIGVARIABLESEARCHPATH_H
36class EXPCL_DTOOL_PRC ConfigVariableSearchPath :
public ConfigVariableBase {
38 INLINE ConfigVariableSearchPath(
const std::string &name,
39 const std::string &description = std::string(),
41 INLINE ConfigVariableSearchPath(
const std::string &name,
43 const std::string &description,
45 INLINE ConfigVariableSearchPath(
const std::string &name,
46 const std::string &default_value,
47 const std::string &description,
49 INLINE ~ConfigVariableSearchPath();
53 INLINE
const DSearchPath &get_default_value()
const;
54 MAKE_PROPERTY(value, get_value);
55 MAKE_PROPERTY(default_value, get_default_value);
63 const std::string &separator = std::string());
78 INLINE
void output(std::ostream &out)
const;
79 INLINE
void write(std::ostream &out)
const;
82 void reload_search_path();
84 mutable MutexImpl _lock;
88 AtomicAdjust::Integer _local_modified;
bool clear_local_value()
Removes the local value defined for this variable, and allows its value to be once again retrieved fr...
This is similar to a ConfigVariableList, but it returns its list as a DSearchPath,...
void clear()
Removes all the directories locally added to the search list, and restores it to its original form.
void prepend_path(const DSearchPath &path)
Adds all of the directories listed in the search path to the beginning of the search list.
void append_directory(const Filename &directory)
Adds a new directory to the end of the search list.
size_t find_all_files(const Filename &filename, DSearchPath::Results &results) const
Searches all the directories in the search list for the indicated file, in order.
void prepend_directory(const Filename &directory)
Adds a new directory to the front of the search list.
get_num_directories
Returns the number of directories on the search list.
bool is_empty() const
Returns true if the search list is empty, false otherwise.
get_directory
Returns the nth directory on the search list.
void append_path(const std::string &path, const std::string &separator=std::string())
Adds all of the directories listed in the search path to the end of the search list.
Filename find_file(const Filename &filename) const
Searches all the directories in the search list for the indicated file, in order.
This class stores a list of directories that can be searched, in order, to locate a particular file.
The name of a file, such as a texture file or an Egg 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.