47 add_pattern(
const std::string &orig_prefix,
const std::string &replacement_prefix) {
48 _entries.push_back(Entry(orig_prefix, replacement_prefix));
56 return _entries.size();
64 nassertr(n >= 0 && n < (
int)_entries.size(), _entries[0]._orig_prefix);
65 return _entries[n]._orig_prefix;
73 nassertr(n >= 0 && n < (
int)_entries.size(), _entries[0]._replacement_prefix);
74 return _entries[n]._replacement_prefix;
83 return (_entries.empty() && _path.
is_empty() && _path_store == PS_keep);
100 INLINE PathReplace::Component::
101 Component(
const std::string &component) :
102 _orig_prefix(component),
103 _double_star(component ==
"**")
110 INLINE PathReplace::Component::
111 Component(
const PathReplace::Component ©) :
112 _orig_prefix(copy._orig_prefix),
113 _double_star(copy._double_star)
120 INLINE
void PathReplace::Component::
121 operator = (
const PathReplace::Component ©) {
122 _orig_prefix = copy._orig_prefix;
123 _double_star = copy._double_star;
129 INLINE PathReplace::Entry::
130 Entry(
const PathReplace::Entry ©) :
131 _orig_prefix(copy._orig_prefix),
132 _orig_components(copy._orig_components),
133 _is_local(copy._is_local),
134 _replacement_prefix(copy._replacement_prefix)
141 INLINE
void PathReplace::Entry::
142 operator = (
const PathReplace::Entry ©) {
143 _orig_prefix = copy._orig_prefix;
144 _orig_components = copy._orig_components;
145 _is_local = copy._is_local;
146 _replacement_prefix = copy._replacement_prefix;