FTS class
[FTS Basic Data Structures]


Detailed Description

The FTS class.


Typedefs

typedef void(* fts_instantiate_fun_t )(fts_class_t *)
 Class instantiation function.
typedef unsigned int(* fts_class_hash_function_t )(const fts_atom_t *)
 Class hash function (used by hashtable).
typedef int(* fts_class_equals_function_t )(const fts_object_t *, const fts_object_t *)
 Class equals function.

Function used for the comparison of instances.

typedef void(* fts_class_description_function_t )(fts_object_t *obj, fts_array_t *array)
 Class description function.
typedef void(* fts_class_copy_function_t )(const fts_object_t *, fts_object_t *)
 Class copy function.
typedef void(* fts_class_setelem_function_t )(fts_object_t *o, int ac, const fts_atom_t *at, const fts_atom_t *value)
 Class set element function.
typedef void(* fts_class_getelem_function_t )(fts_object_t *o, int ac, const fts_atom_t *index, fts_atom_t *ret)
 Class get element function.
typedef void(* fts_class_array_function_t )(fts_object_t *obj, fts_array_t *array)
 Class array function.
typedef void(* fts_class_from_list_function_t )(fts_object_t *obj, int ac, const fts_atom_t *at)
 Class "from array" function.
typedef void(* fts_class_dump_function_t )(fts_object_t *obj, fts_dumper_t *dumper)
 Class dump function.
typedef fts_object_t *(* fts_class_guiobject_function_t )(fts_object_t *obj)
 Class GUI interface function.
typedef struct fts_class fts_class_t
 FTS class data type.
typedef struct fts_schema fts_schema_t
 FTS schema data type.

Functions

fts_symbol_t fts_class_get_name (fts_class_t *cl)
 g Get the name of a given class.
fts_class_tfts_class_get_super (fts_class_t *cl)
 Get super class of a given class.
fts_method_t fts_class_get_constructor (fts_class_t *cl)
 Get the constructor of a given class.
fts_method_t fts_class_get_deconstructor (fts_class_t *cl)
 Get deconstructor of a given class.
fts_class_hash_function_t fts_class_get_hash_function (fts_class_t *cl)
 Get hash function of a given class.
fts_class_equals_function_t fts_class_get_equals_function (fts_class_t *cl)
 Get equals function of a given class.
fts_class_description_function_t fts_class_get_description_function (fts_class_t *cl)
 Get description function of a given class.
fts_class_copy_function_t fts_class_get_copy_function (fts_class_t *cl)
 Get copy function of a given class.
fts_class_array_function_t fts_class_get_array_function (fts_class_t *cl)
 Get array function of a given class.
fts_class_from_list_function_t fts_class_get_from_list_function (fts_class_t *cl)
 Get "from array" function of a given class.
fts_class_dump_function_t fts_class_get_dump_function (fts_class_t *cl)
 get dump function of a given class
fts_class_guiobject_function_t fts_class_get_guiobject_function (fts_class_t *cl)
 Get guiobject function of a given class.
fts_hashtable_t fts_class_get_import_handlers (fts_class_t *cl)
 Get import function of a given class.
fts_hashtable_t fts_class_get_export_handlers (fts_class_t *cl)
 Get export function of a given class.
void fts_class_set_super (fts_class_t *cl, fts_class_t *s)
 Set super class for a given class.
void fts_class_set_hash_function (fts_class_t *cl, fts_class_hash_function_t *f)
 Set hash function to given class.
void fts_class_set_equals_function (fts_class_t *cl, fts_class_equals_function_t *f)
 Set equals function to given class.
void fts_class_set_description_function (fts_class_t *cl, fts_class_description_function_t *f)
 Set description function to given class.
void fts_class_set_copy_function (fts_class_t *cl, fts_class_copy_function_t *f)
 Set copy function to a given class.
void fts_class_set_setelem_function (fts_class_t *cl, fts_class_setelem_function_t *f)
 Set index function to a given class.
void fts_class_set_getelem_function (fts_class_t *cl, fts_class_getelem_function_t *f)
 Set index function to a given class.
void fts_class_set_array_function (fts_class_t *cl, fts_class_array_function_t *f)
 Set array function to a given class.
void fts_class_set_from_list_function (fts_class_t *cl, fts_class_from_list_function_t *f)
 Set "from array" function to a given class.
void fts_class_set_dump_function (fts_class_t *cl, fts_class_dump_function_t *f)
 Set dump function to a given class.
void fts_class_set_guiobject_function (fts_class_t *cl, fts_class_guiobject_function_t *f)
 Set guiobject function to a given class.
int fts_class_is_primitive (fts_class_t *cl)
 Tells if given class is a primitive class.
fts_class_doc_t * fts_class_get_method_list (fts_class_t *cl)
 Get list of class method documentation.
fts_class_doc_t * fts_class_get_method_list_count (fts_class_t *cl)
 Get list of class method documentation.
fts_class_doc_t * fts_class_get_doc (fts_class_t *cl)
 Get class documentation.
FTS_API void fts_class_doc_post (fts_class_t *cl)
 Post documentation of given class.
FTS_API int fts_class_doc_get (fts_class_t *cl, fts_array_t *output)
 Appends doc atoms to array.
FTS_API void fts_class_get_messages (const fts_class_t *cl, fts_iterator_t *i)
 Get messages of given class as iterator.
FTS_API int fts_class_has_method (fts_class_t *cl, fts_symbol_t s)
 Check whether the class implements a method for the given message selector.
FTS_API fts_method_t fts_class_get_method (fts_class_t *cl, fts_symbol_t s, fts_class_t *type)
 Get a method of a class by its message symbol and argument type.
FTS_API fts_method_t fts_class_get_method_novarargs (fts_class_t *cl, fts_symbol_t s, fts_class_t *type)
 Get the a non-varargs method of a class by its message symbol.
FTS_API fts_method_t fts_class_get_method_varargs (fts_class_t *cl, fts_symbol_t s)
 Get the varargs method of a class by its message symbol.
FTS_API fts_class_tfts_class_install (fts_symbol_t name, fts_instantiate_fun_t instantiate_fun)
 Install a class.
FTS_API void fts_class_alias (fts_class_t *cl, fts_symbol_t alias)
 Create an alias for a class.
FTS_API void fts_class_init (fts_class_t *cl, unsigned int size, fts_method_t constructor, fts_method_t deconstructor, char *doc)
 Initialize a class.
FTS_API void fts_class_message (fts_class_t *cl, fts_symbol_t s, fts_class_t *type, fts_method_t mth, const char *doc)
 Register a method for a given message and argument type (of a single argument or void).
FTS_API void fts_class_message_void (fts_class_t *cl, fts_symbol_t s, fts_method_t m, const char *doc)
 Register void message.
FTS_API void fts_class_message_number (fts_class_t *cl, fts_symbol_t s, fts_method_t m, const char *doc)
 Register number message.
FTS_API void fts_class_message_symbol (fts_class_t *cl, fts_symbol_t s, fts_method_t m, const char *doc)
 Register symbol message.
FTS_API void fts_class_message_varargs (fts_class_t *cl, fts_symbol_t s, fts_method_t m, const char *doc)
 Register varargs message.


Typedef Documentation

Class copy function.

Function used to copy the data of one instance to another.


Function Documentation

FTS_API void fts_class_alias ( fts_class_t cl,
fts_symbol_t  alias 
)

Create an alias for a class.

Parameters:
cl the class
alias alias name

FTS_API int fts_class_doc_get ( fts_class_t cl,
fts_array_t output 
)

Appends doc atoms to array.

Parameters:
cl the class
output the array
Returns:
....

FTS_API void fts_class_doc_post ( fts_class_t cl  ) 

Post documentation of given class.

Parameters:
cl the class

fts_class_array_function_t fts_class_get_array_function ( fts_class_t cl  ) 

Get array function of a given class.

Parameters:
cl the class

fts_method_t fts_class_get_constructor ( fts_class_t cl  ) 

Get the constructor of a given class.

Parameters:
cl the class
Returns:
constructor method

fts_class_copy_function_t fts_class_get_copy_function ( fts_class_t cl  ) 

Get copy function of a given class.

Parameters:
cl the class
Returns:
copy function

fts_method_t fts_class_get_deconstructor ( fts_class_t cl  ) 

Get deconstructor of a given class.

Parameters:
cl the class
Returns:
deconstructor method

fts_class_description_function_t fts_class_get_description_function ( fts_class_t cl  ) 

Get description function of a given class.

Parameters:
cl the class
Returns:
description function

fts_class_doc_t* fts_class_get_doc ( fts_class_t cl  ) 

Get class documentation.

Parameters:
cl the class
Returns:
class documentation

fts_class_dump_function_t fts_class_get_dump_function ( fts_class_t cl  ) 

get dump function of a given class

Parameters:
cl the class
Returns:
description function

fts_class_equals_function_t fts_class_get_equals_function ( fts_class_t cl  ) 

Get equals function of a given class.

Parameters:
cl the class
Returns:
equals function

fts_hashtable_t fts_class_get_export_handlers ( fts_class_t cl  ) 

Get export function of a given class.

Parameters:
cl the class
Returns:
hashtable of export handlers

fts_class_from_list_function_t fts_class_get_from_list_function ( fts_class_t cl  ) 

Get "from array" function of a given class.

Parameters:
cl the class

fts_class_guiobject_function_t fts_class_get_guiobject_function ( fts_class_t cl  ) 

Get guiobject function of a given class.

Parameters:
cl the class
Returns:
guiobject function

fts_class_hash_function_t fts_class_get_hash_function ( fts_class_t cl  ) 

Get hash function of a given class.

Parameters:
cl the class
Returns:
hash function

fts_hashtable_t fts_class_get_import_handlers ( fts_class_t cl  ) 

Get import function of a given class.

Parameters:
cl the class
Returns:
hashtable of import handlers

FTS_API void fts_class_get_messages ( const fts_class_t cl,
fts_iterator_t i 
)

Get messages of given class as iterator.

Parameters:
cl the class
i iterator

FTS_API fts_method_t fts_class_get_method ( fts_class_t cl,
fts_symbol_t  s,
fts_class_t type 
)

Get a method of a class by its message symbol and argument type.

Parameters:
cl the class
s message symbol
type class of argument
Returns:
the method or NULL if failed

fts_class_doc_t* fts_class_get_method_list ( fts_class_t cl  ) 

Get list of class method documentation.

Parameters:
cl the class
Returns:
root pointer to method list

fts_class_doc_t* fts_class_get_method_list_count ( fts_class_t cl  ) 

Get list of class method documentation.

Parameters:
cl the class
Returns:
number of methods

FTS_API fts_method_t fts_class_get_method_novarargs ( fts_class_t cl,
fts_symbol_t  s,
fts_class_t type 
)

Get the a non-varargs method of a class by its message symbol.

Parameters:
cl the class
s message symbol
type class of argument
Returns:
the method or NULL if failed

FTS_API fts_method_t fts_class_get_method_varargs ( fts_class_t cl,
fts_symbol_t  s 
)

Get the varargs method of a class by its message symbol.

Parameters:
cl the class
s message symbol
Returns:
the method or NULL if failed

fts_symbol_t fts_class_get_name ( fts_class_t cl  ) 

g Get the name of a given class.

Parameters:
cl the class
Returns:
class_name as fts_symbol_t

fts_class_t* fts_class_get_super ( fts_class_t cl  ) 

Get super class of a given class.

Parameters:
cl the class
Returns:
super class

FTS_API int fts_class_has_method ( fts_class_t cl,
fts_symbol_t  s 
)

Check whether the class implements a method for the given message selector.

Parameters:
cl the class
s message selector
Returns:
1 if yes, 0 if not

FTS_API void fts_class_init ( fts_class_t cl,
unsigned int  size,
fts_method_t  constructor,
fts_method_t  deconstructor,
char *  doc 
)

Initialize a class.

Parameters:
cl the class
size the size of its associated C structure (must have fts_object_t as first entry)
constructor constructor method
deconstructor deconstructor method
doc documentation string

FTS_API fts_class_t* fts_class_install ( fts_symbol_t  name,
fts_instantiate_fun_t  instantiate_fun 
)

Install a class.

Create a class (without initializing) and register it by name in the current package.

Parameters:
name the name (NULL for unregistered classes)
instantiate_fun class initialization function
Returns:
the class (handle)

int fts_class_is_primitive ( fts_class_t cl  ) 

Tells if given class is a primitive class.

Parameters:
cl the class
Returns:
1 if yes, 0 if not

FTS_API void fts_class_message ( fts_class_t cl,
fts_symbol_t  s,
fts_class_t type,
fts_method_t  mth,
const char *  doc 
)

Register a method for a given message and argument type (of a single argument or void).

Parameters:
cl the class
s message symbol
type class of argument (NULL for a single argument of any type, fts_void_class for a void method)
mth the method
doc documentation string

FTS_API void fts_class_message_number ( fts_class_t cl,
fts_symbol_t  s,
fts_method_t  m,
const char *  doc 
)

Register number message.

Parameters:
cl the class
s message name
m method
doc documentation string

FTS_API void fts_class_message_symbol ( fts_class_t cl,
fts_symbol_t  s,
fts_method_t  m,
const char *  doc 
)

Register symbol message.

Parameters:
cl the class
s message name
m method
doc documentation string

FTS_API void fts_class_message_varargs ( fts_class_t cl,
fts_symbol_t  s,
fts_method_t  m,
const char *  doc 
)

Register varargs message.

Parameters:
cl the class
s message name
m method
doc documentation string

FTS_API void fts_class_message_void ( fts_class_t cl,
fts_symbol_t  s,
fts_method_t  m,
const char *  doc 
)

Register void message.

Parameters:
cl the class
s message name
m method
doc documentation string

void fts_class_set_array_function ( fts_class_t cl,
fts_class_array_function_t f 
)

Set array function to a given class.

Parameters:
cl the class
f copy function

void fts_class_set_copy_function ( fts_class_t cl,
fts_class_copy_function_t f 
)

Set copy function to a given class.

Parameters:
cl the class
f copy function

void fts_class_set_description_function ( fts_class_t cl,
fts_class_description_function_t f 
)

Set description function to given class.

Parameters:
cl the class
f description function

void fts_class_set_dump_function ( fts_class_t cl,
fts_class_dump_function_t f 
)

Set dump function to a given class.

Parameters:
cl the class
f copy function

void fts_class_set_equals_function ( fts_class_t cl,
fts_class_equals_function_t f 
)

Set equals function to given class.

Parameters:
cl the class
f equals function

void fts_class_set_from_list_function ( fts_class_t cl,
fts_class_from_list_function_t f 
)

Set "from array" function to a given class.

Parameters:
cl the class
f copy function

void fts_class_set_getelem_function ( fts_class_t cl,
fts_class_getelem_function_t f 
)

Set index function to a given class.

Parameters:
cl the class
f get element function

void fts_class_set_guiobject_function ( fts_class_t cl,
fts_class_guiobject_function_t f 
)

Set guiobject function to a given class.

Parameters:
cl the class
f guiobject function

void fts_class_set_hash_function ( fts_class_t cl,
fts_class_hash_function_t f 
)

Set hash function to given class.

Parameters:
cl the class
f hash function

void fts_class_set_setelem_function ( fts_class_t cl,
fts_class_setelem_function_t f 
)

Set index function to a given class.

Parameters:
cl the class
f set element function

void fts_class_set_super ( fts_class_t cl,
fts_class_t s 
)

Set super class for a given class.

Parameters:
cl the class
s the super class


Generated on Wed Aug 24 18:28:43 2011 for FTM API by  doxygen 1.5.6