Rebel Fork Framework
Urho3D::ConstString Class Reference

#include <Urho3D/Container/ConstString.h>

Inheritance diagram for Urho3D::ConstString:

Public Member Functions

 ConstString ()=default
 
 ConstString (ea::string_view str)
 
StringHash GetHash () const
 
 operator StringHash () const
 

Private Attributes

const StringHash hash_
 

Detailed Description

Immutable string with precomputed hash. Inherit it from string to allow implicit casts to ea::string w/o allocation. It could be done with cast operator too, but this code would cause crash if operator const ea::string&() is used: const ea::string& s2 = ConstString("text");

Constructor & Destructor Documentation

◆ ConstString()

Urho3D::ConstString::ConstString ( )
default

Construct

Member Function Documentation

◆ GetHash()

StringHash Urho3D::ConstString::GetHash ( ) const
inline

Return hash


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