Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TSampledSurfacePointArray
Purpose:
TPrimitiveTypeArray is an implementation of a type-safe owning array. It takes ownership of the arguments passed to it. It supports all the regular operations of arrays, plus some convenience operations.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
No classes should be derived from TPrimitiveTypeArray.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TPrimitiveTypeArray (PrimitiveArrayCount size =0)
- TPrimitiveTypeArray (const TPrimitiveTypeArray < AType > & source)
Interface Category:
API.
Purpose:
- Constructor. The primitive array is empty and the default size is set to zero (0). The default value should be changed to the expected initial size of the array.
- Copy constructor.
Calling Context:
- Call this function directly to create either an empty or a specific size array.
- Call this function directly to copy another array.
Parameters:
- PrimitiveArrayCount size =0 -The initial size of the array.
- const TPrimitiveTypeArray < AType > & source -The array to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
~ TPrimitiveTypeArray ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Call this function directly to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
AType GetValue (PrimitiveArrayCount i) const
Interface Category:
API.
Purpose:
Gets the value from a specific array index.
Calling Context:
Call this function directly to get the values from the array.
Parameters:
- PrimitiveArrayCount i -The array index of the needed value.
Return Value:
The value stored at the passed index.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void SetValue (PrimitiveArrayCount i, const AType & p)
Interface Category:
API.
Purpose:
Enters a value into the array.
Calling Context:
Call this function directly to enter a value into the array at a specific index location.
Parameters:
- PrimitiveArrayCount i -The index location.
- const AType & p -The value to be entered.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
PrimitiveArrayCount GetNumberOfValues () const
Interface Category:
API.
Purpose:
Gets the number of values present in the array.
Calling Context:
Call this function directly to find out the number of values in the array.
Parameters:
Return Value:
The number of values present in the array.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void Resize (PrimitiveArrayCount newsize)
Interface Category:
API.
Purpose:
Resizes the array.
Calling Context:
Call this function directly to resize the array to a greater size.
Parameters:
- PrimitiveArrayCount newsize -The new array size.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Will not resize an array to a size smaller than the present size.
- AType & operator [] (PrimitiveArrayCount i)
- AType & operator [] (PrimitiveArrayCount i) const
Interface Category:
API.
Purpose:
- Retrieves the array elements.
- Retrieves the array elements from a constant context.
Calling Context:
- Call this function directly to retrieve the array elements.
- Call this function directly to retrieve the array elements from a constant context.
Parameters:
- PrimitiveArrayCount i -The array index
- PrimitiveArrayCount i -The array index
Return Value:
A reference to the value at the index.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Call this function directly to stream out data.
Parameters:
- TStream & -The stream the object streams itself out to.
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.
TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Call this function directly to stream in data.
Parameters:
- TStream & -The stream the object streams itself in from.
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.
TPrimitiveTypeArray < AType > & operator =(const TPrimitiveTypeArray < AType > & obj)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function directly when an array is assigned to another compatible array.
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.
bool operator ==(const TPrimitiveTypeArray < AType > & obj) const
Interface Category:
API.
Purpose:
Compares two objects for equality.
Calling Context:
Call this function directly to check for equality of items contained in the array, in terms of location and value.
Parameters:
Return Value:
Returns true if the items in the array are equal; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
bool operator != (const TPrimitiveTypeArray < AType > & obj) const
Interface Category:
API.
Purpose:
Compares two objects for inequality.
Calling Context:
Call this function directly to check for inequality of items contained in the array, in terms of location and value.
Parameters:
Return Value:
Returns true if the items in the array are not equal; false otherwise.
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.