15 #ifndef FINDAPPROXPATH_H
16 #define FINDAPPROXPATH_H
18 #include "pandabase.h"
20 #include "globPattern.h"
21 #include "typeHandle.h"
62 void output(ostream &out)
const;
65 #if !defined(WIN32_VC) && !defined(WIN64_VC)
72 CT_match_name_insensitive,
75 CT_match_inexact_type,
89 void output(ostream &out)
const;
103 bool _return_stashed;
104 bool _case_insensitive;
106 friend ostream &operator << (ostream &, FindApproxPath::ComponentType);
107 friend INLINE ostream &operator << (ostream &,
const FindApproxPath::Component &);
111 operator << (ostream &out, FindApproxPath::ComponentType type);
114 operator << (ostream &out,
const FindApproxPath::Component &component) {
115 component.output(out);
125 #include "findApproxPath.I"
void add_match_pointer(PandaNode *pointer, int flags)
Adds a component that must match a particular node exactly, by pointer.
bool matches_component(int index, PandaNode *node) const
Returns true if the nth component of the path matches the indicated node, false otherwise.
A basic node of the scene graph or data graph.
This class is local to this package only; it doesn't get exported.
bool return_hidden() const
Returns true if this path allows returning of hidden nodes, false otherwise.
bool add_flags(const string &str_flags)
Adds a sequence of control flags.
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_exact_type(TypeHandle type, int flags)
Adds a component that must match the type of a node exactly, with no derived types matching...
void add_match_name_glob(const string &glob, int flags)
Adds a component that must match the name of a node using standard shell globbing rules...
void add_match_many(int flags)
Adds a component that will match a chain of zero or more consecutive nodes.
void output_component(ostream &out, int index) const
Formats the nth component of the path to the indicated output stream.
bool matches_stashed(int index) const
Returns true if the nth component of the path matches a stashed node only, false otherwise.
bool return_stashed() const
Returns true if this path allows returning of stashed nodes, false otherwise.
void add_match_name(const string &name, int flags)
Adds a component that must match the name of a node exactly.
int get_num_components() const
Returns the number of components in the path.
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_tag_value(const string &key, const string &value, int flags)
Adds a component that will match a node that has a tag with the indicated key.
bool case_insensitive() const
Returns true if the search is case-insensitive, false if it is case-sensitive.
void add_match_tag(const 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 add_string(const string &str_path)
Adds a sequence of components separated by slashes, followed optionally by a semicolon and a sequence...
TypeHandle is the identifier used to differentiate C++ class types.
bool add_component(string str_component)
Adds a single component to the path sequence, defined by a string as might appear between slashes in ...
This class can be used to test for string matches against standard Unix-shell filename globbing conve...