Updated Library Documentation (markdown)
@@ -167,8 +167,10 @@ namespace LoggingProperties {
|
||||
void set(std::string_view name, std::string_view file);
|
||||
void setProgramName(std::string_view name);
|
||||
void setLogFile(std::string_view file);
|
||||
void setPrinting(int state);
|
||||
void setLoggingState(int state); // Disable/enable logging
|
||||
template <int state>
|
||||
void setPrinting();
|
||||
template <int state>
|
||||
void setLoggingState(); // Disable/enable logging
|
||||
|
||||
void reset();
|
||||
} // namespace LoggingProperties
|
||||
@@ -235,9 +237,9 @@ class garbageCollector {
|
||||
public:
|
||||
~garbageCollector();
|
||||
|
||||
void delAfterProgress(char *&_ptr); // Delete allocated char variables after function
|
||||
void delAfterProgress(uint8_t *&_ptr); // Delete allocated uint8_t variables after funtion
|
||||
void delFileAfterProgress(const std::string &path); // Delete input file after function
|
||||
template <typename T>
|
||||
void delAfterProgress(T *_ptr); // Delete allocated variables after function
|
||||
void delFileAfterProgress(const std::string &_path); // Delete input file after function
|
||||
void closeAfterProgress(FILE *&_fp); // Close input file pointers after function
|
||||
void closeAfterProgress(DIR *&_dp); // Close input directory pointers after function
|
||||
void closeAfterProgress(int _fd); // Close input file descriptor after function
|
||||
@@ -291,7 +293,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
auto *buffer = new char[4096]; // Allocate memory
|
||||
collector.delAfterProgrss(buffer);
|
||||
// You can do the same with uint8_t
|
||||
// You can do the same with other types (int, etc.)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user