|
C3D Toolkit
Kernel - 118057, Vision - 2.14.7.1821
|
A name of an object. More...
#include <name_item.h>
Collaboration diagram for MbName:Public Types | |
| enum | EIndexes { i_Main , i_First , i_Cut , i_Copy , i_Extra , i_PseudoCopy = -1 } |
| A name index. More... | |
| enum | BaseNameIndex { bni_Main , bni_First , bni_Cut , bni_Total } |
| Main index of name. More... | |
| enum | ExtraNameIndex { eni_Copy , eni_Extra , eni_Total } |
| Additional index of name. More... | |
| enum | ReservedMainNames { rmn_EmergencyName = -5 , rmn_DummyFaceName = -4 , rmn_ReservedName = -3 , rmn_SectionItemName = -2 , rmn_DefaultName = -1 } |
| Reserved main names. More... | |
Public Member Functions | |
| MbName () | |
| Default constructor. | |
| MbName (const MbName &other) | |
| Copy-constructor. More... | |
| virtual | ~MbName () |
| Destructor. | |
| SimpleName | GetMainName () const |
| Get main name. | |
| bool | SetMainName (SimpleName mn) |
| Set main name. More... | |
| void | SetName (const MbName &n, bool setFlags=true) |
| Set name. More... | |
| bool | IsEmpty () const |
| Whether the array of name identifiers is empty. More... | |
| size_t | CountAll () const |
| Get the number of elements in array. | |
| size_t | CountBase () const |
| Get the number of array elements in base part. | |
| void | AddNamesBase (SimpleNameArray &to) const |
| Extract names into array. | |
| SimpleName | GetNameBase (size_t i) const |
| Get or generate the main name. | |
| SimpleName | GetNameExtra (size_t i) const |
| Get or generate the additional name. | |
| bool | IsCutIndex () const |
| Get an index of a cutaway. | |
| bool | GetCutIndex (SimpleName &cutIndex) const |
| Get an cut index. More... | |
| void | SetCutIndex (SimpleName cutIndex) |
| Set an cut index. More... | |
| bool | RemoveCutIndex () |
| Delete an index of cutaway. | |
| SimpleName | GetFirstName () const |
| Get first name. | |
| SimpleName | GetFirstNameDirect () const |
| Direct access to the first name. | |
| void | SetFirstNameDirect (SimpleName fi) |
| Direct access to the first name. | |
| bool | IsCutFlag () const |
| Get flag of cutaway. | |
| void | SetCutFlag (bool s=true) |
| Set flag of cutaway. | |
| void | SetSheet (bool s) |
| Set flag of sheet primitive. | |
| void | SetInnerBend (bool s) |
| Set flag of internal part of bend. | |
| void | SetOuterBend (bool s) |
| Set flag of external part of bend. | |
| void | SetSideBend (bool s) |
| Set flag of side part of bend. | |
| void | SetStampRibBend (bool s) |
| Set flag of reinforcement rib part of sheet solid. | |
| void | SetSweptFlange (bool s) |
| Set flag of a swept flange. | |
| bool | IsSheet () const |
| Get flag of sheet primitive. | |
| bool | IsInnerBend () const |
| Get flag of internal part of bend. | |
| bool | IsOuterBend () const |
| Get flag of external part of bend. | |
| bool | IsSideBend () const |
| Get flag of side part of bend. | |
| bool | IsStampRibBend () const |
| Get flag of reinforcement rib part of sheet solid. | |
| bool | IsSweptFlange () const |
| Get flag of a swept flange. | |
| void | SetCopyIndex (SimpleName ci) |
| Set an index of copying. | |
| bool | GetCopyIndex (SimpleName &ci) const |
| Get an index of copying. | |
| bool | SetCopyPosition (size_t row, size_t col) |
| Set a position in grid of copying. More... | |
| bool | GetCopyPosition (ptrdiff_t &row, ptrdiff_t &col) |
| Get position in grid of copying. More... | |
| bool | IsCopied () const |
| Whether the indices of copying can be obtained. | |
| SimpleName | GetCopySourceName () const |
| Get the main name of source for copying, to be called only after check by IsCopied();. | |
| void | GetCopyIndices (SArray< SimpleName > &indexes, size_t &count) const |
| Get array of copying indices. More... | |
| SimpleName | Hash () const |
| Calculate hash of itself. | |
| bool | operator== (const MbName &) const |
| An equality operator. | |
| bool | operator< (const MbName &) const |
| Comparison operator. | |
| bool | operator!= (const MbName &n) const |
| Inequality operator. | |
| void | GetProperties (MbProperties &) |
| Get properties of the object. | |
| void | SetProperties (const MbProperties &) |
| Set properties of the object. | |
| void | ToString (c3d::string_t &strName) const |
| Convert name to string. | |
| void | FromString (const c3d::string_t &strName) |
| Convert name from string. | |
| size_t | SizeOf () const |
| Size in memory. | |
| void | operator= (const MbName &other) |
| An assignment operator. | |
| void | Assign (const MbName &other) |
| Assignment function (without copying of flags). | |
| void | MakeTemplate () |
| Create template from name. | |
Static Public Member Functions | |
| static UniqueNamePtr | UniqueFaceName () |
| Unique name of dummy face. More... | |
Static Public Attributes | |
| static const UniqueNamePtr | uniqueFaceName |
| Unique name of dummy face. | |
| static const UniqueNamePtr | defaultUndefinedName |
| Default undefined name. | |
Protected Types | |
| enum | EFlags { f_Cut = 0x01 , f_Sheet = 0x02 , f_InnerBend = 0x04 , f_OuterBend = 0x08 , f_SideBend = 0x10 , f_RibBend = 0x20 , f_SweptFlange = 0x40 } |
| Flags. More... | |
Protected Attributes | |
| MbIdArr | defNames |
| An array of identifiers. | |
Friends | |
| class | MbNameMaker |
| class | MbSNameMaker |
| int | MbDefNameCompare (const MbName &n1, const MbName &n2) |
| Name comparison function. More... | |
| int | MbMemDefNameCompare (const MbName &n1, const MbName &n2) |
| Name comparison function. More... | |
A name of an object.
A name of a topological object (automatically generated attribute).
Do not use the main names from the range MbName::ReservedMainNames (exception - MbName::ReservedMainNames::rmn_DefaultName).
| enum MbName::EIndexes |
Reserved main names.
| Enumerator | |
|---|---|
| rmn_EmergencyName | Emergency name for replacing. |
| rmn_DummyFaceName | Default name of dummy face. |
| rmn_ReservedName | Reserved name. |
| rmn_SectionItemName | Section item name. |
| rmn_DefaultName | Default name (= c3d::SIMPLENAME_MAX). |
|
protected |
Flags.
|
inline |
Copy-constructor.
Copy-constructor.
Copy-constructor.
| [in] | other | - Other name. |
|
inline |
Set main name.
Set main name.
| [in] | mn | - Main name. |
Set name.
Set other name.
| [in] | n | - Name. |
| [in] | setFlags | - Copy name flags. |
|
inline |
Whether the array of name identifiers is empty.
Clear array of name identifiers.
|
inline |
Get an cut index.
Get an index of a cutaway.
| [out] | cutIndex | - Cut index. |
| void MbName::SetCutIndex | ( | SimpleName | cutIndex | ) |
Set an cut index.
Set an index of a cutaway.
| [in] | cutIndex | - Cut index. Set an index of cutaway. |
| bool MbName::SetCopyPosition | ( | size_t | row, |
| size_t | col | ||
| ) |
Set a position in grid of copying.
Set a copy position in the copy grid when the object is reproduced on a rectangular or concentric grid.
| [in] | row | - Index of row. |
| [in] | col | - Index of column. |
| bool MbName::GetCopyPosition | ( | ptrdiff_t & | row, |
| ptrdiff_t & | col | ||
| ) |
Get position in grid of copying.
Get a copy position in the copy grid when the object is reproduced on a rectangular or concentric grid.
| [out] | row | - Index of row. |
| [out] | col | - Index of column. |
| void MbName::GetCopyIndices | ( | SArray< SimpleName > & | indexes, |
| size_t & | count | ||
| ) | const |
Get array of copying indices.
Get the given count of copying indices in reverse order. If requested more than exist, then nothing will be returned.
| [out] | indexes | - Array of copying indices. |
| [in,out] | count | - Count of the requested indices [in], count of the obtained indices [out]. |
|
inlinestatic |
Unique name of dummy face.
Default undefined name.
Name comparison function.
Name comparison function for work with sorted structures.
Name comparison function.
Name comparison function returns:
-1, if n1 < n2;
0, if n1 == n2;
+1, if n1 > n2;