Class: TLongPoint

Declaration: LongPoint.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TLongPoint is a class for representing positions where both the x- and y-components are long integers. These positions are used extensively by the painter classes.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None. Do not derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TLongPoint::TLongPoint

  1. TLongPoint ()
  2. TLongPoint (long x, long y)
  3. TLongPoint (const TGPoint & srcPoint)
  4. TLongPoint (const TLongPoint &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a new point with the given x- and y-components.
  3. Creates a new point, initializing with the position given in a TGPoint object.
  4. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and can be called directly.
  2. Called when creating an object with literal values specifying the x- and y-components.
  3. Called when creating an object using the value in a TGPoint class object.
  4. 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: TLongPoint::~TLongPoint

~ TLongPoint ()

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: TLongPoint::operator-

TLongPoint operator -() const

Interface Category:

API.

Purpose:

Unary minus operator. This function returns the negative of the point's current value.

Calling Context:

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

Parameters:

Return Value:

Returns the negative of the point's current value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLongPoint::operator+=

TLongPoint & operator += (const TLongPoint & Src)

Interface Category:

API.

Purpose:

Addition-assignment operator.

Calling Context:

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

Parameters:

Return Value:

A const reference to the left-hand side object, whose contents have undergone the addition operation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLongPoint::operator-=

TLongPoint & operator -=(const TLongPoint & Src)

Interface Category:

API.

Purpose:

Subtraction-assignment operator.

Calling Context:

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

Parameters:

Return Value:

A const reference to the left-hand side object, whose contents have undergone the subtraction operation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLongPoint::operator=

TLongPoint & operator =(const TLongPoint & Src)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

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

bool operator ==(const TLongPoint & Src) const

Interface Category:

API.

Purpose:

Compares this object with another object of the same class to determine if their contents are equal.

Calling Context:

Called when an object is compared with another compatible object.

Parameters:

Return Value:

Returns true if the two objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLongPoint::operator!=

bool operator != (const TLongPoint & Src) const

Interface Category:

API.

Purpose:

Compares this object with another object of the same class to determine if their contents are not equal.

Calling Context:

Called when an object is compared with another compatible object.

Parameters:

Return Value:

Returns true if the two objects are not equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLongPoint::Set

void Set (long x, long y)

Interface Category:

API.

Purpose:

Sets the current value of this point object to equal the position described by the specified x-y values.

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.

Member Function: TLongPoint::operator<<=

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

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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.