11 #ifndef INCLUDED_LIBCYBERRADIO_DEBUGGABLE_H_ 12 #define INCLUDED_LIBCYBERRADIO_DEBUGGABLE_H_ 20 #define DEBUG_FP stderr 24 #define DEBUG_TIME_FMT "%H:%M:%S" 52 const std::string& debug_name =
"",
53 FILE* debug_fp = DEBUG_FP,
54 const std::string& debug_timefmt = DEBUG_TIME_FMT
80 const std::string& debug_name
97 const std::string& debug_timefmt
146 virtual std::string
rawString(
const std::string& data);
150 std::string _debugName;
152 std::string _debugTimeFmt;
153 char* _debugTimestamp;
154 size_t _debugTimestampSize;
Debuggable & operator=(const Debuggable &other)
Assignment operator for Debuggable objects.
virtual ~Debuggable()
Destroys a Debuggable object.
virtual void setDebugFile(FILE *debug_fp)
Sets the debug file pointer for this object.
Class that supports debug output.
virtual void setDebugTimeFormat(const std::string &debug_timefmt)
Sets the debug time format for this object.
virtual int debug(const char *format,...)
Outputs debug information.
Defines functionality for LibCyberRadio applications.
Debuggable(bool debug=false, const std::string &debug_name="", FILE *debug_fp=DEBUG_FP, const std::string &debug_timefmt=DEBUG_TIME_FMT)
Constructs a Debuggable object.
virtual const char * debugBool(bool x)
Gets a debug output string for a Boolean value.
virtual std::string rawString(const std::string &data)
Gets a "raw" string representation of a given data string.
virtual bool isDebug() const
Gets whether this object produces debug output.
virtual std::string getDebugName() const
Gets the debug name for this object.
virtual void setDebugName(const std::string &debug_name)
Sets the debug name for this object.