NumCpp
2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Binary Logger. More...
#include <BinaryLogger.hpp>
Public Types | |
using | const_pointer = const DataType *const |
using | const_reference = const DataType & |
using | value_type = DataType |
Public Member Functions | |
BinaryDataLogger () | |
Default constructor. More... | |
BinaryDataLogger (BinaryDataLogger &&)=delete | |
BinaryDataLogger (const BinaryDataLogger &)=delete | |
BinaryDataLogger (std::filesystem::path outputDir) | |
Constructor. More... | |
BinaryDataLogger (std::string_view outputDir) | |
Constructor. More... | |
~BinaryDataLogger () | |
Destructor. More... | |
void | disable () noexcept |
Disable the logger. More... | |
void | enable () noexcept |
Enable the logger. More... | |
const std::filesystem::path & | filepath () const noexcept |
The log file path. More... | |
void | flush () |
Force a flush of the output stream. More... | |
bool | isEnabled () noexcept |
Checks whether logger is enabled. More... | |
void | log (const_pointer dataElements, std::size_t numElements) |
Logs the data elements. More... | |
void | log (const_reference dataElement) |
Logs the data element. More... | |
BinaryDataLogger & | operator= (BinaryDataLogger &&)=delete |
BinaryDataLogger & | operator= (const BinaryDataLogger &)=delete |
void | setOutputDir (std::filesystem::path outputDir) |
Sets the output log directory. More... | |
void | setOutputDir (std::string_view outputDir) |
Sets the output log directory. More... | |
Static Public Attributes | |
static constexpr auto | DATA_ELEMENT_SIZE = sizeof(value_type) |
static constexpr auto | DATE_TYPE_HAS_SERIALIZE_METHOD = type_traits::has_serialize_v<value_type> |
static constexpr char | LOG_EXT [] = ".log" |
Binary Logger.
using nc::logger::detail::BinaryDataLogger< DataType >::const_pointer = const DataType* const |
using nc::logger::detail::BinaryDataLogger< DataType >::const_reference = const DataType& |
using nc::logger::detail::BinaryDataLogger< DataType >::value_type = DataType |
|
inline |
Default constructor.
|
inlineexplicit |
Constructor.
outputDir | the directory to place the output log |
|
inlineexplicit |
Constructor.
outputDir | the directory to place the output log |
|
inline |
Destructor.
|
delete |
|
delete |
|
inlinenoexcept |
Disable the logger.
|
inlinenoexcept |
Enable the logger.
|
inlinenoexcept |
The log file path.
|
inline |
Force a flush of the output stream.
|
inlinenoexcept |
Checks whether logger is enabled.
|
inline |
Logs the data elements.
dataElements | the data element pointer |
numElements | the number of data elements to log |
|
inline |
Logs the data element.
dataElement | the data element |
|
delete |
|
delete |
|
inline |
Sets the output log directory.
outputDir | the output directory |
|
inline |
Sets the output log directory.
outputDir | the output directory |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |