Class: TLocalServiceDefinition

Declaration: LocalService.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TServiceDefinition, MServiceAccess

Inherited By:

None.

Purpose:

Defines a service that is visible to clients in the same machine. It is recommended that you not instantiate this class directly, but that you use the TStandardServiceDefinition class instead.

Instantiation:

Always allocate on the heap. This class is reference counted and deletes itself when it becomes unreachable and, therefore, must be allocated on the heap.

Deriving Classes:

Do not derive any classes from TLocalServiceDefinition.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

TLocalServiceDefinition objects cannot be streamed or copied. TLocalServiceDefinition objects cannot be deleted directly. They are deleted automatically when their reference count becomes zero.

Member Function: TLocalServiceDefinition::TLocalServiceDefinition

  1. TLocalServiceDefinition ()
  2. TLocalServiceDefinition (const TLocalObjectName &)

Interface Category:

API.

Purpose:

  1. Creates a service definition and generates a unique name for the service.
  2. Creates a TLocalServiceDefinition with the specified service name.

Calling Context:

  1. Called by the stream-in operators and anywhere the definition of a TLocalServiceDefinition is desired.
  2. Called to create a TLocalServiceDefinition with a specific name.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Both of these constructors use the Primary Object Directory and a default local TServiceAdaptor. It is not possible to create a TLocalServiceDefinition that does not have a local name. When a local name is not provided, a unique local name is generated.

Member Function: TLocalServiceDefinition::CreateServiceReference

virtual TServiceReference * CreateServiceReference (TMemoryHeap * whereToCreate =NIL)

Interface Category:

API.

Purpose:

Returns a reference to the service defined by this object.

Calling Context:

Called to obtain a service reference for this service. Call this function directly.

Parameters:

Return Value:

A TServiceReference that contains the same service name and a reference to the same object directory as this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalServiceDefinition::~TLocalServiceDefinition

virtual ~ TLocalServiceDefinition ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called by the member function Unreachable to destroy this object when the reference count indicates this object is no longer accessible.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This member function is protected and should not be called directly.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.