C++ API Reference
|
Index type which uses a pair of IndexCount values for the index mapping. More...
#include <adskDataIndexPair.h>
Public Member Functions | |
IndexPair (IndexCount firstValue, IndexCount secondValue) | |
Conversion constructor. More... | |
IndexPair (const IndexPair &rhs) | |
Copy constructor, simplest level. More... | |
IndexPair (const std::string &value) | |
Construct an IndexPair from a string containing the two values. More... | |
~IndexPair () override | |
Default destructor, nothing to do. | |
IndexPair & | operator= (const IndexPair &rhs) |
Class assignment operator. More... | |
void | getIndexPair (IndexCount &first, IndexCount &second) const |
Get the two values comprising this index pair. More... | |
std::string | asString () const override |
Get the IndexPair in string form. More... | |
bool | supportsDenseMode () const override |
Notifies users that this index type can be packed densely. More... | |
IndexCount | denseSpaceBetween (const IndexType &rhs) const override |
Calculate the dense space occupied between two index pairs. More... | |
bool | operator== (const IndexType &rhs) const override |
Equality operator, checks if this IndexPair is the same as another Objects of different types are defined as not equal. More... | |
bool | operator!= (const IndexType &rhs) const override |
Inequality operator, checks if this IndexPair is not the same as another Objects of different types are defined as not equal. More... | |
bool | operator< (const IndexType &rhs) const override |
Less-than operator, checks if this IndexPair is less than another Operator sorts by typeid if the object passed in is not an IndexPair. More... | |
bool | operator<= (const IndexType &rhs) const override |
Less-or-equal operator, checks if this IndexPair is <= another Operator sorts by typeid if the object passed in is not an IndexPair. More... | |
bool | operator> (const IndexType &rhs) const override |
Greater-than operator, checks if this IndexPair is greater than another Operator sorts by typeid if the object passed in is not an IndexPair. More... | |
bool | operator>= (const IndexType &rhs) const override |
Greater-or-equal operator, checks if this IndexPair is >= another Operator sorts by typeid if the object passed in is not an IndexPair. More... | |
virtual bool | operator== (const IndexPair &rhs) const |
Equality operator, checks if this IndexPair is the same as another. More... | |
virtual bool | operator!= (const IndexPair &rhs) const |
Inequality operator, checks if this IndexPair is not the same as another. More... | |
virtual bool | operator< (const IndexPair &rhs) const |
Less-than operator, checks if this IndexPair is less than another. More... | |
virtual bool | operator<= (const IndexPair &rhs) const |
Less-or-equal operator, checks if this IndexPair is <= another. More... | |
virtual bool | operator> (const IndexPair &rhs) const |
Greater-than operator, checks if this IndexPair is greater than another. More... | |
virtual bool | operator>= (const IndexPair &rhs) const |
Greater-or-equal operator, checks if this IndexPair is >= another. More... | |
![]() | |
IndexType (const IndexType &rhs) | |
Copy constructor, simplest level. More... | |
Static Public Member Functions | |
static bool | Debug (const IndexPair *me, adsk::Debug::Print &request) |
Answer a Print request for the IndexPair type. More... | |
static bool | Debug (const IndexPair *me, adsk::Debug::Footprint &request) |
Answer a footprint request for the IndexPair type. More... | |
![]() | |
static bool | Debug (const RefCounted *me, Debug::Print &request) |
Answer a Print request for a RefCounted object. More... | |
static bool | Debug (const RefCounted *me, Debug::Footprint &request) |
Answer a footprint request for a RefCounted object. More... | |
Protected Member Functions | |
IndexPair () | |
Default constructor, should never be used. | |
![]() | |
~IndexType () override | |
Default destructor, nothing to do. | |
IndexType () | |
Default constructor, should never be used. | |
![]() | |
RefCounted () | |
RefCounted default ctor. | |
RefCounted (const RefCounted &) | |
RefCounted copy ctor. | |
virtual | ~RefCounted () |
RefCounted dtor. | |
Protected Attributes | |
IndexCount | fSecondIndex |
First index used for mapping. | |
Static Protected Attributes | |
static std::string | myTypeName = "pair" |
Name used to identify this type. | |
static IndexRegistration | myRegistration |
Name used to identify this type. | |
Friends | |
class | CRTP_IndexType< IndexPair > |
Second index used for mapping. | |
Index type which uses a pair of IndexCount values for the index mapping.
adsk::Data::Stream objects contain a list of data elements. Each element has to be accessed by Index. This is one of the more general index types, a pair of IndexCount values. An adsk::Data::IndexPair element is used to lookup the physical location of a data element, either directly in an array using the dense mode or indirectly through a mapping in the sparse, or mapping, mode.
IndexPair | ( | IndexCount | firstIndex, |
IndexCount | secondIndex | ||
) |
Conversion constructor.
[in] | firstIndex | One of the IndexCounts |
[in] | secondIndex | The other of the IndexCounts |
Copy constructor, simplest level.
[in] | rhs | IndexPair data to be copied |
IndexPair | ( | const std::string & | value | ) |
Construct an IndexPair from a string containing the two values.
[in] | value | String with format "### ###" containing the two index values |
Index::kBadSyntax | Non-numeric values, or less than 2 numbers |
Index::kExcessData | More than 2 numbers in the string |
Class assignment operator.
[in] | rhs | IndexPair data to be copied |
void getIndexPair | ( | IndexCount & | first, |
IndexCount & | second | ||
) | const |
Get the two values comprising this index pair.
[out] | first | First index value of the pair |
[out] | second | Second index value of the pair |
|
overridevirtual |
|
overridevirtual |
Notifies users that this index type can be packed densely.
Implements IndexType.
|
overridevirtual |
Calculate the dense space occupied between two index pairs.
An index pair can be thought of as a matrix so the space occupied by densely packing that matrix [a,b] - [c,d] equals the integral area of a subsection of the infinite matrix at those coordinates
b d +————————-+ | | a| XXXXXXXXXXXXXX | | XXXXXXXXXXXXXX | | XXXXXXXXXXXXXX | | XXXXXXXXXXXXXX | | XXXXXXXXXXXXXX | c| XXXXXXXXXXXXXX | | | +————————-+
[in] | rhs | The other object from whom packing space is to be calculated |
Implements IndexType.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
Answer a Print request for the IndexPair type.
Use the request object to dump all information on the "me" IndexPair, or all static IndexPair information if "me" is NULL.
[in] | me | Pointer to object to debug, NULL means class static |
[out] | request | Print request object |
|
static |
Answer a footprint request for the IndexPair type.
Populate the Footprint request with the information on all data stored within this class if "me" is NULL, otherwise the information stored in the IndexPair object pointed at by "me".
[in] | me | Pointer to object to footprint, NULL means class static |
[out] | request | Footprint object to populate |