#include <lib_description.h>

An ID class for description elements. Contains a stack of DescLevel objects.
A description ID is used to exactly identify a parameter value.
Private Attributes | |
| std::aligned_storage< sizeof(maxon::BaseArray< DescLevel >), alignof(maxon::BaseArray< DescLevel >)>::type | _private |
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 |
| const DescID & | operator+= (const DescID &s) |
| const friend DescID | operator+ (const DescID &v1, const DescID &v2) |
Read/Write | |
| Bool | Read (HyperFile *hf) |
| Bool | Write (HyperFile *hf) |
Miscellaneous | |
| Int32 | GetDepth () const |
| Bool | IsPartOf (const DescID &cmp, Int32 *pos) const |
| maxon::HashInt | GetHashCode () const |
| 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.
| 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. Assigns 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. |
Get the result of popping levels from the bottom of the stack.
| [in] | shift | Number of levels to pop. 0 <= shift < GetDepth(). |
Add operator. Merges two description IDs.
| [in] | s | Right operand. Source description ID. |
Reads the description ID from hf.
| [in] | hf | The hyper file to read from. The caller owns the pointed hyper file. |
Writes the description ID to hf.
| [in] | hf | The hyper file to write to. The caller owns the pointed hyper file. |
| 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 assigns the length of the match to pos.
| [in] | cmp | The super description ID. |
| [out] | pos | If not nullptr this is assigned the length of the match. |
| maxon::HashInt GetHashCode | ( | ) | const |
Gets a hash code for the description ID.
Add operator. Merges two description IDs.
| [in] | v1 | Left operand. |
| [in] | v2 | Right operand. |
|
private |