MCPcopy Create free account
hub / github.com/ImageEngine/cortex / Name

Class Name

include/IECore/PathMatcher.h:157–184  ·  view source on GitHub ↗

Struct used to store the name for each node in the tree of paths. This is just an InternedString with an extra field used to separate names containing wildcards from plain names - since they need to be used with `match()` or the special ellipsis matching code.

Source from the content-addressed store, hash-verified

155 // names containing wildcards from plain names - since they need to
156 // be used with `match()` or the special ellipsis matching code.
157 struct Name
158 {
159
160 enum Type
161 {
162 Plain = 0, // No wildcards
163 Boundary = 1, // Marker between plain and wildcarded
164 Wildcarded = 2 // Has wildcards or ...
165 };
166
167 Name( IECore::InternedString name );
168 // Allows explicit instantiation of the type member -
169 // use with care!
170 Name( IECore::InternedString name, Type type );
171
172 // Less than implemented to do a lexicographical comparison,
173 // first on type and then on the name. This has the effect of
174 // segregating plain strings from wildcarded strings with the
175 // Boundary type providing a marker between them. The comparison
176 // of the name uses the InternedString operator which compares
177 // via pointer rather than string content, which gives improved
178 // performance.
179 bool operator < ( const Name &other ) const;
180
181 const IECore::InternedString name;
182 const unsigned char type;
183
184 };
185
186 class Node : public IECore::RefCounted
187 {

Callers 4

writeObjectMethod · 0.50
nameMethod · 0.50
wildcardsBeginMethod · 0.50
matchWalkMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected