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 * 
buffer () const
 
SYS_FORCE_INLINE constexpr
const char * 
data () 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
 
SYS_FORCE_INLINE constexpr bool operator== (const char *other) const
 
SYS_FORCE_INLINE constexpr bool operator!= (const char *other) const
 

Friends

class UT_StringRef
 

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:
karma_procedurals/BRAY_HdBox.C, karma_procedurals/BRAY_HdSphere.C, and SOP/SOP_BouncyAgent.C.

Definition at line 66 of file UT_StringHolder.h.

Constructor & Destructor Documentation

constexpr SYS_FORCE_INLINE UT_StringLit::UT_StringLit ( )
inline

Definition at line 70 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 79 of file UT_StringHolder.h.

Member Function Documentation

SYS_FORCE_INLINE const UT_StringHolder & UT_StringLit::asHolder ( ) const

Definition at line 1425 of file UT_StringHolder.h.

SYS_FORCE_INLINE const UT_StringRef & UT_StringLit::asRef ( ) const

Definition at line 1432 of file UT_StringHolder.h.

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

Definition at line 87 of file UT_StringHolder.h.

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

Definition at line 89 of file UT_StringHolder.h.

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

Definition at line 88 of file UT_StringHolder.h.

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

Definition at line 94 of file UT_StringHolder.h.

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

Definition at line 92 of file UT_StringHolder.h.

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

Definition at line 90 of file UT_StringHolder.h.

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

Definition at line 110 of file UT_StringHolder.h.

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

Definition at line 127 of file UT_StringHolder.h.

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

Definition at line 99 of file UT_StringHolder.h.

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

Definition at line 114 of file UT_StringHolder.h.

Friends And Related Function Documentation

friend class UT_StringRef
friend

Definition at line 137 of file UT_StringHolder.h.


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