|
VoltMod
C++23 framework for CS2 server plugins
|
A value for a fixed engine character array (char m_name[N]).
More...
#include <CharBuf.hpp>
Public Member Functions | |
| CharBuf ()=default | |
| CharBuf (std::string_view text) noexcept | |
| CharBuf (const char *text) noexcept | |
| CharBuf & | operator= (std::string_view text) noexcept |
| CharBuf & | operator= (const char *text) noexcept |
| std::string_view | View () const noexcept |
| std::string | Str () const |
| bool | Empty () const noexcept |
| void | Assign (std::string_view text) noexcept |
Public Attributes | |
| char | Value [N] {} |
A value for a fixed engine character array (char m_name[N]).
Assignment truncates to N-1 characters, adds a NUL, and clears the unused tail. View borrows this buffer; Str returns a copy.
Definition at line 19 of file CharBuf.hpp.
|
default |
|
inlinenoexcept |
Definition at line 26 of file CharBuf.hpp.
References VoltMod::CharBuf< N >::Assign(), and VoltMod::ReadFile().
|
inlinenoexcept |
Supports direct construction from a literal without two user-defined conversions.
Definition at line 29 of file CharBuf.hpp.
References VoltMod::CharBuf< N >::Assign(), and VoltMod::ReadFile().
|
inlinenoexcept |
Definition at line 59 of file CharBuf.hpp.
References VoltMod::ReadFile(), and VoltMod::CharBuf< N >::Value.
Referenced by VoltMod::CharBuf< N >::CharBuf(), VoltMod::CharBuf< N >::CharBuf(), VoltMod::CharBuf< N >::operator=(), and VoltMod::CharBuf< N >::operator=().
|
inlinenoexcept |
Definition at line 57 of file CharBuf.hpp.
References VoltMod::CharBuf< N >::Value.
|
inlinenoexcept |
Avoids ambiguous assignment from a string literal.
Definition at line 38 of file CharBuf.hpp.
References VoltMod::CharBuf< N >::Assign(), and VoltMod::ReadFile().
|
inlinenoexcept |
Definition at line 31 of file CharBuf.hpp.
References VoltMod::CharBuf< N >::Assign(), and VoltMod::ReadFile().
|
inline |
Definition at line 55 of file CharBuf.hpp.
References VoltMod::CharBuf< N >::View().
|
inlinenoexcept |
Contents before the first NUL, borrowed from this buffer.
Definition at line 45 of file CharBuf.hpp.
References VoltMod::ReadFile(), and VoltMod::CharBuf< N >::Value.
Referenced by VoltMod::CharBuf< N >::Str().
| char VoltMod::CharBuf< N >::Value[N] {} |
Definition at line 23 of file CharBuf.hpp.
Referenced by VoltMod::CharBuf< N >::Assign(), VoltMod::CharBuf< N >::Empty(), and VoltMod::CharBuf< N >::View().