A Template class of SML::AUTOCLASS. More...
#include <sml/class.h>

Public Types | |
| typedef void(_TYPE::* | VOIDMETHOD )() |
Public Member Functions | |
| AUTOCLASS_NOALLOC_T (void(*SetupFunc)(), CONTEXTTYPE ContextTypesToAllow, CONTEXTTYPE ContextTypesToDisallow=CONTEXTTYPE_NONE) | |
| AUTOCLASS_NOALLOC_T (void(*SetupFunc)()) | |
| void | AddMethod (const char *name, SMLFUNCSIG sig, void(_TYPE::*func)(), PARM *parms, int CreateDate=0, int ModDate=0, const char *ClassName=0, bool bInWin32Native=true, bool bInX=true, bool bRequired=false) |
A Template class of SML::AUTOCLASS.
See documentation on SML::AUTOCLASS Use this template for classes which are pure-virtual base classes which cannot be allocated with new and delete, and which cannot actually be allocated at all. You can also use this class and provide your own ctor, dtor and copy constructor
| typedef void(_TYPE::* SML::AUTOCLASS_NOALLOC_T< _TYPE >::VOIDMETHOD)() |
| SML::AUTOCLASS_NOALLOC_T< _TYPE >::AUTOCLASS_NOALLOC_T | ( | void(*)() | SetupFunc | ) | [inline] |
Constructor.
Every SML::AUTOCLASS should have one static instance. When this instance is constructed, it registers the class so that any SML::CONTEXT created will know about it.
| SetupFunc | Function to call to setup this class. Normally a static method of the class we're representing |
| SML::AUTOCLASS_NOALLOC_T< _TYPE >::AUTOCLASS_NOALLOC_T | ( | void(*)() | SetupFunc, | |
| CONTEXTTYPE | ContextTypesToAllow, | |||
| CONTEXTTYPE | ContextTypesToDisallow = CONTEXTTYPE_NONE | |||
| ) | [inline] |
Constructor.
Every SML::AUTOCLASS should have one static instance. When this instance is constructed, it registers the class so that any SML::CONTEXT created will know about it.
| ContextTypesToAllow | Function to call to setup this class. Normally a static method of the class we're representing SML::CONTEXTTYPEs to install this class for | |
| ContextTypesToDisallow | CONTEXTTYPEs to NOT install this class for |
| void SML::AUTOCLASS_NOALLOC_T< _TYPE >::AddMethod | ( | const char * | name, | |
| SMLFUNCSIG | sig, | |||
| void(_TYPE::*)() | func, | |||
| PARM * | parms, | |||
| int | CreateDate = 0, |
|||
| int | ModDate = 0, |
|||
| const char * | ClassName = 0, |
|||
| bool | bInWin32Native = true, |
|||
| bool | bInX = true, |
|||
| bool | bRequired = false | |||
| ) | [inline] |
Add a method.
This is the main bit of magic. It allows you to define a method and have SML use the C++ implementation directly rather than having to write a wrapper around it.
This can only be used for methods that take up to 3 parameters, and have no overloaded versions in C++. You also cannot use this to define a method with parameters that are optional in SML. (The C++ implementation can have optional parameters, but SML will always pass a value).
The sig parameter tells the return type and the actual C++ type of the parameters. The first letter indicates the return type and the following letters indicate the parameter types. Possible values are:
NOTE: you can pass an MISTRING& by using pv in the SIG_ and STYPE_String in the SML::PARM array for the parameter.
| name | Name of the method | |
| sig | Example, SIG_v_i == function taking an int and returning nothing (void) | |
| parms | parameters for the method (can be NULL if no parms) Parameters. Number and kind must match signature or else... | |
| CreateDate | The date this method was added (YYYYMMDD format) | |
| ModDate | The date this method was changed (0 if not changed since added) | |
| ClassName | Name of return class (if returning a class pointer) | |
| bInWin32Native | Set to false if method not available in WIN32_NATIVE code | |
| bInX | Set to false if method not available in X_NATIVE code | |
| bRequired | Set to true to mark method as required |
1.6.1