Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCollectible
Inherited By:
MGraphic3D
TPage
MGraphic
TLabel
Purpose:
MDrawable is an abstract base mixin for 2-D and 3-D graphic objects. MDrawable allows a graphic object to draw itself. It also allows a graphic object to be put into a collection, because MDrawable is derived from MCollectible. MDrawable::Draw allows any MDrawable derived class to present itself to the port and the device. (The device or port might not actually be a rendering port.)
Instantiation:
Abstract class; do not allocate.
Deriving Classes:
All deriving classes must define their Draw() behavior and override the Draw() member function.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ MDrawable ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: MDrawable::Draw
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws the graphic to the specific TGrafPort. This is a pure virtual function.
Calling Context:
Call concrete derived classes' Draw functions directly.
Parameters:
- TGrafPort & port -The port to which drawing should go. The port in turn invokes rendering on a particular TGrafDevice.
Return Value:
None.
Exceptions:
Determined by derived classes.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: MDrawable::operator>>=
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream to which the object is streamed out.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: MDrawable::operator<<=
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream from which the object is streamed in.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- MDrawable ()
- MDrawable (const MDrawable &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const MDrawable & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This is a protected function because the class is abstract.
Member Function: MDrawable::operator=
MDrawable & operator =(const MDrawable & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const MDrawable & source -The object to be copied.
Return Value:
Returns a const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This is a protected function because the class is abstract.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.