Class: TLightSurrogate

Declaration: LightSource.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

TLightSurrogate is a concrete class intended for use by TSceneBundle in managing its list of light sources. When TSceneBundle::AdoptLight is invoked, it adopts the specified TLight and returns a TLightSurrogate object. You provide this object as an argument in subsequent requests to the TSceneBundle to orphan a light or replace one light with another. For example: TLight *light1, *light2, *light3; TLightSurrogate surrogate1, surrogate2; ... surrogate1 =bundle->adopt(light1); surrogate2 =bundle->adopt(light2); ... light3 =bundle->orphan(surrogate1); The surrogate can be thought of as a key for retrieving a TLight value from the bundle's list of TLights. The key is a TLightSurrogate object, rather than a name.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TLightSurrogate::TLightSurrogate

  1. TLightSurrogate ()
  2. TLightSurrogate (const TGlobalID &)
  3. TLightSurrogate (const TLightSurrogate &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Constructor that creates a surrogate from the given global ID number.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators. You can also call this function directly.
  2. Call this function directly.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLightSurrogate::~TLightSurrogate

virtual ~ TLightSurrogate ()

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

TLightSurrogate & operator =(const TLightSurrogate &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLightSurrogate::operator==

virtual bool operator ==(const TLightSurrogate & source) const

Interface Category:

API.

Purpose:

Compares two TLightSurrogate objects and returns true if they are equal (if they both have the same global ID value).

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if both objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLightSurrogate::operator>>=

virtual TStream & operator >>=(TStream &) 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: TLightSurrogate::operator<<=

virtual TStream & operator <<= (TStream &)

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: TLightSurrogate::GetID

virtual TGlobalID GetID () const

Interface Category:

API.

Purpose:

Gets the global ID value of this light.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The global ID value for this TLightSurrogate.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLightSurrogate::SetID

virtual void SetID (TGlobalID)

Interface Category:

API.

Purpose:

Sets the global ID value of this TLightSurrogate object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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.