4
<title> The (Super) Simple Type System --Terminology </title>
7
<h1> The (Super) Simple Type System -- Terminology </h1>
8
<nav><a href="./index.html"> Back to Index </a></nav>
11
In the Super Simple Type System a function is what it is in standard C.
12
No extra meaning is given to them here.
16
In the Super Simple Type System a method is part of an object.
17
In reality they are just function pointers that point to private
21
most often methods are not to be accessed directly, even if it is
22
possible, it is considered a bad idea, instead use the different object
23
functions that accuses the methods.
26
Methods are stored in the class object. In computer science terms it
27
can be likened to an objects <code>v-table</code>. An example of this
28
<code>deinitize ()</code> method that exists in all objects that has
29
a class set that inherent from
30
<a href="./object_types/SBaseObjectInstance.html"><code>SBaseObjectClass</code></a>:
33
typedef struct _FooClass FooClass;
35
SBaseObjectClass parent_class;
36
void (* foo_method)(Foo *);
40
an instance of this object contains the same <code>v-table</code> as
41
<code>SBaseObjectInstance</code> (and its own method), and as such you
42
can use the <code>s_base_object_free ()</code> function on the object
43
and the method will be run.<sup><a href="#fn1">[*]</a></sup>
46
More on this on the <a href="./inheritance.html">inheritance</a> page.
48
<footer style="padding-top: 10em">
49
<A name="fn1"><p> * Note: You must set your own deinit method,
50
or it will use the <code>SBaseObjectInstance</code> deinit method.</p></A>
51
<!-- <A name="anchor"><p> * Note </p></A> -->