WT_Point_Set_Data Class Reference

#include <pointset.h>

Inheritance diagram for WT_Point_Set_Data:

Inheritance graph
[legend]
Collaboration diagram for WT_Point_Set_Data:

Collaboration graph
[legend]
List of all members.

Detailed Description

A base class for a set of WT_Logical_Point objects.

Definition at line 31 of file pointset.h.

Public Member Functions

 WT_Point_Set_Data ()
 Constructs a WT_Point_Set_Data object.
 WT_Point_Set_Data (int count, WT_Logical_Point const *points, WT_Boolean copy) throw (WT_Result)
 Constructs a WT_Point_Set_Data object from a given array of points.
virtual ~WT_Point_Set_Data ()
 Destroys a WT_Point_Set_Data object, and deletes the points if they had been copied in the constructor.
WT_Logical_Pointpoints () const
int allocated () const
void clear ()
int count () const
virtual WT_Boolean first_point_fits_in_16_bits () const
 Returns WD_True if the first point in the set can be expressed using a WT_Logical_Point16 object.
virtual WT_Boolean remaining_points_fit_in_16_bits () const
 Returns WD_True if the remaining points in the set (beyond the first) can be expressed using a WT_Logical_Point16 object.
virtual WT_Boolean operator== (WT_Point_Set_Data const &set) const
 Equality operator. Returns WD_True if the given point set matches this one.
virtual WT_Result de_relativize (WT_File &file)
 Returns the points to absolute values based on their relative position to last materialized point.
virtual WT_Result relativize (WT_File &file)
 Relativizes the points in the set to the last serialized point.
virtual WT_Point_Set_Data
const & 
set (int count, WT_Logical_Point const *points, WT_Boolean copy) throw (WT_Result)
 Sets the current point set with other contents (deletes the current set if allocated.).
virtual WT_Result transform (WT_Transform const &transform)
 Applies the given transform to the point set.

Protected Attributes

WT_Integer32 m_count
 The number of points in the set.
WT_Integer32 m_allocated
 The number of allocated points.
WT_Logical_Pointm_points
 The arrray of points.
WT_Boolean m_transformed
 WD_True if the points have been transformed.
WT_Boolean m_relativized
 WD_True if the points have been relativized.
int m_points_materialized
 The number of points materialized.


Constructor & Destructor Documentation

WT_Point_Set_Data::WT_Point_Set_Data int  count,
WT_Logical_Point const *  points,
WT_Boolean  copy
throw (WT_Result)
 

Constructs a WT_Point_Set_Data object from a given array of points.

Warning:
Be careful when using the copy parameter. If the points are not copied, and they get deallocated, trouble will ensue. It's usually always safe to create copies of the points, but it may not always be a desirable choice due to performance. To help provide a means to mitigate the performance hit taken due to allocation and deallocation, the option is available to refer to the points directly.
Parameters:
count  The number of points in the array.
points  Pointer to the array of points.
copy  Whether the points should be copied or if their addresses should be used directly from the array.


Member Function Documentation

int WT_Point_Set_Data::allocated  )  const [inline]
 

This method is intentionally non-virtual for performance reasons. Returns the number of allocated points (zero if the points were directly referenced in the constructor.)

Definition at line 103 of file pointset.h.

void WT_Point_Set_Data::clear  ) 
 

Clears the list of points, and deletes the points if they had been copied in the constructor. This method is intentionally non-virtual for performance reasons.

Reimplemented in WT_Point_Set.

int WT_Point_Set_Data::count  )  const [inline]
 

Returns the number of points in the set. This method is intentionally non-virtual for performance reasons.

Definition at line 114 of file pointset.h.

WT_Logical_Point* WT_Point_Set_Data::points  )  const [inline]
 

This method is intentionally non-virtual for performance reasons. Returns a pointer to the array of points.

Definition at line 94 of file pointset.h.

virtual WT_Point_Set_Data const& WT_Point_Set_Data::set int  count,
WT_Logical_Point const *  points,
WT_Boolean  copy
throw (WT_Result) [virtual]
 

Sets the current point set with other contents (deletes the current set if allocated.).

Parameters:
count  The number of points in the array.
points  Pointer to the array of points.
copy  Whether the points should be copied or if their addresses should be used directly from the array.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:24 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5