ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::characters::ZTArrayTraits< TStringSource, TChar > Struct Template Reference

Description:

template<typename TStringSource, typename TChar>
struct alib::characters::ZTArrayTraits< TStringSource, TChar >

This type trait is in all aspects equivalent to ArrayTraits, only that this struct provides traits on zero-terminated character arrays, while ArrayTraits is about non-zero-terminated arrays.

Please, therefore consult the documentation of type ArrayTraits.

See also
For detailed information, see chapter 4. Character Arrays of the Programmer's Manual of module ALib Characters.
Template Parameters
TStringSourceThe type for which specializations of this struct provide array type-traits.
TCharThe character type of the character array that specializations provide type-traits for.

Definition at line 137 of file chartraits.inl.

Public Static Field Index:

static constexpr Policy Access = Policy::NONE
 
static constexpr Policy Construction = Policy::NONE
 

Public Static Method Index:

static const TChar * Buffer (const TStringSource &src)
 
static TStringSource Construct (const TChar *array, integer length)
 
static integer Length (const TStringSource &src)
 

Field Details:

◆ Access

template<typename TStringSource, typename TChar>
Policy alib::characters::ZTArrayTraits< TStringSource, TChar >::Access = Policy::NONE
staticconstexpr

Provides information about how the zero-terminated character arrays of instances of type TStringSource may be accessed.

Definition at line 141 of file chartraits.inl.

◆ Construction

template<typename TStringSource, typename TChar>
Policy alib::characters::ZTArrayTraits< TStringSource, TChar >::Construction = Policy::NONE
staticconstexpr

Provides information about if and how instances of type TStringSource may be created from zero-terminated character arrays.

Definition at line 145 of file chartraits.inl.

Method Details:

◆ Buffer()

template<typename TStringSource, typename TChar>
const TChar * alib::characters::ZTArrayTraits< TStringSource, TChar >::Buffer ( const TStringSource & src)
static

Same as corresponding method Buffer of sibling struct ArrayTraits.

Parameters
srcThe source object of external type TStringSource.
Returns
Specializations have to return a pointer to the start of the zero-terminated character array represented by the given object src of type TStringSource.

◆ Construct()

template<typename TStringSource, typename TChar>
TStringSource alib::characters::ZTArrayTraits< TStringSource, TChar >::Construct ( const TChar * array,
integer length )
static

Same as corresponding method Construct of sibling struct ArrayTraits.

Parameters
arrayThe external zero-terminated array to be used to create the return value.
lengthThe length of the external array.
Returns
A new instance (value) of type TStringSource.

◆ Length()

template<typename TStringSource, typename TChar>
integer alib::characters::ZTArrayTraits< TStringSource, TChar >::Length ( const TStringSource & src)
static

Same as corresponding method Length of sibling struct ArrayTraits.

Parameters
srcThe source object of external type TStringSource.
Returns
Specializations have to return the length of the character array represented by the given object src of type TStringSource.

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