OpenVDB 12.1.0

Loading...
Searching...
No Matches
String Struct Reference

An extremely basic but native representation of a string class with SSO support. This exists to provide an interface between the AX C++ API and backend IR string logic. It is not designed to fulfill any other use and should very rarely be used directly. More...

`#include <openvdb_ax/codegen/String.h>`

## Public Member Functions
| String ()
| String (const char *str)
| Construct from null terminated character string.
| String (const std::string &str)
| String (const char *str, const int64_t size)
| String (const String &other)
| ~String ()
const std::string | str () const
const char * | c_str () const
int64_t | size () const
bool | isLocal () const
void | clear ()
| operator const char * () const
const String & | operator= (const std::string &str)
const String & | operator= (const String &other)
bool | operator== (const String &other) const
bool | operator!= (const String &other) const
String | operator+ (const String &other) const
void | reset (const char *str, const int64_t size)
void | alloc (const size_t size)

## Public Attributes
char * | ptr = nullptr
char | SSO [SSO_LENGTH]
int64_t | len = 0

## Static Public Attributes
static constexpr int64_t | SSO_LENGTH = 16

## Detailed Description

An extremely basic but native representation of a string class with SSO support. This exists to provide an interface between the AX C++ API and backend IR string logic. It is not designed to fulfill any other use and should very rarely be used directly.

## Constructor & Destructor Documentation

## ◆ String() [1/5]

String | ( |  | ) |
| inline

## ◆ String() [2/5]

String | ( | const char * | str | ) |
| inline

Construct from null terminated character string.

## ◆ String() [3/5]

String | ( | const std::string & | str | ) |
| inline

## ◆ String() [4/5]

String | ( | const char * | str,
|  | const int64_t | size )
| inline

## ◆ String() [5/5]

String | ( | const String & | other | ) |
| inline

## ◆ ~String()

~String | ( |  | ) |
| inline

## Member Function Documentation

## ◆ alloc()

void alloc | ( | const size_t | size | ) |
| inline

## ◆ c_str()

const char * c_str | ( |  | ) | const
| inline

## ◆ clear()

void clear | ( |  | ) |
| inline

## ◆ isLocal()

bool isLocal | ( |  | ) | const
| inline

## ◆ operator const char *()

operator const char * | ( |  | ) | const
| inline

## ◆ operator!=()

bool operator!= | ( | const String & | other | ) | const
| inline

## ◆ operator+()

String operator+ | ( | const String & | other | ) | const
| inline

## ◆ operator=() [1/2]

const String & operator= | ( | const std::string & | str | ) |
| inline

## ◆ operator=() [2/2]

const String & operator= | ( | const String & | other | ) |
| inline

## ◆ operator==()

bool operator== | ( | const String & | other | ) | const
| inline

## ◆ reset()

void reset | ( | const char * | str,
|  | const int64_t | size )
| inline

## ◆ size()

int64_t size | ( |  | ) | const
| inline

## ◆ str()

const std::string str | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ len

int64_t len = 0

## ◆ ptr

char* ptr = nullptr

## ◆ SSO

char SSO[SSO_LENGTH]

## ◆ SSO_LENGTH

int64_t SSO_LENGTH = 16
| static constexpr