C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Name generator. More...

#include <name_item.h>

+ Inheritance diagram for MbNameMaker:
+ Collaboration diagram for MbNameMaker:

Public Member Functions

 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.
 

Static Public Member Functions

static MbTopologyProxyCreateTopologyProxy ()
 Create topology item proxy.
 

Protected Member Functions

 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

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, MbNameMaker &ref)
 Read operator.
 
writeroperator<< (writer &out, const MbNameMaker &ref)
 Write operator.
 
writeroperator<< (writer &out, MbNameMaker &ref)
 Write operator.
 

Detailed Description

Name generator.

Generator of names of topological objects by the given template.
Do not use the main names from the range MbName::ReservedMainNames (exception - MbName::ReservedMainNames::rmn_DefaultName).

Constructor & Destructor Documentation

◆ MbNameMaker() [1/3]

MbNameMaker::MbNameMaker ( SimpleName  mn)
inline

Constructor by main name.

Constructor by main name.

Parameters
[in]mn- Main name.

◆ MbNameMaker() [2/3]

MbNameMaker::MbNameMaker ( const MbName n)
inline

Constructor by name.

Constructor by name.

Parameters
[in]n- Name.

◆ MbNameMaker() [3/3]

MbNameMaker::MbNameMaker ( const MbNameMaker nm)
inlineprotected

Constructor by another generator of names.

Constructor by another generator of names.

Parameters
[in]nm- Names generator.

Member Function Documentation

◆ SetMainName()

void MbNameMaker::SetMainName ( SimpleName  n)
inline

Set main name.

Set main name.

Parameters
[in]n- Main name.

◆ SetVersion()

void MbNameMaker::SetVersion ( const MbNameVersion v)
inline

Set version of manufacture.

Set version of manufacture.

Parameters
[in]v- Version of manufacture.

◆ SetMathVersion()

void MbNameMaker::SetMathVersion ( VERSION  v)
inline

Set version of the mathematical kernel.

Set version of the mathematical kernel.

Parameters
[in]v- Version of manufacture.

◆ GetItemName()

virtual void MbNameMaker::GetItemName ( const MbTopologyItem item,
MbName name 
) const
virtual

Get topology item name.

Get topology item name.

Parameters
[in]item- Topology item.
[in,out]name- Topology item name copy.

◆ SetItemName()

virtual void MbNameMaker::SetItemName ( const MbName name,
MbTopologyItem item 
) const
virtual

Set topology item name.

Set topology item name.

Parameters
[in]name- Topology item new name.
[in,out]item- Topology item.

◆ SetItemMainName()

virtual bool MbNameMaker::SetItemMainName ( MbTopologyItem item,
bool  addOldMainName 
) const
virtual

Set main name of topology item name.

Set main name of topology item name.

Parameters
[in,out]item- Topology item.
[in]addOldMainName- When it is true remember replaced main name in the copying index.

◆ SetItemCopyIndex()

virtual bool MbNameMaker::SetItemCopyIndex ( MbTopologyItem item,
SimpleName  copyIndex 
) const
virtual

Set copy index into topology item name.

Set (insert) copy index into topology item name.

Parameters
[in,out]item- Topology item.
[in]copyIndex- Copy index.

◆ MakeName() [1/2]

virtual void MbNameMaker::MakeName ( SimpleName  sn1,
SimpleName  sn2,
MbTopologyItem dstItem 
) const
virtual

Generate name of topological object by two simple names.

Generate name of topological object by by two simple names.

Parameters
[in]sn1- Simple name #2.
[in]sn2- Simple name #2.
[in,out]dstItem- Topology item.

◆ MakeName() [2/2]

virtual void MbNameMaker::MakeName ( SimpleName  sn,
MbTopologyItem dstItem 
) const
virtual

Generate name of topological object by simple name.

Generate name of topological object by simple name.

Parameters
[in]sn- Simple name.
[in,out]dstItem- Topology item.

◆ MakeFilletFaceName()

virtual void MbNameMaker::MakeFilletFaceName ( const MbName srcName,
MbTopologyItem dstItem 
) const
virtual

Generate name for fillet face.

Generate name for fillet face.

Parameters
[in]srcName- Source name.
[in,out]dstItem- Topology item.

◆ MakeNameBy()

virtual void MbNameMaker::MakeNameBy ( SimpleName  sn,
MbTopologyItem dstItem 
) const
virtual

Generate name of topological object by template and by simple name.

Generate name of topological object by template and by simple name.

Parameters
[in]sn- Simple name.
[in,out]dstItem- Topology item.

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