My Project
Public Member Functions | List of all members
ParaEngine::ClassDescriptor Class Referenceabstract

System keeps a list of the DLL's found on startup. More...

#include <PluginAPI.h>

Inheritance diagram for ParaEngine::ClassDescriptor:
CMonoClassDesc CMonoClassDesc CNPLClassDesc CParaEngineClassDesc ParaEngine::CPhysicsBTClassDesc

Public Member Functions

virtual void * Create (bool loading=false)=0
 return a pointer to an instance of the class.When the system needs to delete an instance of a plugin class, it usually calls a method named DeleteThis(). More...
 
virtual const char * ClassName ()=0
 class name
 
virtual SClass_ID SuperClassID ()=0
 This method returns a system-defined constant describing the class that this plugin class was derived from.
 
virtual Class_ID ClassID ()=0
 uniquely identifies a specific plugin class.
 
virtual const char * Category ()=0
 it may be some predefined category name.
 
virtual HINSTANCE HInstance ()
 returns owning module handle (DLL handle)
 
virtual int IsPublic ()
 whether the class is accessible from the UI. More...
 
virtual int UseGDI ()
 whether the class uses windows GDI to draw controls. More...
 
virtual void * activate (int cmd, void *arg1=0, void *arg2=0, void *arg3=0)
 genetic activation function as the one in the NPL script file. More...
 

Detailed Description

System keeps a list of the DLL's found on startup.

This is the interface to a single class A class descriptor object does the following:

It has several important purposes, but the two main ones relate to classifying the type of object the plugin is, and allocating the memory for instances of the plugin class objects.

A plugin DLL can contain many plugin classes. At runtime, ParaEngine calls your DLL through the LibNumberClasses function and asks how many plugin class it contains. Then with that number, it loops enters a for loop and calls each of your static class descriptors through the LibClassDesc(i) function. After the game engine gets your class descriptor, it then calls the descriptors Create Method to allocate an instance of your plugin.

Each of these plugin classes must have a Class ID.There are two IDs associated with each plugin system object. These are:

Member Function Documentation

§ activate()

virtual void* ParaEngine::ClassDescriptor::activate ( int  cmd,
void *  arg1 = 0,
void *  arg2 = 0,
void *  arg3 = 0 
)
inlinevirtual

genetic activation function as the one in the NPL script file.

§ Create()

virtual void* ParaEngine::ClassDescriptor::Create ( bool  loading = false)
pure virtual

return a pointer to an instance of the class.When the system needs to delete an instance of a plugin class, it usually calls a method named DeleteThis().

plugin developers must implement this method as well. Since a developer uses the new operator to allocate memory, he or she should use the delete operator to de-allocate it.

Implemented in ParaEngine::CPhysicsBTClassDesc, CNPLClassDesc, CParaEngineClassDesc, CMonoClassDesc, and CMonoClassDesc.

§ IsPublic()

virtual int ParaEngine::ClassDescriptor::IsPublic ( )
inlinevirtual

whether the class is accessible from the UI.

§ UseGDI()

virtual int ParaEngine::ClassDescriptor::UseGDI ( )
inlinevirtual

whether the class uses windows GDI to draw controls.


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