![]() |
NumCpp
2.16.0
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. | |
| BinaryDataLogger (BinaryDataLogger &&)=delete | |
| BinaryDataLogger (const BinaryDataLogger &)=delete | |
| BinaryDataLogger (std::filesystem::path outputDir) | |
| Constructor. | |
| BinaryDataLogger (std::string_view outputDir) | |
| Constructor. | |
| ~BinaryDataLogger () | |
| Destructor. | |
| void | disable () noexcept |
| Disable the logger. | |
| void | enable () noexcept |
| Enable the logger. | |
| const std::filesystem::path & | filepath () const noexcept |
| The log file path. | |
| void | flush () |
| Force a flush of the output stream. | |
| bool | isEnabled () noexcept |
| Checks whether logger is enabled. | |
| void | log (const_pointer dataElements, std::size_t numElements) |
| Logs the data elements. | |
| void | log (const_reference dataElement) |
| Logs the data element. | |
| BinaryDataLogger & | operator= (BinaryDataLogger &&)=delete |
| BinaryDataLogger & | operator= (const BinaryDataLogger &)=delete |
| void | setOutputDir (std::filesystem::path outputDir) |
| Sets the output log directory. | |
| void | setOutputDir (std::string_view outputDir) |
| Sets the output log directory. | |
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" |
| 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 |