C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Generator of names with additions to name. More...

#include <name_item.h>

+ Inheritance diagram for MbSNameMaker:
+ Collaboration diagram for MbSNameMaker:

Public Types

enum  ESides { i_SideNone = 0 , i_SidePlus = 1 , i_SideMinus = -1 }
 Types of additions to name. More...
 

Public Member Functions

 MbSNameMaker (SimpleName _mainName=c3d::UNDEFINED_SNAME, ESides _sideAdd=MbSNameMaker::i_SideNone, SimpleName _buttAdd=0)
 Constructor.
 
virtual ~MbSNameMaker ()
 Destructor.
 
SimpleName GetSimpleName (size_t i) const
 Get simple name from array with control of overruning.
 
void Inverse ()
 Inversion of simple names array.
 
bool GetNameAsPosition (size_t i, ptrdiff_t &row, ptrdiff_t &col) const
 Get name in form of conditional position in grid of copying (for arrays).
 
void SetSideAdd (ESides s)
 Addition to name of a side face.
 
void SetButtAdd (SimpleName b)
 Addition to name of a butt face.
 
void SetCopyHist (bool setHist)
 Set flag state of working with indices of copying.
 
bool GetCopyHist () const
 Get flag state of working with indices of copying.
 
void SetParentNamesAttributes (bool addPNA)
 Set flag state of addition of name attributes to united faces and edges.
 
bool GetParentNamesAttributes () const
 Get flag state of addition of name attributes to united faces and edges.
 
void SetNamesCount (size_t newCount)
 Set count of names.
 
virtual MbSNameMakerDuplicate () const
 Create a copy. More...
 
virtual void SetNameMaker (const MbSNameMaker &other, bool setVersion=false)
 Initialize by another name-maker.
 
virtual void MakeButtFaceName (MbTopologyItem &item, MbSNameMaker::ESides side) const
 Generate name for butt face: mainName, +/-defName, sign is defined by direction.
 
virtual void MakeFaceName (MbTopologyItem &item, size_t i, SimpleName add) const
 Generate name for face: mainName, hash( sideName, add ).
 
virtual void MakeItemName (MbTopologyItem &item, size_t i) const
 Generate name on the base of main name and simple name from this names generator.
 
virtual void CompileEdgeName (MbTopologyItem &item, const MbName *faceName1, const MbName *faceName2, size_t ind, bool sameSense) const
 Generate name for edge from names of faces ('sense' is a direction of edge relative to underlined curve).
 
virtual void CompileEdgeName (MbTopologyItem &item, const MbName &other) const
 Generate name by other name, full coincidence.
 
virtual void MakeGridName (MbPrimitive &item, size_t i, SimpleName add) const
 Generate name for grid: mainName, hash( sideName, add ).
 
void AddSNameMaker (const MbSNameMaker &other)
 Add name generator.
 
MbSNameMakerGetSNameMakerFrom (size_t iFrom, size_t iTo)
 Create with name of iForm index.
 
MbSNameMaker GetOriginalSNameMaker () const
 Get original name maker.
 
bool IsSame (const MbSNameMaker &) const
 Determine whether an object is equal?
 
- Public Member Functions inherited from SimpleNameArray
 SimpleNameArray (size_t i_max=0, uint16 i_delta=1)
 Constructor.
 
 SimpleNameArray (const SimpleNameArray &other)
 Copy-constructor.
 
void Delta (uint16 newDelta)
 Set an increment by the number of elements while allocating additional memory (1 - autoincrement).
 
void SetMaxDelta (uint16 newDelta)
 Set maximum of increments.
 
size_t Count () const
 Count of elements in array.
 
ptrdiff_t MaxIndex () const
 The last element index.
 
void Reserve (size_t additionalSpace)
 Reserve memory for the specified number of elements.
 
void Flush ()
 Delete all elements from the array without freeing memory.
 
void Adjust ()
 Free unused memory.
 
const SimpleNameGetAddr () const
 Get address of the beginning of the array.
 
SimpleNameoperator[] (size_t loc) const
 Get element by an index.
 
SimpleNameAddAt (const SimpleName &ent, size_t index)
 Insert element by an index.
 
SimpleNameAddAt (const MbName &ent, size_t index)
 Insert name hash by an index.
 
SimpleNameAdd (const SimpleName &ent)
 Add an element to the end of the array.
 
SimpleNameAdd (const MbName &ent)
 Add an element to the end of the array.
 
void RemoveInd (size_t delIndex)
 Delete element by an index.
 
void RemoveInd (size_t firstIdx, size_t lastIdx)
 Delete elements in range from firstIdx to lastIdx-1 inclusive.
 
SimpleNameInsertInd (size_t index, const SimpleName &ent)
 Insert element by an index.
 
SimpleNameInsertInd (size_t index, const MbName &ent)
 Insert name hash by an index.
 
size_t FindIt (const SimpleName &ent) const
 Find object among elements of the array.
 
SimpleNameArrayoperator+= (const SimpleNameArray &other)
 Operator for adding.
 
- Public Member Functions inherited from MbNameMaker
 MbNameMaker (SimpleName mn)
 Constructor by main name. More...
 
 MbNameMaker (const MbName &n)
 Constructor by name. More...
 
virtual ~MbNameMaker ()
 Destructor.
 
SimpleName GetMainName () const
 Get main name.
 
void SetMainName (SimpleName n)
 Set main name. More...
 
const VersionContainerGetVersionContainer () const
 Get a version of manufacture.
 
const MbNameVersionGetMbNameVersion () const
 Get a version of manufacture.
 
void SetVersion (const MbNameVersion &v)
 Set version of manufacture. More...
 
VERSION GetMathVersion () const
 Get version of the mathematical kernel.
 
void SetMathVersion (VERSION v)
 Set version of the mathematical kernel. More...
 
virtual void GetItemName (const MbTopologyItem &item, MbName &name) const
 Get topology item name. More...
 
virtual void SetItemName (const MbName &name, MbTopologyItem &item) const
 Set topology item name. More...
 
virtual bool SetItemMainName (MbTopologyItem &item, bool addOldMainName) const
 Set main name of topology item name. More...
 
virtual bool SetItemCopyIndex (MbTopologyItem &item, SimpleName copyIndex) const
 Set copy index into topology item name. More...
 
virtual bool IsChild (const MbTopologyItem &) const
 Is the name maker a parent for a given topological element?.
 
virtual void MakeName (SimpleName sn1, SimpleName sn2, MbTopologyItem &dstItem) const
 Generate name of topological object by two simple names. More...
 
virtual void MakeName (SimpleName sn, MbTopologyItem &dstItem) const
 Generate name of topological object by simple name. More...
 
virtual void MakeFilletFaceName (const MbName &srcName, MbTopologyItem &dstItem) const
 Generate name for fillet face. More...
 
virtual void MakeNameBy (SimpleName sn, MbTopologyItem &dstItem) const
 Generate name of topological object by template and by simple name. More...
 
void SetOriginalMainName (SimpleName orig, MbNamePairList *list)
 Set original main name and table of name correspondence.
 
SimpleName GetOriginalMainName () const
 Source main name.
 
const MbNamePairListGetNameList () const
 Table of correspondence of names of originals and of its duplicates.
 
MbNamePairListSetNameList () const
 Table of correspondence of names of originals and of its duplicates.
 
MbNameMaker GetOriginalNameMaker () const
 Get original name maker.
 
bool CleanNameList (c3d::ConstNamesVector &delNamesCopies) const
 Clean up unnecessary pairs by name copies.
 
bool ReplaceNameList (const MbName &newNameCopies, const c3d::ConstNamesVector &oldNamesCopies) const
 Replace names copies.
 
bool IsSame (const MbNameMaker &) const
 Determine whether an object is equal?
 
- Public Member Functions inherited from MbRefItem
virtual MbeRefType RefType () const
 Registration type (for copying, duplication).
 
refcount_t GetUseCount () const
 Get count of references (get count of owners of an object).
 
refcount_t AddRef () const
 Increase count of references by one.
 
refcount_t DecRef () const
 Decrease count of references by one.
 
refcount_t Release () const
 Decrease count of references by one and if count of references became zero, then remove itself.
 

Protected Member Functions

 MbSNameMaker (const MbSNameMaker &other)
 Constructor by other name-maker (copy-constructor).
 
- Protected Member Functions inherited from MbNameMaker
 MbNameMaker (const MbNameMaker &nm)
 Constructor by another generator of names. More...
 
void MakeName (SimpleName sn1, SimpleName sn2, MbName &dstName) const
 Generate name by two simple names.
 
void MakeName (SimpleName sn, MbName &dstName) const
 Generate name by simple name.
 
void MakeFilletFaceName (const MbName &srcName, MbName &dstName) const
 Generate name for fillet face.
 
void MakeNameBy (SimpleName sn, MbName &dstName) const
 Generate name by template and by simple name.
 
void MakeNameBy (SimpleName snFirst, SimpleName snCut, MbName &dstName) const
 Generate name by template and two simple names.
 
void MakeNameBy (const MbName &srcName, MbName &dstName) const
 Generate name by template and by source for fillet face.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Protected Attributes

ESides sideAdd
 Addition to name of a side face.
 
SimpleName buttAdd
 Addition to name of a butt face.
 
bool cpyHist
 Whether to add indices of copying and old names to the end (don't write).
 
- Protected Attributes inherited from MbNameMaker
MbName defName
 Name template.
 
MbNameVersion version
 Version of manufacture.
 
SimpleName original
 Source main name.
 
MbNamePairListnameList
 Table of correspondence of names of originals and its duplicates.
 

Friends

readeroperator>> (reader &in, MbSNameMaker &ref)
 Read operator.
 
writeroperator<< (writer &out, const MbSNameMaker &ref)
 Write operator.
 
writeroperator<< (writer &out, MbSNameMaker &ref)
 Write operator.
 

Additional Inherited Members

- Static Public Member Functions inherited from MbNameMaker
static MbTopologyProxyCreateTopologyProxy ()
 Create topology item proxy.
 

Detailed Description

Generator of names with additions to name.

Generator of names (name-maker) of topological objects with addition of information about sources.
Makes names for faces. Do not use the main names from the range MbName::ReservedMainNames (exception - MbName::ReservedMainNames::rmn_DefaultName).

Member Enumeration Documentation

◆ ESides

Types of additions to name.

Enumerator
i_SideNone 

None.

i_SidePlus 

Positive.

i_SideMinus 

Negative.

Member Function Documentation

◆ Duplicate()

MbSNameMaker & MbSNameMaker::Duplicate ( ) const
inlinevirtual

Create a copy.

Create a copy of a shell with registrator.

Returns
Copy of the object.

The documentation for this class was generated from the following file: