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

Go to the source code of this file.

Classes

class  UT_StringMap< T >
 
class  UT_SortedStringMap< ITEM_T >
 Same as UT_StringMap, but keeps the strings in a sorted order. More...
 

Macros

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

Macro Definition Documentation

#define __UT_StringMap_h__

Definition at line 14 of file UT_StringMap.h.

#define UT_STRINGREF_WRAPPER (   return_type,
  name,
  qualifier 
)
Value:
SYS_FORCE_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.
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
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_StringMap.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.
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
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_StringMap.h.