C3D Toolkit  Kernel - 109619, Vision - 2.4.0.75

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=UNDEFINED_SNAME, ESides _sideAdd=MbSNameMaker::i_SideNone, SimpleName _buttAdd=0)
 Constructor.
 
 MbSNameMaker (const MbSNameMaker &other)
 Copy-constructor.
 
void SetName (const MbSNameMaker &other, bool setVersion=false)
 Initialize by another name-maker.
 
SimpleName GetName (size_t i) const
 Get simple name from array with control of overruning.
 
void Inverse ()
 Inversion.
 
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.
 
void SetButtFaceName (MbName &name, MbSNameMaker::ESides side) const
 Generate 'name' name for butt face: mainName, +/-defName, sign is defined by direction.
 
void SetFaceName (MbName &name, size_t i, SimpleName add) const
 Generate 'name' name for face: mainName, hash( sideName, add ).
 
void SetItemName (MbName &name, size_t i) const
 Generate 'name' name on the base of main name and simple name from this names generator.
 
void CompileEdgeName (MbName &name, const MbName *f1, const MbName *f2, size_t ind, bool sameSense) const
 Generate 'name' name for edge from names of faces ('sense' is a direction of edge relative to underlined curve).
 
void CompileEdgeName (MbName &name, const MbName &other) const
 Generate 'name' name by other name, full coincidence.
 
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.
 
 MbNameMaker (const MbName &_name)
 Constructor by name.
 
 MbNameMaker (const MbNameMaker &o)
 Constructor by another generator of names.
 
 ~MbNameMaker ()
 Destructor.
 
SimpleName GetMainName () const
 Access to main name.
 
void SetMainName (SimpleName n)
 Set main name.
 
const VersionContainerGetVersionContainer () const
 Version of manufacture.
 
const MbNameVersionGetMbNameVersion () const
 Version of manufacture.
 
void SetVersion (const MbNameVersion &v)
 Version of manufacture.
 
VERSION GetMathVersion () const
 Get version of the mathematical kernel.
 
void SetMathVersion (VERSION v)
 Set version of the mathematical kernel.
 
void MakeNameBy (SimpleName sn, MbName &name) const
 Generate 'name' name by template and by simple name.
 
void MakeName (SimpleName sn1, SimpleName sn2, MbName &name) const
 Generate 'name' name by two SimpleName simple names.
 
void MakeName (SimpleName sn, MbName &name) const
 Generate 'name' name by SimpleName simple name.
 
void MakeFilletFaceName (const MbName &, MbName &name) const
 Generate 'name' name for fillet face.
 
void SetOriginalMainName (SimpleName orig, MbNamePairList *list)
 Set original main name and table of name correspondence.
 
SimpleName GetOriginalMainName () const
 Source main name.
 
MbNamePairListGetNameList () const
 Table of correspondence of names of originals and of its duplicates.
 
MbNameMaker GetOriginalNameMaker () const
 Get original name maker.
 
bool CleanNameList (std::vector< const MbName *> &delNamesCopies) const
 Clean up unnecessary pairs by name copies.
 
bool ReplaceNameList (const MbName &newNameCopies, const std::vector< const MbName *> &oldNamesCopies) const
 Replace names copies.
 
bool IsSame (const MbNameMaker &) const
 Determine whether an object is equal?
 

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

- Protected Member Functions inherited from MbNameMaker
void MakeNameBy (SimpleName snFirst, SimpleName snCut, MbName &name) const
 Generate 'name' name by template and two simple names.
 
void MakeNameBy (const MbName &source, MbName &name) const
 Generate 'name' name by template and by source for fillet face.
 

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.


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