#include <plugmngr.h>
Inheritance diagram for PlugInHandler:
Public Member Functions | |
PlugInHandler () | |
Main constructor for the plug-in handler in Camelot. | |
~PlugInHandler () | |
Main destructor for the plug-in handler in Camelot. | |
virtual BOOL | Init ()=0 |
Declares a preference that allows you to clear memory in delete(). | |
virtual BOOL | AddFixedPlugIns () |
Add any fixed plug-ins to the list in the plug-in manager and register the op descriptor to the system. By fixed, I mean those which are not file related and hence will be loaded when the specified paths are parsed for plug-ins. This baseclass version does nothing. | |
virtual BOOL | AddPlugIn (PlugInItem *pPlugIn, CCRuntimeClass *pClass=CC_RUNTIME_CLASS(PlugInOp), pfnGetState gs=PlugInOp::GetState) |
Add a plug-in to the list in the plug-in manager and register the op descriptor to the system. | |
virtual BOOL | ParsePlugIn (const PathName &Path, const INT32 PathID)=0 |
virtual BOOL | CreateMainMenuItems (PlugInManager *pManager, MenuItem *pRootMenu, BOOL AddSeparator=FALSE) |
After the plug in list has been sorted alphabetically we must add each item in the list to the main plug-in menu. This is a handler's chance to insert menu options into this menu. This baseclass version does nothing and so needs to be overridden by a handler to do something useful. | |
virtual BOOL | GoingToAddMainMenuItems () |
virtual String_32 | GetUniqueID () const =0 |
virtual TypeOfPlugIn | GetTypeOfPlugIn () const =0 |
virtual String_32 | GetFileTypes () const =0 |
Private Member Functions | |
CC_DECLARE_DYNAMIC (PlugInHandler) |
Definition at line 136 of file plugmngr.h.
|
Main constructor for the plug-in handler in Camelot.
Definition at line 172 of file plugmngr.cpp.
|
|
Main destructor for the plug-in handler in Camelot.
Definition at line 186 of file plugmngr.cpp.
|
|
Add any fixed plug-ins to the list in the plug-in manager and register the op descriptor to the system. By fixed, I mean those which are not file related and hence will be loaded when the specified paths are parsed for plug-ins. This baseclass version does nothing.
Reimplemented in BfxHandler. Definition at line 206 of file plugmngr.cpp. 00207 { 00208 return TRUE; 00209 }
|
|
Add a plug-in to the list in the plug-in manager and register the op descriptor to the system.
Reimplemented in BfxHandler. Definition at line 227 of file plugmngr.cpp. 00228 { 00229 PlugInManager* pManager = GetApplication()->GetPlugInManager(); 00230 if (pManager == NULL) 00231 return FALSE; 00232 00233 if (!pManager->AddPlugIn(pPlugIn)) 00234 ERROR2(FALSE,"Failed to register a plug-in with plug-in manager"); 00235 00236 // Make up a unique name for the plug in 00237 String_32 OpToken = GetUniqueID(); 00238 OpToken += pPlugIn->GetPlugInName(); 00239 // Register this name as an OpDescriptor to the system so that we can use it 00240 // on menus etc. 00241 if (!PlugInOp::RegisterOpToken(OpToken, pPlugIn->GetPlugInName(), pClass, gs)) 00242 ERROR2(FALSE,"Failed to register OpToken for a plug-in"); 00243 00244 // Now see if the family name is registered, if not then register it 00245 OpToken = GetUniqueID(); 00246 OpToken += pPlugIn->GetFamilyName(); 00247 OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OpToken); 00248 if (pOpDesc == NULL) 00249 { 00250 // Register this name as an OpDescriptor to the system so that we can use it 00251 // on menus etc. 00252 if (!PlugInOp::RegisterOpToken(OpToken, pPlugIn->GetFamilyName(), pClass, gs)) 00253 ERROR2(FALSE,"Failed to register OpToken for a plug-in family name"); 00254 } 00255 00256 return TRUE; 00257 }
|
|
|
|
After the plug in list has been sorted alphabetically we must add each item in the list to the main plug-in menu. This is a handler's chance to insert menu options into this menu. This baseclass version does nothing and so needs to be overridden by a handler to do something useful.
Reimplemented in BfxHandler. Definition at line 280 of file plugmngr.cpp. 00282 { 00283 ERROR2IF(pManager == NULL || pRootMenu == NULL,FALSE,"CreateMainMenuItems bad parameters!"); 00284 00285 // This baseclass version does nothing 00286 return TRUE; 00287 }
|
|
Implemented in BfxHandler. |
|
Implemented in BfxHandler. |
|
Implemented in BfxHandler. |
|
Reimplemented in BfxHandler. Definition at line 165 of file plugmngr.h. 00165 { return FALSE; }
|
|
Declares a preference that allows you to clear memory in delete().
Reimplemented from SimpleCCObject. Implemented in BfxHandler. |
|
Implemented in BfxHandler. |