Sane C++ Libraries
C++ Platform Abstraction Libraries
SC::Reflection::Sv Struct Reference

A minimal ASCII StringView with shortened name to be used in TypeToString. More...

#include <ReflectionFoundation.h>

Public Member Functions

constexpr Sv ()
 Construct empty Sv. More...
 
constexpr Sv (const char *data, uint32_t length)
 Construct Sv from a pointer to a char* and a length. More...
 
template<uint32_t N>
constexpr Sv (const char(&data)[N])
 Construct Sv from a string literal. More...
 
constexpr bool operator== (const Sv other) const
 

Public Attributes

const char * data
 Pointer to the start of ASCII string. More...
 
uint32_t length
 Number of bytes of the ASCII string. More...
 

Detailed Description

A minimal ASCII StringView with shortened name to be used in TypeToString.

Constructor & Destructor Documentation

◆ Sv() [1/3]

constexpr SC::Reflection::Sv::Sv ( )
inlineconstexpr

Construct empty Sv.

◆ Sv() [2/3]

constexpr SC::Reflection::Sv::Sv ( const char *  data,
uint32_t  length 
)
inlineconstexpr

Construct Sv from a pointer to a char* and a length.

Parameters
dataPointer to the string
lengthNumber of bytes representing length of the string

◆ Sv() [3/3]

template<uint32_t N>
constexpr SC::Reflection::Sv::Sv ( const char(&)  data[N])
inlineconstexpr

Construct Sv from a string literal.

Template Parameters
NNumber of characters in the string
Parameters
dataPointer to the array of characters

Member Data Documentation

◆ data

const char* SC::Reflection::Sv::data

Pointer to the start of ASCII string.

◆ length

uint32_t SC::Reflection::Sv::length

Number of bytes of the ASCII string.


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