ShapeSSel Class Reference

ShapeSSel Class Reference

#include <shpsels.h>

Class Description

See also
Class BitArray, Class PolyShape.

Description:
This class stores and provides access to shape segment 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;

An array of BitArrays, one for each spline.
+ Inheritance diagram for ShapeSSel:

Public Member Functions

CoreExport ShapeSSel ()
 
CoreExport ShapeSSel (ShapeSSel &from)
 
CoreExport ~ShapeSSel ()
 
CoreExport ShapeSSeloperator= (ShapeSSel &from)
 
CoreExport BOOL operator== (ShapeSSel &s)
 
CoreExport void Insert (int where, int count=0)
 
CoreExport void Delete (int where)
 
CoreExport void SetSize (ShapeSSel &selset, BOOL save=FALSE)
 
CoreExport void SetSize (BezierShape &shape, BOOL save=FALSE)
 
CoreExport void SetSize (PolyShape &shape, BOOL save=FALSE)
 
CoreExport BitArrayoperator[] (int index)
 
CoreExport void ClearAll ()
 
CoreExport void SetAll ()
 
CoreExport void Toggle ()
 
CoreExport void Empty ()
 
CoreExport BOOL IsCompatible (ShapeSSel &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. More...
 

Public Attributes

int polys
 
BitArraysel
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

Remarks
Constructor. Initialize the class members.

Constructor. The number of splines is set to 0. The BitArray pointer is set to NULL.
Remarks
Destructor. Any BitArrays are freed.

Member Function Documentation

CoreExport ShapeSSel& operator= ( ShapeSSel from)
Remarks
Assignment operator.
CoreExport BOOL operator== ( ShapeSSel s)
CoreExport void Insert ( int  where,
int  count = 0 
)
Remarks
Creates and inserts a new BitArray into sel.
Parameters:
int where

The index into sel indicating where to insert the new BitArray.

int count=0

The number of bits in the new BitArray.
CoreExport void Delete ( int  where)
Remarks
Deletes the specified BitArray from the sel list.
Parameters:
int where

The index into sel indicating which BitArray to delete.
CoreExport void SetSize ( ShapeSSel selset,
BOOL  save = FALSE 
)
CoreExport void SetSize ( BezierShape shape,
BOOL  save = FALSE 
)
Remarks
Sets the number of splines and allocates the corresponding number of BitArrays based on the shape passed. The size of each BitArray is set to the number of segments in each polyline.
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 allocates the corresponding number of BitArrays based on the shape passed. The size of each BitArray is set to the number of segments in each spline.
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 BitArray& operator[] ( int  index)
CoreExport void ClearAll ( )
Remarks
Clears every bit for every poly.
CoreExport void SetAll ( )
CoreExport void Toggle ( )
Remarks
Sets the size of every poly BitArray to 0.
CoreExport BOOL IsCompatible ( ShapeSSel selset)
CoreExport BOOL IsCompatible ( BezierShape shape)
CoreExport BOOL IsCompatible ( PolyShape shape)
CoreExport IOResult Save ( ISave isave)
Remarks
Saves the ShapeSSel to disk.
CoreExport IOResult Load ( ILoad iload)
Remarks
Loads the ShapeSSel 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.

\param[in] pIndices Pointer to an array of indices to delete.  Indices should be unique, and sorted in ascending order.
\param[in] n Number of entries in the indices array.
\return false if any of the vertex indices are invalid.
\see ShapeSSel::Delete

Member Data Documentation

int polys
BitArray* sel