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.
- TLocalServiceReference (const TLocalObjectName &)
- TLocalServiceReference (const TLocalServiceReference & copy)
- TLocalServiceReference ()
Interface Category:
API.
Purpose:
- Creates a TLocalServiceReference for the service with the specified name. Default values are provided for the service adaptor and object directory.
- Copies a service reference. All parameters are copied, but the new reference is not active.
- Default constructor. Creates an object that does not refer to any service.
Calling Context:
- Called to create a reference to a local service.
- Called to copy an object.
- 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.
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.
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:
- TStream & fromWhere -The stream from which the object streams itself 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:
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.
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:
- TStream & toWhere -The stream from which the object streams itself in.
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.
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.
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.
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.