HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_StringSet.h File Reference
#include "UT_ArrayStringSet.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
 

Macros

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

Macro Definition Documentation

#define __UT_StringSet_h__

Definition at line 14 of file UT_StringSet.h.

#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:786

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 26 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:786

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 34 of file UT_StringSet.h.