|
ActiveLib
|
#include <DataFormat.h>

Public Types | |
| using | Option = std::optional<DataFormat> |
Public Member Functions | |
| DataFormat () | |
| DataFormat (bool withBOM, bool asBigEndian=defaultEndian) | |
| DataFormat (TextEncoding encode, bool withBOM=false, bool asBigEndian=defaultEndian) | |
| Memory::Option | toBOM () const |
Static Public Member Functions | |
| static std::optional< std::pair< DataFormat, Memory::size_type > > | fromBOM (const char *bom, Memory::size_type len) |
Static Public Attributes | |
| static constexpr bool | defaultEndian {std::endian::native == std::endian::big} |
A structure specifying i/o data formatting
|
inline |
Default constructor
|
inline |
Constructor
| withBOM | True if the text is preceded by a BOM |
| asBigEndian | True if byte ordering is big-endian |
|
inline |
Constructor
| encode | The text encoding |
| withBOM | True if the text is preceded by a BOM |
| asBigEndian | True if byte ordering is big-endian |
|
static |
Create a data format from a BOM signature
| bom | A series of bytes to test for a BOM signature |
| len | The number of available bytes |
| Memory::Option DataFormat::toBOM | ( | ) | const |
Get a BOM signature for the format

