HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_StringSet.h File Reference
#include "UT_API.h"
#include "UT_ArraySet.h"
#include "UT_Set.h"
#include "UT_StringHolder.h"
+ Include dependency graph for UT_StringSet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UT_StringSet
 
class  UT_SortedStringSet
 
class  UT_ArrayStringSet
 
struct  UT::DefaultClearer< UT_ArrayStringSet >
 

Namespaces

 UT
 

Macros

#define UT_STRINGREF_WRAPPER(return_type, name, qualifier)
 
#define UT_STRINGREF_WRAPPER_RANGE(iterator_type, name, qualifier)
 

Macro Definition Documentation

#define UT_STRINGREF_WRAPPER (   return_type,
  name,
  qualifier 
)
Value:
inline return_type name(const UT_StringRef &key) qualifier \
{ \
return Parent::name(UTmakeUnsafeRef(key)); \
}
SYS_FORCE_INLINE const UT_StringHolder & UTmakeUnsafeRef(const UT_StringRef &ref)
Convert a UT_StringRef into a UT_StringHolder that is a shallow reference.
GLuint const GLchar * name
Definition: glcorearb.h:785

We want methods like find() to take a const UT_StringRef& instead of a const UT_StringHolder& for the following reasons:

  • This allows a const char* to be passed in without forcing a copy of the string.
  • A UT_StringRef can be used without converting it to a UT_StringHolder (which hardens the string if necessary).
  • A UT_StringHolder can still be directly passed in.

Definition at line 25 of file UT_StringSet.h.

#define UT_STRINGREF_WRAPPER_RANGE (   iterator_type,
  name,
  qualifier 
)
Value:
name(const UT_StringRef &key) qualifier \
{ \
return Parent::name(UTmakeUnsafeRef(key)); \
}
SYS_FORCE_INLINE const UT_StringHolder & UTmakeUnsafeRef(const UT_StringRef &ref)
Convert a UT_StringRef into a UT_StringHolder that is a shallow reference.
GLuint const GLchar * name
Definition: glcorearb.h:785

Specialization of the above macro for methods that return an iterator range, since something like std::pair<iterator, iterator> is interpreted as two arguments when being passed to a macro (due to the comma).

Definition at line 33 of file UT_StringSet.h.