AndroMeta  2.0.0
Public Member Functions
Meta::MLibBase Class Reference

Base class for defining static function libraries callable from M. More...

#include <MLibBase.h>

Inheritance diagram for Meta::MLibBase:
Meta::MObject Meta::MProcessor Meta::MObjectBase Meta::MLib

List of all members.

Public Member Functions

 MLibBase ()
virtual ~MLibBase ()
void exportFunction (const mstr &f, size_t args)
void exportFunction (const mstr &f, size_t minArgs, size_t maxArgs)
mnode importFunctions (void *scope, mnode fs)

Detailed Description

Base class for defining static function libraries callable from M.

MLibBase provides a means to define a library of static functions which may be imported into a scope so they may be called from M. MLibBase subclasses define the appropriate process() method and declare the functions to be exported so they may be imported when the library is instantiated. MLibBase subclasses typically export their functions in their constructor. Clients of the library may then choose to do to an import all or selectively import specific functions.


Constructor & Destructor Documentation

Constructor.

virtual Meta::MLibBase::~MLibBase ( ) [virtual]

Destructor.


Member Function Documentation

void Meta::MLibBase::exportFunction ( const mstr f,
size_t  args 
)

Export a function.

Parameters:
fThe function name to export.
argsNumber of function args.
void Meta::MLibBase::exportFunction ( const mstr f,
size_t  minArgs,
size_t  maxArgs 
)

Convenience method to export a function with varying number of args.

Parameters:
fThe function name to export.
minArgsThe minimum number of function args.
maxArgsThe maximum number of function args.
mnode Meta::MLibBase::importFunctions ( void *  scope,
mnode  fs 
)

Import a set of functions into the desired scope. Under normal circumstances, there is no need to call this method directly as it is handled by the framework.


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