foobar2000 SDK  2015-08-03
Public Member Functions | Private Types | Private Member Functions | Private Attributes
pfc::__exception_with_message_t< t_base >

#include <primitives.h>

+ Inheritance diagram for pfc::__exception_with_message_t< t_base >:

Public Member Functions

 __exception_with_message_t (const char *p_message)
 
 __exception_with_message_t ()
 
 __exception_with_message_t (const t_self &p_source)
 
 ~__exception_with_message_t () throw ()
 
const t_selfoperator= (const t_self &p_source)
 
const char * what () const throw ()
 

Private Types

typedef __exception_with_message_t< t_baset_self
 

Private Member Functions

void cleanup () throw ()
 
void set_message (const char *p_message) throw ()
 

Private Attributes

char * m_message
 

Detailed Description

template<typename t_base>
class pfc::__exception_with_message_t< t_base >

Definition at line 52 of file primitives.h.

Member Typedef Documentation

template<typename t_base >
typedef __exception_with_message_t<t_base> pfc::__exception_with_message_t< t_base >::t_self
private

Definition at line 53 of file primitives.h.

Constructor & Destructor Documentation

template<typename t_base >
pfc::__exception_with_message_t< t_base >::__exception_with_message_t ( const char *  p_message)
inline

Definition at line 55 of file primitives.h.

55  : m_message(NULL) {
56  set_message(p_message);
57  }
void set_message(const char *p_message)
Definition: primitives.h:68
template<typename t_base >
pfc::__exception_with_message_t< t_base >::__exception_with_message_t ( )
inline

Definition at line 58 of file primitives.h.

58 : m_message(NULL) {}
template<typename t_base >
pfc::__exception_with_message_t< t_base >::__exception_with_message_t ( const t_self p_source)
inline

Definition at line 59 of file primitives.h.

59 : m_message(NULL) {set_message(p_source.m_message);}
void set_message(const char *p_message)
Definition: primitives.h:68
template<typename t_base >
pfc::__exception_with_message_t< t_base >::~__exception_with_message_t ( )
throw (
)
inline

Definition at line 65 of file primitives.h.

Member Function Documentation

template<typename t_base >
void pfc::__exception_with_message_t< t_base >::cleanup ( )
throw (
)
inlineprivate

Definition at line 72 of file primitives.h.

72  {
73  if (m_message != NULL) {free(m_message); m_message = NULL;}
74  }
template<typename t_base >
const t_self& pfc::__exception_with_message_t< t_base >::operator= ( const t_self p_source)
inline

Definition at line 63 of file primitives.h.

63 {set_message(p_source.m_message);}
void set_message(const char *p_message)
Definition: primitives.h:68
template<typename t_base >
void pfc::__exception_with_message_t< t_base >::set_message ( const char *  p_message)
throw (
)
inlineprivate

Definition at line 68 of file primitives.h.

68  {
69  cleanup();
70  if (p_message != NULL) m_message = strdup(p_message);
71  }
template<typename t_base >
const char* pfc::__exception_with_message_t< t_base >::what ( ) const
throw (
)
inline

Definition at line 61 of file primitives.h.

61 {return m_message != NULL ? m_message : "unnamed exception";}

Field Documentation

template<typename t_base >
char* pfc::__exception_with_message_t< t_base >::m_message
private

Definition at line 75 of file primitives.h.


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