/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/baseobject.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-11-24 17:37:05 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20141124173705-iu97keoxp0qfxlxm
* Made code compile

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 * ---------------------------------------------------
44
44
 */
45
45
 
 
46
BEGIN_DECLS
46
47
 
47
48
typedef struct _SObjectClass SObjectClass;
48
49
 
55
56
 * 
56
57
 */
57
58
struct _SObjectClass {
58
 
  // SObject * (* initize)(SObject *);
59
 
  void (*free)(SObject *);
60
 
  int (*ref)(SObject *);
61
 
  int (*unref)(SObject *);
62
 
  int (*get_refcount)(SObject *);
63
 
  char * (*to_string)(SObject *);
 
59
  void (* initialize)(SObject *);
 
60
  void (* deinitialize);
 
61
  void (* free)(SObject *);
 
62
  int (* ref)(SObject *);
 
63
  int (* unref)(SObject *);
 
64
  int (* get_refcount)(SObject *);
 
65
  char * (* to_string)(SObject *);
64
66
};
65
67
 
66
68
/**
82
84
/** This function is used to set the method to initialize a new instance of an
83
85
 * object.
84
86
 */
85
 
void s_object_set_init_method (SObject * self, SObject * (* method)(* SObject));
 
87
void s_object_set_initialize_method (SObject * self, void (* method)(SObject *));
86
88
 
87
89
/**
88
90
 * This function is used to set the method to deinitialize an object.
89
91
 * 
90
92
 * set it to a method that deinitialize your object.
91
93
 */
92
 
void s_object_set_deinit_method (SObject * self, void (* method)(SObject *));
 
94
void s_object_set_deinitialize_method (SObject * self, void (* method)(SObject *));
93
95
 
94
96
/**
95
97
 * This function is used to set the ref method.
117
119
 */
118
120
void s_object_set_to_string_method (SObject * self, char * (* method)(SObject *));
119
121
 
 
122
/**
 
123
 *
 
124
 */
 
125
void s_object_set_free_method (SObject * self, void (* method)(SObject *));
 
126
 
120
127
 
121
128
/* concrete functions are defined in the C file.
122
129
 */
134
141
 * This function initializes an instance of the SObject, it also sets
135
142
 * the methods to be used with the object and sets the reference count to one.
136
143
 */
137
 
void s_object_initize (SObject * self);
 
144
void s_object_initialize (SObject * self);
138
145
 
139
146
/** @brief
140
147
 * This function creates a new base object.
190
197
 */
191
198
char * s_object_to_string (SObject * self);
192
199
 
 
200
END_DECLS
193
201
 
194
202
#endif