Class: TPrinterAttribute

Declaration: PrintPrimitives.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TPageDescription TDestinationBin TDocumentFinishing TPrintMedia TResolution TSourceTray

Purpose:

This is a primitive base class for all printer related attributes. It provides protocol for naming attributes of a similar type and for comparing attributes of the same name. It is abstract so that only derived classes use this property. Examples of printer attributes are paper trays, output bins, and finishing properties.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

All attributes associated with a printer are expected to derive from this base class. Any attribute of a printing device such as paper media, inks, ribbon, font sets, and so forth, would naturally descend from this class. The only function requiring overriding is GetName which returns a client or user readable name as a TToken. The name is simply used as a way of differentiating by visual inspection the difference between similar attributes.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TPrinterAttribute::~TPrinterAttribute

virtual ~ TPrinterAttribute ()

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:

Multithread safe.

Other Considerations:

None.

Member Function: TPrinterAttribute::GetName

virtual TToken GetName () const

Interface Category:

API.

Purpose:

Returns the name in token form of the particular printer attribute.

Calling Context:

Called by any client of any printer attribute to get the name of the attribute being referenced.

Parameters:

Return Value:

Returns the name of the attribute as a token.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPrinterAttribute::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPrinterAttribute::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPrinterAttribute::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPrinterAttribute::TPrinterAttribute

  1. TPrinterAttribute ()
  2. TPrinterAttribute (const TPrinterAttribute &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and derived classes.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.