#include <c4d_descid.h>
Private Member Functions | |
void | InitStructure () |
void | FreeStructure () |
const DescID & | operator+= (const DescID &d) |
const DescID & | operator+= (const DescLevel &d) |
Private Attributes | |
Int32 | level |
DescLevel * | subids |
Friends | |
const friend DescID | operator+ (const DescID &d1, const DescID &d2) |
Constructor/Destructor | |
DescID () | |
DescID (const DescID &src) | |
DescID (Int32 id1) | |
DescID (const DescLevel &id1) | |
DescID (const DescLevel &id1, const DescLevel &id2) | |
DescID (const DescLevel &id1, const DescLevel &id2, const DescLevel &id3) | |
~DescID () | |
Set/Push/Pop Level | |
void | SetId (const DescLevel &subid) |
void | PushId (const DescLevel &subid) |
void | PopId () |
Operator | |
const DescLevel & | operator[] (Int32 pos) const |
const DescID & | operator= (const DescID &id) |
Bool | operator== (const DescID &d) const |
Bool | operator!= (const DescID &d) const |
const DescID | operator<< (Int32 shift) const |
Read/Write | |
Bool | Read (HyperFile *hf) |
Bool | Write (HyperFile *hf) const |
Miscellaneous | |
Int32 | GetDepth () const |
Bool | IsPartOf (const DescID &cmp, Int32 *diff) const |
Additional Inherited Members | |
Static Public Member Functions inherited from iCustomDataType< DescID > | |
static DescID * | Alloc () |
static void | Free (DescID *&data) |
An ID class for description parameters. Contains a stack of DescLevel objects.
The description ID is used to exactly identify a parameter.
For first-level values (like a Float or Int value) it only consists of one DescLevel. For more complex datatypes like Vector and Gradient it can consist of 2 or more levels.
DescID | ( | ) |
Default constructor.
Creates a description ID with one level.
[in] | id1 | First level. |
Creates a description ID with two levels.
[in] | id1 | First level. |
[in] | id2 | Second level. |
Creates an ID with three levels.
[in] | id1 | First level. |
[in] | id2 | Second level. |
[in] | id3 | Third level. |
~DescID | ( | ) |
Default destructor.
|
private |
|
private |
void SetId | ( | const DescLevel & | subid | ) |
Sets the highest level to subid.
[in] | subid | New top level. |
void PushId | ( | const DescLevel & | subid | ) |
Pushes a new level onto the stack.
[in] | subid | Level to push. |
void PopId | ( | ) |
Pop the highest level from the stack.
Accesses the level at position pos in the stack.
[in] | pos | The position. 0 <= pos < GetDepth() |
Assignment operator. Assign id to the description ID.
[in] | id | Right operand. Source description ID. |
Equality operator. Checks if all levels are equal.
[in] | d | Right operand description ID. |
Inequality operator. Checks if any level is different.
[in] | d | Right operand description ID. |
Gets the result of popping levels from the bottom of the stack.
[in] | shift | Number of levels to pop. 0 <= shift < GetDepth(). |
Int32 GetDepth | ( | ) | const |
Gets the depth of the stack, i.e. the number of levels.
Checks if the description ID is part of cmp and assign the length of the match to diff.
[in] | cmp | The super description ID. |
[in] | diff | If not nullptr this is assigned the length of the match. |
|
private |
|
private |