14 #ifndef FINDAPPROXPATH_H 15 #define FINDAPPROXPATH_H 36 bool add_flags(
const std::string &str_flags);
59 void output(std::ostream &out)
const;
62 #if !defined(WIN32_VC) && !defined(WIN64_VC) 69 CT_match_name_insensitive,
72 CT_match_inexact_type,
86 void output(std::ostream &out)
const;
100 bool _return_stashed;
101 bool _case_insensitive;
103 friend std::ostream &operator << (std::ostream &, FindApproxPath::ComponentType);
104 friend INLINE std::ostream &operator << (std::ostream &,
const FindApproxPath::Component &);
108 operator << (std::ostream &out, FindApproxPath::ComponentType type);
110 INLINE std::ostream &
111 operator << (std::ostream &out,
const FindApproxPath::Component &component) {
112 component.output(out);
116 INLINE std::ostream &
void add_match_pointer(PandaNode *pointer, int flags)
Adds a component that must match a particular node exactly, by pointer.
A basic node of the scene graph or data graph.
void add_match_name_glob(const std::string &glob, int flags)
Adds a component that must match the name of a node using standard shell globbing rules,...
bool case_insensitive() const
Returns true if the search is case-insensitive, false if it is case- sensitive.
bool add_flags(const std::string &str_flags)
Adds a sequence of control flags.
This class is local to this package only; it doesn't get exported.
bool matches_stashed(int index) const
Returns true if the nth component of the path matches a stashed node only, false otherwise.
bool add_component(std::string str_component)
Adds a single component to the path sequence, defined by a string as might appear between slashes in ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool return_stashed() const
Returns true if this path allows returning of stashed nodes, false otherwise.
void add_match_one(int flags)
Adds a component that will match any node (but not a chain of many nodes).
void add_match_inexact_type(TypeHandle type, int flags)
Adds a component that must match the type of a node or be a base class of the node's type.
void add_match_name(const std::string &name, int flags)
Adds a component that must match the name of a node exactly.
void add_match_exact_type(TypeHandle type, int flags)
Adds a component that must match the type of a node exactly, with no derived types matching.
bool add_string(const std::string &str_path)
Adds a sequence of components separated by slashes, followed optionally by a semicolon and a sequence...
bool is_component_match_many(int index) const
Returns true if the nth component is of type match_many, which will require special handling.
void add_match_many(int flags)
Adds a component that will match a chain of zero or more consecutive nodes.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output_component(std::ostream &out, int index) const
Formats the nth component of the path to the indicated output stream.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_num_components() const
Returns the number of components in the path.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
void add_match_tag_value(const std::string &key, const std::string &value, int flags)
Adds a component that will match a node that has a tag with the indicated key.
bool return_hidden() const
Returns true if this path allows returning of hidden nodes, false otherwise.
void add_match_tag(const std::string &key, int flags)
Adds a component that will match a node that has a tag with the indicated key, no matter what the val...
bool matches_component(int index, PandaNode *node) const
Returns true if the nth component of the path matches the indicated node, false otherwise.
This class can be used to test for string matches against standard Unix- shell filename globbing conv...