/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/Error.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-07-12 19:04:18 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150712190418-yi9rfito5ovnf6dy
* Made the code more easy to read.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 * 
47
47
 * An SError represents an error that can occur.
48
48
 */
49
 
typedef struct SError {
 
49
typedef struct
 
50
SError {
50
51
  SObject parent;
51
52
  SErrorPrivate * priv; /** Pimple pointer to the private data. */
52
53
  
55
56
/**
56
57
 * The error class is not changed, no extra methods are needed.
57
58
 */
58
 
typedef struct SErrorClass {
 
59
typedef struct
 
60
SErrorClass {
59
61
  SObjectClass parent_class;
60
62
  
61
63
} SErrorClass;
80
82
/**
81
83
 * Holds the names of the string version of SErrorType.
82
84
 */
83
 
static char *  SErrorTypeName[] __attribute__((unused)) = {
 
85
static char * SErrorTypeName[] __attribute__((unused)) = {
84
86
  "NONE",
85
87
  "INPUT/OUTPUT",
86
88
  "OVERFLOW",
101
103
 *
102
104
 * @param k The key to look up.
103
105
 */
104
 
char * s_error_get_name (SErrorType k);
 
106
char *
 
107
s_error_get_name (SErrorType k);
105
108
 
106
109
/**
107
110
 * the constructor for the an SError
108
111
 */
109
 
SError * s_error_new (SErrorType error, char * message);
 
112
SError *
 
113
s_error_new (SErrorType error, char * message);
110
114
 
111
115
/**
112
116
 * This function calles the deinitize method of the object.
113
117
 */
114
 
void s_error_free (SError * self);
 
118
void
 
119
s_error_free (SError * self);
115
120
 
116
121
/**
117
122
 * This function returns the ErrorType of on object.
118
123
 */
119
 
SErrorType s_error_get_error_type (SError * self);
 
124
SErrorType
 
125
s_error_get_error_type (SError * self);
120
126
 
121
127
/**
122
128
 * This function prints the current error to stdout.
123
129
 */
124
 
void s_error_print_error (SError * self);
 
130
void
 
131
s_error_print_error (SError * self);
125
132
 
126
133
END_DECLS
127
134