Public Member Functions | Public Attributes

ShapePSel Class Reference

Search for all occurrences

Detailed Description

See also:
Class BitArray, Class PolyShape.

Description:
This class stores and provides access to shape polygon (spline) selection data. All methods of this class are implemented by the system.
Data Members:
int polys;

The number of splines in the shape.

BitArray sel;

One bit for each spline in the shape.

#include <shpsels.h>

Inheritance diagram for ShapePSel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CoreExport  ShapePSel ()
CoreExport  ShapePSel (ShapePSel &from)
CoreExport  ~ShapePSel ()
CoreExport ShapePSel operator= (ShapePSel &from)
CoreExport BOOL  operator== (ShapePSel &s)
CoreExport void  Insert (int where)
CoreExport void  Delete (int where)
CoreExport void  SetSize (ShapePSel &selset, BOOL save=FALSE)
CoreExport void  SetSize (BezierShape &shape, BOOL save=FALSE)
CoreExport void  SetSize (PolyShape &shape, BOOL save=FALSE)
CoreExport void  Set (int index)
CoreExport void  Set (int index, int value)
CoreExport void  Clear (int index)
CoreExport int  operator[] (int index) const
CoreExport void  ClearAll ()
CoreExport void  SetAll ()
CoreExport void  Toggle ()
CoreExport void  Empty ()
CoreExport BOOL  IsCompatible (ShapePSel &selset)
CoreExport BOOL  IsCompatible (BezierShape &shape)
CoreExport BOOL  IsCompatible (PolyShape &shape)
CoreExport IOResult  Save (ISave *isave)
CoreExport IOResult  Load (ILoad *iload)
CoreExport bool  Delete (const unsigned int *pIndices, unsigned int n)
  Delete multiple entries at once.

Public Attributes

int  polys
BitArray  sel

Constructor & Destructor Documentation

CoreExport ShapePSel ( )
Remarks:
Constructor. Initialize the class members.
CoreExport ShapePSel ( ShapePSel from )
CoreExport ~ShapePSel ( )
Remarks:
Destructor.

Member Function Documentation

CoreExport ShapePSel& operator= ( ShapePSel from )
Remarks:
Assignment operator.
CoreExport BOOL operator== ( ShapePSel s )
CoreExport void Insert ( int  where )
Remarks:
Resizes the BitArray sel to include a new bit at the specified location.
Parameters:
int where

The location for the new bit in the BitArray.
CoreExport void Delete ( int  where )
Remarks:
Deletes the specified bit from the BitArray.
Parameters:
int where

Indicates which bit to delete.
CoreExport void SetSize ( ShapePSel selset,
BOOL  save = FALSE 
)
CoreExport void SetSize ( BezierShape shape,
BOOL  save = FALSE 
)
Remarks:
Sets the number of splines and resizes the BitArray based on the shape passed.
Parameters:
BezierShape& shape

The shape whose splines determine the sizes set.

BOOL save=FALSE

TRUE to keep the previous BitArray contents. FALSE to discard it.
CoreExport void SetSize ( PolyShape shape,
BOOL  save = FALSE 
)
Remarks:
Sets the number of splines and resizes the BitArray based on the shape passed.
Parameters:
PolyShape& shape

The shape whose lines determine the sizes set.

BOOL save=FALSE

TRUE to keep the previous BitArray contents. FALSE to discard it.
CoreExport void Set ( int  index )
Remarks:
Sets the bit specified by the index to 1.
Parameters:
int index

The bit to set.
CoreExport void Set ( int  index,
int  value 
)
Remarks:
Sets the bit specified by the index to the value passed.
Parameters:
int index

The bit to set or clear.

int value

The value to set, either 0 or 1.
CoreExport void Clear ( int  index )
Remarks:
Clears the bit specified by the index to 1.
Parameters:
int index

The bit to clear.
CoreExport int operator[] ( int  index ) const
Remarks:
Array access operator.
CoreExport void ClearAll ( )
Remarks:
Clears all the bits in the array (sets them to 0).
CoreExport void SetAll ( )
CoreExport void Toggle ( )
CoreExport void Empty ( )
Remarks:
Sets the size of sel to 0.
CoreExport BOOL IsCompatible ( ShapePSel selset )
CoreExport BOOL IsCompatible ( BezierShape shape )
CoreExport BOOL IsCompatible ( PolyShape shape )
CoreExport IOResult Save ( ISave isave )
Remarks:
Saves the BitArray to disk.
CoreExport IOResult Load ( ILoad iload )
Remarks:
Loads the BitArray from disk.
Operators:
CoreExport bool Delete ( const unsigned int *  pIndices,
unsigned int  n 
)

Delete multiple entries at once.

Deleting multiple entries at once is faster than deleting one by one by calling Delete(), because the internal bookkeeping only needs to be done once.

Parameters:
[in] indices Point to an array of indices to delete. Indices should be unique, and sorted in ascending order.
[in] n Number of entries in the indices array.
Returns:
false if any of the vertex indices are invalid.
See also:
ShapePSel::Delete

Member Data Documentation

int polys

ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel
ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel ShapePSel