Public Member Functions | Protected Types | Protected Attributes
cMsg Class Reference

Class for short, fixed maximum length text messages. More...

#include <sdhexception.h>

List of all members.

Public Member Functions

char const * c_str () const
 Return the C-string representation of the messag in this object.
 cMsg ()
 Default constructor, init message to empty string.
 cMsg (cMsg const &other)
 Copy constructor, copy message content of other object to this object.
 cMsg (char const *fmt,...) SDH__attribute__((format(printf
 Constructor with printf like format, argument parameters.

Protected Types

enum  { eMAX_MSG = 512 }
 anonymous enum instead of define macros More...

Protected Attributes

char msg [eMAX_MSG]

Detailed Description

Class for short, fixed maximum length text messages.

Simple message objects for short, fixed maximum length text messages, but with printf like initialization.

An object of type #SDH::cMsg contains an ASCII-Z string of maximum length eMAX_MSG. It can be initialized with a 'printf-style' format string by the constructor. It is used in the SDHLibrary to further specify the cause of an exception in human readable form.

See #SDH::cSDHLibraryException::cSDHLibraryException() for exemplary use.

Definition at line 94 of file sdhexception.h.


Member Enumeration Documentation

anonymous enum [protected]

anonymous enum instead of define macros

Enumerator:
eMAX_MSG 

maximum length in bytes of a message to store

Definition at line 99 of file sdhexception.h.


Constructor & Destructor Documentation

Default constructor, init message to empty string.

cMsg::cMsg ( cMsg const &  other)

Copy constructor, copy message content of other object to this object.

cMsg::cMsg ( char const *  fmt,
  ... 
)

Constructor with printf like format, argument parameters.


Member Function Documentation

char const* cMsg::c_str ( ) const

Return the C-string representation of the messag in this object.


Member Data Documentation

char cMsg::msg[eMAX_MSG] [protected]

Definition at line 104 of file sdhexception.h.


The documentation for this class was generated from the following file:


schunk_sdh
Author(s): Mathias Luedtke , Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:21