Module_v1 Class Reference

Module interface definition. See Module for details. More...

#include <module.h>

Inheritance diagram for Module_v1:

Module PushModule ViewModule List of all members.

Public Member Functions

virtual ~Module_v1 ()
 Destroys the module, performing any cleanup necessary.
virtual BOOL Init ()
 Called after module's constructor to ask it whether it wants to exist or not. Each module is asked in two passes, so that its existence can depend on another module. If a module does not want to exist, it should return FALSE, whereupon it will be deleted.
virtual UINT32 GetInterfaceVersion ()
virtual void Describe (void *Info)
 Asks a module for more information. The pointer points to a struct such as ModInfo_v1 which the module should fill in. All fields should be filled (NULL is OK for char* variables). The type of the pointer is not explicitly defined so the structure can evolve while keeping backward compatibility.
virtual void * CreateTool (UINT32 ToolID)
 Provide a clean interface from module to kernel code for the creation of tools.

Private Member Functions

 CC_DECLARE_MEMDUMP (Module_v1)

Detailed Description

Module interface definition. See Module for details.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/7/93
See also:
Module

Definition at line 188 of file module.h.


Constructor & Destructor Documentation

Module_v1::~Module_v1  )  [virtual]
 

Destroys the module, performing any cleanup necessary.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 410 of file module.cpp.

00411 {
00412     // Null destructor
00413 }


Member Function Documentation

Module_v1::CC_DECLARE_MEMDUMP Module_v1   )  [private]
 

void * Module_v1::CreateTool UINT32  ToolID  )  [virtual]
 

Provide a clean interface from module to kernel code for the creation of tools.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/93
Parameters:
ToolNumber - The number of the tool to create (1 to NumTools) [INPUTS]
- [OUTPUTS]
Returns:
Pointer to the new instantiation of the desired tool.

Errors: -

Reimplemented in PushModule, and ViewModule.

Definition at line 461 of file module.cpp.

00462 {
00463     return NULL; // Should never call this for the base class
00464 }

void Module_v1::Describe void *  InfoPtr  )  [virtual]
 

Asks a module for more information. The pointer points to a struct such as ModInfo_v1 which the module should fill in. All fields should be filled (NULL is OK for char* variables). The type of the pointer is not explicitly defined so the structure can evolve while keeping backward compatibility.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
Pointer to area to recieve info [INPUTS]
Info area is updated [OUTPUTS]
Returns:
None

Errors: None

Reimplemented in PushModule, and ViewModule.

Definition at line 432 of file module.cpp.

00433 {
00434     // Cast structure into the latest one we understand.
00435     ModInfo_v1 *Info = (ModInfo_v1 *) InfoPtr;
00436     
00437     Info->InterfaceVersion = GetInterfaceVersion();     // You should always have this line.
00438     
00439     // These are all garbage as we should never try to create one of these...
00440     Info->Version = 1;
00441     Info->ID = MODULEID_INVALID;                        // so we never get instantiated
00442     Info->NumTools = 0;
00443     Info->Name = Info->Purpose = Info->Author = NULL;
00444 }

virtual UINT32 Module_v1::GetInterfaceVersion  )  [inline, virtual]
 

Reimplemented in PushModule, and ViewModule.

Definition at line 199 of file module.h.

00199 { return 1; } ;

BOOL Module_v1::Init void   )  [virtual]
 

Called after module's constructor to ask it whether it wants to exist or not. Each module is asked in two passes, so that its existence can depend on another module. If a module does not want to exist, it should return FALSE, whereupon it will be deleted.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if OK, FALSE if module doesn't want to initialise.

Errors: None

Reimplemented in PushModule, and ViewModule.

Definition at line 389 of file module.cpp.

00390 {
00391     return FALSE;                   // Should never try to instantiate a module base class
00392 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:56:16 2007 for Camelot by  doxygen 1.4.4