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;
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const std::string & get_orig_prefix(int n) const
Returns the original prefix associated with the nth pattern.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_num_patterns() const
Returns the number of original/replace patterns that have been added.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void add_pattern(const std::string &orig_prefix, const std::string &replacement_prefix)
Adds the indicated original/replace pattern to the specification.
const std::string & get_replacement_prefix(int n) const
Returns the replacement prefix associated with the nth pattern.
The name of a file, such as a texture file or an Egg file.
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.
A base class for all things that want to be reference-counted.
bool is_empty() const
Returns true if the PathReplace object specifies no action, or false if convert_path() may do somethi...
void clear()
Removes all the patterns from the specification.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This encapsulates the user's command-line request to replace existing, incorrect pathnames to models ...
This class stores a list of directories that can be searched, in order, to locate a particular file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void clear_error()
Resets the error flag to the no-error state.
bool had_error() const
Returns true if an error was detected since the last call to clear_error(), false otherwise.
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...
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 ...
This class can be used to test for string matches against standard Unix- shell filename globbing conv...