SML::CLASS Class Reference

Structure for defining a class in SML. More...

#include <sml/class.h>

List of all members.

Public Member Functions

void GenerateBuilderText (MISTRING &code, const MISTRING &name, const MISTRINGLIST &ParamList)

Public Attributes

CLASSBaseClass
const char * BaseClassName
void *(* Constructor )(void *data, CONTEXT *context, CLASS *)
void *(* CopyConstructor )(void *src, CONTEXT *context, CLASS *, void *dest)
INT32 CreateDate
const char * description
void *(* Destructor )(void *data, CONTEXT *context, CLASS *)
void(* GenerateBuilderTextFunc )(MISTRING &code, const MISTRING &name, const MISTRINGLIST &ParamList)
const RESTRICTIONm_Restriction
CLASSMEMBERmembers
INT32 ModDate
const char * name
CLASSnext
INT8 NotInWin32Native
int OffsetToNext
void * privdata
int size
int sizeofSMLCLASS
int sizeofSMLCLASSMEMBER
void(* UninstallClass )(CLASS *)

Detailed Description

Structure for defining a class in SML.


Member Function Documentation

void SML::CLASS::GenerateBuilderText ( MISTRING code,
const MISTRING name,
const MISTRINGLIST ParamList 
) [inline]

Called to create SMLBuilder text for class.


Member Data Documentation

Leave this 0. InstallClass will look up BaseClassName and set it.

void*(* SML::CLASS::Constructor)(void *data, CONTEXT *context, CLASS *)

Constructors will be called in base to derived class order.

Data passed in will be NULL or preallocated and cleared to the size specified by the largest derived class. If no size is specified, the base class's constructor will get a NULL pointer and is expected to allocate the data itself. Derived classs constructors are expected to use the data passed and return it.

void*(* SML::CLASS::CopyConstructor)(void *src, CONTEXT *context, CLASS *, void *dest)

Copy a class.

If the size field in SML::CLASS is 0, then the copy constructor must malloc and return a copy of src (dest parameter is ignored) This is only used this way in one place currently. For copying colormaps If size is non-zero, src should be coppied into dest and return dest. This is used mostly for assigning into an array of classes. If there is no copy constructor, an array element assignment will use memcpy()

0 means some time before 19980603

Default description which is use to generate the documentation.

void*(* SML::CLASS::Destructor)(void *data, CONTEXT *context, CLASS *)

Destructors are called in derived to base class order.

It's up to you to make sure that if a constructor allocated the data, a destructor frees it. But make sure that only the lowest level destructor frees it or you will illop. If the data was not allocated by a constructor (ie, a size was given in one of the classes, then the data will be free'd automatically

void(* SML::CLASS::GenerateBuilderTextFunc)(MISTRING &code, const MISTRING &name, const MISTRINGLIST &ParamList)

Generate code for SML Builder.

If not NULL and sizeofSMLCLASS allows for it, this will be called when the context is destroyed.

const char* SML::CLASS::name

Name of this type class.

Linked list of registered classes.

If class is a linked list, offset to the "next" pointer (-1 if not).


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

Generated on Sun Oct 7 21:39:07 2012 for TNTsdk 2012 by  doxygen 1.6.1