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.
- TLongPoint ()
- TLongPoint (long x, long y)
- TLongPoint (const TGPoint & srcPoint)
- TLongPoint (const TLongPoint &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a new point with the given x- and y-components.
- Creates a new point, initializing with the position given in a TGPoint object.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and can be called directly.
- Called when creating an object with literal values specifying the x- and y-components.
- Called when creating an object using the value in a TGPoint class object.
- Called to copy an object.
Parameters:
- Takes no parameters.
- long x -The x-component of the new position.
- long y -The y-component of the new position.
- const TGPoint & srcPoint -The position to initialize the TLongPoint object with.
- const TLongPoint & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
~ 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:
- const TLongPoint & Src -The value to be added to the current value.
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:
- const TLongPoint & Src -The value to be subtracted from the current value.
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:
- const TLongPoint & Src -The object to be assigned.
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:
- const TLongPoint & Src -The object to be compared with this object.
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:
- const TLongPoint & Src -The object to be compared with this object.
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:
- long x -The x-component of the new location.
- long y -The y-component of the new location.
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:
- 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:
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:
- TStream & towhere -The stream to which the object streams itself out.
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.