ToolListItem Class Reference

Used by the kernel to hold information on a particular tool. Contains a link to the OilTool object associated with the Tool. More...

#include <toollist.h>

Inheritance diagram for ToolListItem:

ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ToolListItem (Tool *NewTool, UINT32 ParentID)
 Create a new ToolListItem with the tool pointer and info fields filled in. The info fields are filled in by interrogating the tool. A new OILTool object is created for this tool, and linked in to the list item. The tool is linked to the ToolListItem via the Parent member variable, as this means it is easy to get hold of the tool's info (ToolInfo object) given a pointer to a tool (otherwise you have to do GetID() and call Tool::Find() to get the Tool info, which is a bit daft).
 ~ToolListItem ()
 Destructor. Deletes the associated Tool and OILTool objects.

Public Attributes

BOOL m_fInitialised
ToolInfo m_ToolInfo
Toolm_pTool

Private Member Functions

 CC_DECLARE_MEMDUMP (ToolListItem)

Detailed Description

Used by the kernel to hold information on a particular tool. Contains a link to the OilTool object associated with the Tool.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/93
See also:
ToolList

Definition at line 122 of file toollist.h.


Constructor & Destructor Documentation

ToolListItem::ToolListItem Tool NewTool,
UINT32  ParentID
 

Create a new ToolListItem with the tool pointer and info fields filled in. The info fields are filled in by interrogating the tool. A new OILTool object is created for this tool, and linked in to the list item. The tool is linked to the ToolListItem via the Parent member variable, as this means it is easy to get hold of the tool's info (ToolInfo object) given a pointer to a tool (otherwise you have to do GetID() and call Tool::Find() to get the Tool info, which is a bit daft).

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/93
Parameters:
NewTool - Pointer to the tool to fill in the list item with. [INPUTS] ParentID - Module ID of the module that provides this tool.

Definition at line 133 of file toollist.cpp.

00134 {
00135     m_fInitialised = FALSE;
00136     NewTool->Describe( &m_ToolInfo );
00137     m_ToolInfo.ParentModuleID = ParentID;
00138     m_pTool = NewTool;
00139     NewTool->Parent = this;
00140 }

ToolListItem::~ToolListItem  ) 
 

Destructor. Deletes the associated Tool and OILTool objects.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/7/93
Returns:
Errors: Asserts if the Tool object is not valid (i.e. NULL)

Definition at line 153 of file toollist.cpp.

00154 {
00155     // m_pTool may be NULL if the tool didn't initialise properly, because the Add() function 
00156     // will 'de-install' the tool from this list item to stop it being deleted
00157     // prematurely.
00158     delete m_pTool;
00159 
00160     // m_pOILTool may be NULL if the 'new' failed so don't assert (and our 
00161     // SimpleCCObject::delete can handle 'delete NULL;').
00162 //  delete m_pOILTool;
00163 }


Member Function Documentation

ToolListItem::CC_DECLARE_MEMDUMP ToolListItem   )  [private]
 


Member Data Documentation

BOOL ToolListItem::m_fInitialised
 

Definition at line 134 of file toollist.h.

Tool* ToolListItem::m_pTool
 

Definition at line 136 of file toollist.h.

ToolInfo ToolListItem::m_ToolInfo
 

Definition at line 135 of file toollist.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:02:00 2007 for Camelot by  doxygen 1.4.4