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.
| 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 | { |
no outgoing calls
no test coverage detected