45 INLINE
void add_pattern(
const std::string &orig_prefix,
const std::string &replacement_prefix);
65 void write(std::ostream &out,
int indent_level = 0)
const;
87 bool copy_this_file(
Filename &filename);
91 INLINE Component(
const std::string &component);
92 INLINE Component(
const Component ©);
93 INLINE
void operator = (
const Component ©);
102 Entry(
const std::string &orig_prefix,
const std::string &replacement_prefix);
103 INLINE Entry(
const Entry ©);
104 INLINE
void operator = (
const Entry ©);
107 size_t r_try_match(
const vector_string &components,
size_t oi,
size_t ci)
const;
109 std::string _orig_prefix;
112 std::string _replacement_prefix;
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.
This class can be used to test for string matches against standard Unix- shell filename globbing conv...
This encapsulates the user's command-line request to replace existing, incorrect pathnames to models ...
Filename store_path(const Filename &orig_filename)
Given a path to an existing filename, converts it as specified in the _path_store and or _path_direct...
const std::string & get_orig_prefix(int n) const
Returns the original prefix associated with the nth pattern.
void full_convert_path(const Filename &orig_filename, const DSearchPath &additional_path, Filename &resolved_path, Filename &output_path)
Converts the input path into two different forms: A resolved path, and an output path.
Filename convert_path(const Filename &orig_filename, const DSearchPath &additional_path=DSearchPath())
Calls match_path() followed by store_path(), to replace the initial prefix and then convert the file ...
bool is_empty() const
Returns true if the PathReplace object specifies no action, or false if convert_path() may do somethi...
void add_pattern(const std::string &orig_prefix, const std::string &replacement_prefix)
Adds the indicated original/replace pattern to the specification.
Filename match_path(const Filename &orig_filename, const DSearchPath &additional_path=DSearchPath())
Looks for a match for the given filename among all the replacement patterns, and returns the first ma...
bool had_error() const
Returns true if an error was detected since the last call to clear_error(), false otherwise.
void clear()
Removes all the patterns from the specification.
int get_num_patterns() const
Returns the number of original/replace patterns that have been added.
void clear_error()
Resets the error flag to the no-error state.
const std::string & get_replacement_prefix(int n) const
Returns the replacement prefix associated with the nth pattern.
A base class for all things that want to be reference-counted.
This is our own Panda specialization on the default STL map.
This is our own Panda specialization on the default STL vector.
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.
PathStore
This enumerated type lists the methods by which a filename path might be mangled before storing in a ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.