Scene Fusion 2 API Reference
KS::SceneFusion2::sfName Class Reference

#include <sfName.h>

Public Member Functions

 sfName ()
 
 sfName (const std::string &str)
 
 sfName (const char *str)
 
bool IsValid () const
 
const std::string & operator* () const
 
const std::string * operator-> () const
 
bool operator== (const sfName &name) const
 
bool operator!= (const sfName &name) const
 

Detailed Description

Stores a pointer to a constant string. Can be dereferenced to access the string. All sfNames constructed with the same string value will point to the same memory address. This is used to reduce memory and provide fast string comparisons.

Constructor & Destructor Documentation

◆ sfName() [1/3]

KS::SceneFusion2::sfName::sfName ( )

Constructor. Points to nullptr.

◆ sfName() [2/3]

KS::SceneFusion2::sfName::sfName ( const std::string &  str)

Constructor

Parameters
conststd::string& str. The string pointed to will be a copy of this string.

◆ sfName() [3/3]

KS::SceneFusion2::sfName::sfName ( const char *  str)

Constructor

Parameters
constchar* str. The string pointed to will be a copy of this string.

Member Function Documentation

◆ IsValid()

bool KS::SceneFusion2::sfName::IsValid ( ) const

Checks if this sfName points to a valid string.

Returns
bool true if the string pointer is valid.

◆ operator!=()

bool KS::SceneFusion2::sfName::operator!= ( const sfName name) const
inline

Inequality comparison.

Parameters
constsfName& name to compare with.
booltrue if the names are different.

◆ operator*()

const std::string& KS::SceneFusion2::sfName::operator* ( ) const
inline

Dereferences to the constant string.

Returns
const std::string&

◆ operator->()

const std::string* KS::SceneFusion2::sfName::operator-> ( ) const
inline

Deferences to the string pointer.

Parameters
conststd::string*

◆ operator==()

bool KS::SceneFusion2::sfName::operator== ( const sfName name) const
inline

Equality comparison.

Parameters
constsfName& name to compare with.
Returns
bool true if the names are the same.

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