HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_StringLit Class Reference

#include <UT_StringHolder.h>

Public Member Functions

constexpr SYS_FORCE_INLINE UT_StringLit ()
 
template<size_t N>
constexpr SYS_FORCE_INLINE UT_StringLit (const char(&str)[N])
 
SYS_FORCE_INLINE constexpr
const char * 
data () const
 
SYS_FORCE_INLINE constexpr
const char * 
buffer () const
 
SYS_FORCE_INLINE constexpr
const char * 
c_str () const
 
SYS_FORCE_INLINE constexpr operator const char * () const
 
SYS_FORCE_INLINE constexpr exint length () const
 
SYS_FORCE_INLINE constexpr uint32 hash () const
 
SYS_FORCE_INLINE const
UT_StringHolder
asHolder () const
 
SYS_FORCE_INLINE const
UT_StringRef
asRef () const
 
SYS_FORCE_INLINE constexpr bool operator== (const UT_StringLit &other) const
 
SYS_FORCE_INLINE constexpr bool operator!= (const UT_StringLit &other) const
 

Friends

class UT_StringRef
 
SYS_FORCE_INLINE constexpr bool operator== (const UT_StringLit &str, const char *other)
 
SYS_FORCE_INLINE constexpr bool operator== (const char *other, const UT_StringLit &str)
 
SYS_FORCE_INLINE constexpr bool operator!= (const UT_StringLit &str, const char *other)
 
SYS_FORCE_INLINE constexpr bool operator!= (const char *other, const UT_StringLit &str)
 

Detailed Description

A string literal with length and compile-time computed hash value.

Note
This will only be compile-time when used in compile time expressions like template parameters and constexpr variables.
String literals whose length requires more than 31 bits not supported
See Also
UT_StringRef
Examples:
IMG/TIL_NullFilter.C, karma_procedurals/BRAY_HdBox.C, karma_procedurals/BRAY_HdSphere.C, and SOP/SOP_BouncyAgent.C.

Definition at line 85 of file UT_StringHolder.h.

Constructor & Destructor Documentation

constexpr SYS_FORCE_INLINE UT_StringLit::UT_StringLit ( )
inline

Definition at line 89 of file UT_StringHolder.h.

template<size_t N>
constexpr SYS_FORCE_INLINE UT_StringLit::UT_StringLit ( const char(&)  str[N])
inline

Definition at line 98 of file UT_StringHolder.h.

Member Function Documentation

SYS_FORCE_INLINE const UT_StringHolder & UT_StringLit::asHolder ( ) const

Definition at line 1324 of file UT_StringHolder.h.

SYS_FORCE_INLINE const UT_StringRef & UT_StringLit::asRef ( ) const

Definition at line 1331 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr const char* UT_StringLit::buffer ( ) const
inline

Definition at line 110 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr const char* UT_StringLit::c_str ( void  ) const
inline

Definition at line 111 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr const char* UT_StringLit::data ( ) const
inline

Definition at line 106 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr uint32 UT_StringLit::hash ( void  ) const
inline

Definition at line 116 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr exint UT_StringLit::length ( void  ) const
inline

Definition at line 114 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr UT_StringLit::operator const char * ( ) const
inline

Definition at line 112 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr bool UT_StringLit::operator!= ( const UT_StringLit other) const
inline

Definition at line 130 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr bool UT_StringLit::operator== ( const UT_StringLit other) const
inline

Definition at line 121 of file UT_StringHolder.h.

Friends And Related Function Documentation

SYS_FORCE_INLINE constexpr bool operator!= ( const UT_StringLit str,
const char *  other 
)
friend

Definition at line 165 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr bool operator!= ( const char *  other,
const UT_StringLit str 
)
friend

Definition at line 170 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr bool operator== ( const UT_StringLit str,
const char *  other 
)
friend

Definition at line 136 of file UT_StringHolder.h.

SYS_FORCE_INLINE constexpr bool operator== ( const char *  other,
const UT_StringLit str 
)
friend

Definition at line 160 of file UT_StringHolder.h.

friend class UT_StringRef
friend

Definition at line 180 of file UT_StringHolder.h.


The documentation for this class was generated from the following file: