Class: TLocalServiceReference

Declaration: LocalService.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TServiceReference, MServiceAccess

Inherited By:

None.

Purpose:

Refers to a service that is defined in the local machine. TLocalServiceReference uses an object directory to look up the service when connecting to it.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

You should not derive any classes from TLocalServiceReference.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

TLocalServiceReference is typically not instantiated directly but is created using the CreateReference member function of TServiceDefinition.

Member Function: TLocalServiceReference::TLocalServiceReference

  1. TLocalServiceReference (const TLocalObjectName &)
  2. TLocalServiceReference (const TLocalServiceReference & copy)
  3. TLocalServiceReference ()

Interface Category:

API.

Purpose:

  1. Creates a TLocalServiceReference for the service with the specified name. 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.
  3. Default constructor. Creates an object that does not refer to any service.

Calling Context:

  1. Called to create a reference to a local service.
  2. Called to copy an object.
  3. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

TLocalServiceReference objects should always have a service adaptor, unless the object is intended to be streamed into later.

Member Function: TLocalServiceReference::~TLocalServiceReference

virtual ~ TLocalServiceReference ()

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

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

Interface Category:

API.

Purpose:

Stream-in operator. A TLocalServiceReference can be stream out, then streamed back in and used to connect to the service, if it still exists.

Calling Context:

Called to stream in data. Call this function directly.

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:

If a TLocalServiceReference is streamed to another machine, it will refer to the service (if any) of the same name in that machine, not the original service.

Member Function: TLocalServiceReference::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator. A TLocalServiceReference can be streamed out, then streamed back in and used to connect to the service, if it still exists.

Calling Context:

Called to stream out data. Call this function directly.

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:

If a TLocalServiceReference is streamed to another machine, it will refer to the service (if any) of the same name in that machine, not the original service.

Member Function: TLocalServiceReference::operator=

TLocalServiceReference & operator =(const TLocalServiceReference & copy)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object. Call this function directly.

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: TLocalServiceReference::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Creates a hash value for this TLocalServiceReference.

Calling Context:

Called to create a hash value for this TLocalServiceReference. Call this function directly.

Parameters:

Return Value:

The hash value for this TLocalServiceReference.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalServiceReference::IsEqualTo

virtual bool IsEqualTo (const TServiceReference & toWhat) const

Interface Category:

API.

Purpose:

Evaluates whether two objects refer to the same service.

Calling Context:

Called by TServiceReference::IsEqual.

Parameters:

Return Value:

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

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not 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.