faudes::RelabelMap Class Reference

Detailed Description

Relabeling map.

Set-valued map to relabeling re-labeling schemes. Technically, this clase is a TaNameSet<TaNameSet>, i.e., a set with a set attribute. The interface provides some extra convenience accessors, e.g. reading from and writing to plain STL map<set<Idx>>

Definition at line 940 of file cfl_nameset.h.

#include <cfl_nameset.h>

Public Member Functions

 RelabelMap (void)
 
 RelabelMap (const RelabelMap &rOtherMap)
 
 RelabelMap (const std::string &rFilename, const std::string &rLabel="")
 
virtual ~RelabelMap (void)
 
const NameSetTarget (const Idx &rSrc) const
 
NameSetTarget (const Idx &rSrc)
 
const NameSetTarget (const std::string &rSrc) const
 
NameSetTarget (const std::string &rSrc)
 
void Target (const std::string &rSrc, const NameSet &rTarget)
 
void Target (const Idx &rSrc, const NameSet &rTarget)
 
virtual bool Insert (const Idx &rSrc, const Idx &rDst)
 
virtual bool Insert (const std::string &rSrc, const std::string &rDst)
 
void FromStlMap (const std::map< Idx, std::set< Idx > > &rMap)
 
void ToStlMap (std::map< Idx, std::set< Idx > > &rMap) const
 
virtual std::string Str (void) const
 
- Public Member Functions inherited from faudes::TaNameSet< NameSet >
 TaNameSet (void)
 
 TaNameSet (const TaNameSet &rOtherSet)
 
 TaNameSet (const NameSet &rOtherSet)
 
 TaNameSet (const std::string &rFilename, const std::string &rLabel="")
 
virtual ~TaNameSet (void)
 
virtual TaNameSetAssign (const TBaseSet< Idx > &rSrc)
 
TaNameSetoperator= (const NameSet &rSrc)
 
virtual bool Insert (const Idx &rIndex)
 
virtual bool Insert (const Idx &rIndex, const NameSet &rAttr)
 
virtual Idx Insert (const std::string &rName)
 
virtual Idx Insert (const std::string &rName, const NameSet &rAttr)
 
virtual void InsertSet (const NameSet &rOtherSet)
 
virtual void InsertSet (const TBaseSet< Idx > &rOtherSet)
 
virtual bool Erase (const Idx &rIndex)
 
virtual bool Erase (const std::string &rName)
 
virtual NameSet::Iterator Erase (const Iterator &pos)
 
virtual void EraseSet (const NameSet &rOtherSet)
 
virtual void EraseSet (const TBaseSet< Idx > &rOtherSet)
 
virtual void RestrictSet (const NameSet &rOtherSet)
 
virtual void RestrictSet (const TBaseSet< Idx > &rOtherSet)
 
virtual void Attributes (const TBaseSet< Idx > &rOtherSet)
 
virtual std::string Str (const Idx &rIndex) const
 
const NameSetAttributeType (void) const
 
NameSetAttributep (const Idx &rElem)
 
NameSetAttributep (const std::string &rName)
 
const NameSetAttribute (const Idx &rElem) const
 
void Attribute (const Idx &rElem, const NameSet &rAttr)
 
void Attribute (const Idx &rElem, const Type &rAttr)
 
const NameSetAttribute (const std::string &rName) const
 
void Attribute (const std::string &rName, const NameSet &rAttr)
 
void Attribute (const std::string &rName, const Type &rAttr)
 
void AttributeTry (const Idx &rElem, const Type &rAttr)
 
- Public Member Functions inherited from faudes::NameSet
 NameSet (void)
 
 NameSet (const NameSet &rOtherSet)
 
 NameSet (const std::string &rFilename, const std::string &rLabel="")
 
virtual ~NameSet (void)
 
SymbolTableSymbolTablep (void) const
 
void SymbolTablep (SymbolTable *pSymTab)
 
bool Insert (const Idx &rIndex)
 
Idx Insert (const std::string &rName)
 
void EraseSet (const NameSet &rOtherSet)
 
void RestrictSet (const NameSet &rOtherSet)
 
void SymbolicName (Idx index, const std::string &rName)
 
void SymbolicName (const std::string &rName, const std::string &rNewName)
 
std::string SymbolicName (Idx index) const
 
Idx Index (const std::string &rName) const
 
bool Exists (const Idx &rIndex) const
 
bool Exists (const std::string &rName) const
 
NameSet::Iterator Find (const Idx &rIndex) const
 
NameSet::Iterator Find (const std::string &rName) const
 
NameSet operator+ (const NameSet &rOtherSet) const
 
NameSet operator- (const NameSet &rOtherSet) const
 
NameSet operator* (const NameSet &rOtherSet) const
 
bool operator<= (const NameSet &rOtherSet) const
 
bool operator>= (const NameSet &rOtherSet) const
 
- Public Member Functions inherited from faudes::TBaseSet< Idx >
 TBaseSet (void)
 
 TBaseSet (const TBaseSet &rOtherSet)
 
 TBaseSet (const std::string &rFilename, const std::string &rLabel="BaseSet")
 
virtual ~TBaseSet (void)
 
virtual void Clear (void)
 
virtual bool IsDefault (void) const
 
Idx Size (void) const
 
bool Empty (void) const
 
virtual std::string Str (const Idx &rElem) const
 
Iterator Begin (void) const
 
Iterator End (void) const
 
virtual bool Valid (const Idx &rElem) const
 
virtual bool Erase (const Idx &rElem)
 
virtual Iterator Erase (const Iterator &pos)
 
virtual void EraseSet (const TBaseSet &rOtherSet)
 
virtual void RestrictSet (const TBaseSet &rOtherSet)
 
virtual bool Disjoint (const TBaseSet &rOtherSet) const
 
virtual bool Insert (const Idx &rElem)
 
virtual Iterator Inject (const Iterator &pos, const Idx &rElem)
 
virtual void Inject (const Idx &rElem)
 
virtual void InsertSet (const TBaseSet &rOtherSet)
 
bool Exists (const Idx &rElem) const
 
Iterator Find (const Idx &rElem) const
 
TBaseSet operator+ (const TBaseSet &rOtherSet) const
 
TBaseSet operator- (const TBaseSet &rOtherSet) const
 
TBaseSet operator* (const TBaseSet &rOtherSet) const
 
bool operator<= (const TBaseSet &rOtherSet) const
 
bool operator>= (const TBaseSet &rOtherSet) const
 
bool operator< (const TBaseSet &rOtherSet) const
 
void DValid (const std::string &rMessage="") const
 
void Detach (DetachMode flag=AttrIncl) const
 
void Lock (void) const
 
virtual bool AttributeTest (const Type &rAttr) const
 
virtual TBaseSetAssignWithoutAttributes (const TBaseSet &rSourceSet)
 
virtual void Attributes (const TBaseSet &rOtherSet)
 
Idx AttributesSize (void) const
 
void ClearAttributes (void)
 
bool EqualAttributes (const TBaseSet &rOtherSet) const
 
virtual AttributeVoidAttributep (const Idx &rElem)
 
virtual const AttributeVoidAttribute (const Idx &rElem) const
 
virtual void Attribute (const Idx &rElem, const Type &rAttr)
 
virtual void ClrAttribute (const Idx &rElem)
 
virtual void FromStl (const std::set< Idx, std::less< Idx > > &rStlSet)
 
virtual void ToStl (std::set< Idx, std::less< Idx > > &rStlSet) const
 
- Public Member Functions inherited from faudes::ExtType
 ExtType (void)
 
 ExtType (const ExtType &rType)
 
virtual ~ExtType (void)
 
const std::string & Name (void) const
 
void Name (const std::string &rName)
 
virtual const std::string & TypeName (void) const
 
virtual void TypeName (const std::string &rType)
 
virtual const std::string & ElementTag (void) const
 
virtual void ElementTag (const std::string &rTag)
 
virtual const std::string & ElementType (void) const
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 
Typeoperator= (const Type &rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::AttrType
 AttrType (void)
 
 AttrType (const AttrType &rSrc)
 
virtual ~AttrType (void)
 
Typeoperator= (const Type &rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 
 Type (const Type &rType)
 
virtual ~Type (void)
 
virtual TypeNew (void) const
 
virtual TypeCopy (void) const
 
virtual const TypeCast (const Type *pOther) const
 
virtual TypeAssign (const Type &rSrc)
 
Typeoperator= (const Type &rSrc)
 
virtual bool Equal (const Type &rOther) const
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
void Write (const Type *pContext=0) const
 
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 
void XWrite (const Type *pContext=0) const
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 
void DWrite (const Type *pContext=0) const
 
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
void SWrite (TokenWriter &rTw) const
 
void SWrite (void) const
 
std::string ToSText (void) const
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 
- Public Member Functions inherited from faudes::TAttrMap< T, Attr, Cmp >
 TAttrMap (TBaseSet< T, Cmp > *pBaseSetRef)
 
virtual ~TAttrMap (void)
 
void AssignWithAttributes (const TBaseSet< T, Cmp > &rSourceSet)
 
const Attr * AttributeType (void) const
 
Attr * Attributep (const T &rElem)
 
const Attr & Attribute (const T &rElem) const
 
void Attribute (const T &rElem, const Type &attr)
 
void Attribute (const T &rElem, const Attr &attr)
 
void AttributeTry (const T &rElem, const Type &attr)
 
bool Insert (const T &rElem)
 
bool Insert (const T &rElem, const Attr &attr)
 
void InsertSet (const TBaseSet< T, Cmp > &rOtherSet)
 
bool Erase (const T &rElem)
 
TBaseSet< T, Cmp >::Iterator Erase (const typename TBaseSet< T, Cmp >::Iterator &pos)
 
void EraseSet (const TBaseSet< T, Cmp > &rOtherSet)
 
void RestrictSet (const TBaseSet< T, Cmp > &rOtherSet)
 

Additional Inherited Members

- Public Types inherited from faudes::TBaseSet< Idx >
enum  DetachMode
 
typedef Iterator CIterator
 
- Static Public Member Functions inherited from faudes::AttrType
static void Skip (TokenReader &rTr)
 
- Protected Types inherited from faudes::TBaseSet< Idx >
typedef std::set< Idx, std::less< Idx > >::iterator iterator
 
typedef std::set< Idx, std::less< Idx > >::const_iterator const_iterator
 
typedef std::map< Idx, AttributeVoid * >::iterator aiterator
 
typedef std::map< Idx, AttributeVoid * >::const_iterator const_aiterator
 
- Protected Types inherited from faudes::TAttrMap< T, Attr, Cmp >
typedef TBaseSet< T, Cmp >::iterator iterator
 
typedef TBaseSet< T, Cmp >::const_iterator const_iterator
 
typedef TBaseSet< T, Cmp >::aiterator aiterator
 
typedef TBaseSet< T, Cmp >::const_aiterator const_aiterator
 
- Protected Member Functions inherited from faudes::TaNameSet< NameSet >
void DoAssign (const TaNameSet &rSourceSet)
 
bool DoEqual (const NameSet &rOtherSet) const
 
- Protected Member Functions inherited from faudes::NameSet
void DoAssign (const NameSet &rSourceSet)
 
bool DoEqual (const NameSet &rOtherSet) const
 
virtual void DoWrite (TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoDWrite (TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoXWrite (TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoRead (TokenReader &tr, const std::string &rLabel="", const Type *pContext=0)
 
- Protected Member Functions inherited from faudes::TBaseSet< Idx >
virtual void DoWriteElement (TokenWriter &rTw, const Idx &rElem, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoXWriteElement (TokenWriter &rTw, const Idx &rElem, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoDWriteElement (TokenWriter &rTw, const Idx &rElem, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoReadElement (TokenReader &rTr, Idx &rElem, const std::string &rLabel, const Type *pContext)
 
virtual void DoSWrite (TokenWriter &rTw) const
 
void DoAssign (const TBaseSet &rSourceSet)
 
bool DoEqual (const TBaseSet &rOtherSet) const
 
void DoAttribute (const Idx &rElem, const Type *pAttr)
 
const AttributeVoidDoAttribute (const Idx &rElem) const
 
AttributeVoidDoAttributeExplicit (const Idx &rElem)
 
TBaseSet< Idx, std::less< Idx > >::Iterator ThisIterator (const typename std::set< Idx, std::less< Idx > >::const_iterator &sit) const
 
void RelinkClients (void)
 
void AttachClient (TBaseSet *pRef) const
 
void DetachClient (TBaseSet *pRef) const
 
void AttachIterator (Iterator *pFit) const
 
void DetachIterator (Iterator *pFit) const
 
- Protected Member Functions inherited from faudes::AttrType
void DoAssign (const AttrType &rSrc)
 
bool DoEqual (const AttrType &rOther) const
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 
bool DoEqual (const Type &rOther) const
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 
- Static Protected Member Functions inherited from faudes::TBaseSet< Idx >
static std::set< Idx, std::less< Idx > > * GlobalEmptySet (void)
 
static std::map< Idx, AttributeVoid * > * GlobalEmptyAttributes (void)
 
- Protected Attributes inherited from faudes::NameSet
SymbolTablempSymbolTable
 
- Protected Attributes inherited from faudes::TBaseSet< Idx >
std::set< Idx, std::less< Idx > > * pSet
 
std::set< Idx, std::less< Idx > > * mpSet
 
std::map< Idx, AttributeVoid * > * pAttributes
 
std::map< Idx, AttributeVoid * > * mpAttributes
 
TBaseSet< Idx, std::less< Idx > > * pHostSet
 
std::list< TBaseSet< Idx, std::less< Idx > > * >::iterator mClientRecord
 
std::list< TBaseSet< Idx, std::less< Idx > > * > * mpClients
 
bool mDetached
 
bool mLocked
 
std::set< Iterator * > mIterators
 
std::set< Idx, std::less< Idx > > * pGes
 
std::map< Idx, AttributeVoid * > * pGea
 
- Protected Attributes inherited from faudes::ExtType
std::string mElementType
 
std::string mElementTagDef
 
std::string mObjectName
 
- Protected Attributes inherited from faudes::TAttrMap< T, Attr, Cmp >
TBaseSet< T, Cmp > * pBaseSet
 

Constructor & Destructor Documentation

◆ RelabelMap() [1/3]

faudes::RelabelMap::RelabelMap ( void  )

Constructor for RelabelMap referring to the static SymbolTable.

Definition at line 614 of file cfl_nameset.cpp.

◆ RelabelMap() [2/3]

faudes::RelabelMap::RelabelMap ( const RelabelMap rOtherMap)

Copy-constructor from other RelabelMap. This also copies the SymbolTable reference, hence the new RelabelMap will use the same SymbolTable as rOtherMap.

Parameters
rOtherMapMap to copy

Definition at line 621 of file cfl_nameset.cpp.

◆ RelabelMap() [3/3]

faudes::RelabelMap::RelabelMap ( const std::string &  rFilename,
const std::string &  rLabel = "" 
)

Constructor from file. This constructor reads a RelabelMap from a file using the DoRead(TokenReader&, const std::string&) function. The section is specified by rLabel and the static SymbolTable is used.

Parameters
rFilenameName of file
rLabelSection for the set in the file;

Definition at line 629 of file cfl_nameset.cpp.

◆ ~RelabelMap()

faudes::RelabelMap::~RelabelMap ( void  )
virtual

Virtual destructor

Definition at line 636 of file cfl_nameset.cpp.

Member Function Documentation

◆ FromStlMap()

void faudes::RelabelMap::FromStlMap ( const std::map< Idx, std::set< Idx > > &  rMap)

Create a copy as plain STL map

Parameters
STLmap to read from

Definition at line 685 of file cfl_nameset.cpp.

◆ Insert() [1/2]

bool faudes::RelabelMap::Insert ( const Idx rSrc,
const Idx rDst 
)
virtual

Extend map by one target element

Parameters
rSrcOriginal index
rDstTarget index to add
Returns
True, if the original index was new to set
Exceptions
Exception
  • no symbolic name for index (id 65)

Definition at line 641 of file cfl_nameset.cpp.

◆ Insert() [2/2]

bool faudes::RelabelMap::Insert ( const std::string &  rSrc,
const std::string &  rDst 
)
virtual

Extend map by one target element

Parameters
rSrcOriginal by name
rDstTarget to add by name
Returns
True, if the original index was new to set

Definition at line 647 of file cfl_nameset.cpp.

◆ Str()

std::string faudes::RelabelMap::Str ( void  ) const
virtual

Pretty String

Returns
a pretty string

Reimplemented from faudes::TaNameSet< NameSet >.

Definition at line 710 of file cfl_nameset.cpp.

◆ Target() [1/6]

NameSet & faudes::RelabelMap::Target ( const Idx rSrc)

Get Target set (writable)

Parameters
rSrcOriginal by index
Returns
Reference to targe set

Definition at line 658 of file cfl_nameset.cpp.

◆ Target() [2/6]

const NameSet & faudes::RelabelMap::Target ( const Idx rSrc) const

Get Target set (read only))

Parameters
rSrcOriginal by index
Returns
Reference to targe set

Definition at line 653 of file cfl_nameset.cpp.

◆ Target() [3/6]

void faudes::RelabelMap::Target ( const Idx rSrc,
const NameSet rTarget 
)

Set Target set

Parameters
rSrcOriginal by index
TargetTarget to set
Returns
Reference to targe set

Definition at line 680 of file cfl_nameset.cpp.

◆ Target() [4/6]

NameSet & faudes::RelabelMap::Target ( const std::string &  rSrc)

Get Target set (writable)

Parameters
rSrcOriginal by name
Returns
Reference to targe set

Definition at line 669 of file cfl_nameset.cpp.

◆ Target() [5/6]

const NameSet & faudes::RelabelMap::Target ( const std::string &  rSrc) const

Get Target set (read only)

Parameters
rSrcOriginal by name
Returns
Reference to targe set

Definition at line 663 of file cfl_nameset.cpp.

◆ Target() [6/6]

void faudes::RelabelMap::Target ( const std::string &  rSrc,
const NameSet rTarget 
)

Set Target set

Parameters
rSrcOriginal by name
TargetTarget to set
Returns
Reference to targe set

Definition at line 674 of file cfl_nameset.cpp.

◆ ToStlMap()

void faudes::RelabelMap::ToStlMap ( std::map< Idx, std::set< Idx > > &  rMap) const

Copy data to a plain STL map

Parameters
rMapSTL map to read from

Definition at line 698 of file cfl_nameset.cpp.


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

libFAUDES 2.33l --- 2025.09.16 --- c++ api documentaion by doxygen