Class: TServiceReference

Declaration: ServiceAccess.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TLocalServiceReference TNetworkServiceReference TLocalServiceReference

Purpose:

Refers to a service.

Instantiation:

TServiceReference is an abstract class and cannot be instantiated. Classes can be derived from TServiceReference to refer to specific services.

Deriving Classes:

Derived classes must provide implementations for the member functions Activate, IsEqualTo and CreateChannel. Classes derived from TServiceReference include TLocalServiceReference and TNetworkServiceReference.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TServiceReference::~TServiceReference

virtual ~ TServiceReference ()

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: TServiceReference::operator=

TServiceReference & operator =(const TServiceReference & copy)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TServiceReference::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Creates a hash value for this TServiceReference.

Calling Context:

Called to create a hash value for this TServiceReference.

Parameters:

Return Value:

The hash value for this TServiceReference.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TServiceReference::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:

Not multithread safe.

Other Considerations:

None.

Member Function: TServiceReference::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:

Not multithread safe.

Other Considerations:

None.

Member Function: TServiceReference::TServiceReference

  1. TServiceReference ()
  2. TServiceReference (const TServiceReference &)

Interface Category:

API.

Purpose:

  1. Creates a TServiceReference for the object name specified. Default values are provided for the service adaptor and object directory.
  2. Copies a service reference. All parameters are copied, but the new reference is not active.

Calling Context:

  1. Called by the stream-in operators and anywhere the definition of a TServiceReference is desired.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Classes derived from TServiceReference are typically not instantiated directly. Instead, they are created using TServiceDefinition's member function CreateReference.

Member Function: TServiceReference::IsEqualTo

virtual bool IsEqualTo (const TServiceReference & that) const

Interface Category:

API.

Purpose:

Compare this object with another object of the same class, for equality.

Calling Context:

Called by IsEqual.

Parameters:

Return Value:

Returns true if this object and the object supplied refer to the same service.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Derived classes must implement this member function. The implementation of this function should assume that the actual (concrete) class of the parameter is the same as the actual class of this object; the caller (IsEqual) guarantees this.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.