Structural deformable models
Public Member Functions | Protected Attributes | List of all members
IOException Class Reference

#include <Errors.h>

Inheritance diagram for IOException:
Inheritance graph
[legend]
Collaboration diagram for IOException:
Collaboration graph
[legend]

Public Member Functions

 IOException (const char *msg=NULL)
 
 ~IOException ()
 
void setMessage (const char *msg=NULL)
 
const char * getMessage () const
 

Protected Attributes

char * message
 

Detailed Description

Definition at line 11 of file Errors.h.

Constructor & Destructor Documentation

IOException::IOException ( const char *  msg = NULL)
inline

Definition at line 13 of file Errors.h.

13  : message(NULL) {
14  setMessage(msg);
15  }
#define NULL
Definition: simpletypes.h:9
void setMessage(const char *msg=NULL)
Definition: Errors.h:22
char * message
Definition: Errors.h:43
IOException::~IOException ( )
inline

Definition at line 16 of file Errors.h.

References NULL.

16  {
17  if(message) {
18  delete message;
19  message = NULL;
20  }
21  }
#define NULL
Definition: simpletypes.h:9
char * message
Definition: Errors.h:43

Member Function Documentation

const char* IOException::getMessage ( ) const
inline

Definition at line 41 of file Errors.h.

Referenced by SpeciesDB::load(), operator>>(), Model::readFile(), and Model::writeFile().

41 { return message; }
char * message
Definition: Errors.h:43
void IOException::setMessage ( const char *  msg = NULL)
inline

Definition at line 22 of file Errors.h.

References NULL.

22  {
23  if(!msg) {
24  if(message) {
25  if(message[0] != 0) {
26  delete message;
27  message = new char[1];
28  message[0] = 0;
29  }
30  } else {
31  message = new char[1];
32  message[0] = 0;
33  }
34  return;
35  }
36  int len = strlen(msg);
37  if(!len) setMessage(NULL);
38  message = new char[len+1];
39  strcpy(message, msg);
40  }
#define NULL
Definition: simpletypes.h:9
void setMessage(const char *msg=NULL)
Definition: Errors.h:22
char * message
Definition: Errors.h:43

Member Data Documentation

char* IOException::message
protected

Definition at line 43 of file Errors.h.


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