Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
StdObjMgt_MapOfInstantiators Class Reference

#include <StdObjMgt_MapOfInstantiators.hxx>

Inheritance diagram for StdObjMgt_MapOfInstantiators:
Inheritance graph
[legend]

Public Member Functions

template<class Persistent >
void Bind (const TCollection_AsciiString &theTypeName)
 
- Public Member Functions inherited from NCollection_DataMap< TCollection_AsciiString, StdObjMgt_Persistent::Instantiator >
iterator begin () const noexcept
 Returns an iterator pointing to the first element in the map.
 
iterator end () const noexcept
 Returns an iterator referring to the past-the-end element in the map.
 
const_iterator cbegin () const noexcept
 Returns a const iterator pointing to the first element in the map.
 
const_iterator cend () const noexcept
 Returns a const iterator referring to the past-the-end element in the map.
 
ItemsView Items ()
 Returns a view for key-value pair iteration. Usage: for (auto [aKey, aValue] : aMap.Items())
 
ConstItemsView Items () const
 Returns a const view for key-value pair iteration. Usage: for (const auto& [aKey, aValue] : aMap.Items())
 
 NCollection_DataMap ()
 Empty Constructor.
 
 NCollection_DataMap (const size_t theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor.
 
 NCollection_DataMap (const int theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor (legacy int-taking).
 
 NCollection_DataMap (const NCollection_DefaultHasher< TCollection_AsciiString > &theHasher, const size_t theNbBuckets=1, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (copy).
 
 NCollection_DataMap (const NCollection_DefaultHasher< TCollection_AsciiString > &theHasher, const int theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (copy, legacy int-taking).
 
 NCollection_DataMap (NCollection_DefaultHasher< TCollection_AsciiString > &&theHasher, const size_t theNbBuckets=1, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (move).
 
 NCollection_DataMap (NCollection_DefaultHasher< TCollection_AsciiString > &&theHasher, const int theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (move, legacy int-taking).
 
 NCollection_DataMap (const NCollection_DataMap &theOther)
 Copy constructor.
 
 NCollection_DataMap (NCollection_DataMap &&theOther) noexcept
 Move constructor.
 
void Exchange (NCollection_DataMap &theOther) noexcept
 Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well!
 
const NCollection_DefaultHasher< TCollection_AsciiString > & GetHasher () const noexcept
 Returns const reference to the hasher.
 
NCollection_DataMapAssign (const NCollection_DataMap &theOther)
 Assignment. This method does not change the internal allocator.
 
NCollection_DataMapoperator= (const NCollection_DataMap &theOther)
 Assignment operator.
 
NCollection_DataMapoperator= (NCollection_DataMap &&theOther) noexcept
 Move operator.
 
void ReSize (const size_t N)
 ReSize.
 
void ReSize (const int N)
 
bool Bind (const TCollection_AsciiString &theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 Bind binds Item to Key in map.
 
bool Bind (TCollection_AsciiString &&theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 Bind binds Item to Key in map.
 
bool Bind (const TCollection_AsciiString &theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 Bind binds Item to Key in map.
 
bool Bind (TCollection_AsciiString &&theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 Bind binds Item to Key in map.
 
StdObjMgt_Persistent::InstantiatorBound (const TCollection_AsciiString &theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 Bound binds Item to Key in map.
 
StdObjMgt_Persistent::InstantiatorBound (TCollection_AsciiString &&theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 Bound binds Item to Key in map.
 
StdObjMgt_Persistent::InstantiatorBound (const TCollection_AsciiString &theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 Bound binds Item to Key in map.
 
StdObjMgt_Persistent::InstantiatorBound (TCollection_AsciiString &&theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 Bound binds Item to Key in map.
 
bool TryBind (const TCollection_AsciiString &theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 TryBind binds Item to Key in map only if Key is not yet bound.
 
bool TryBind (TCollection_AsciiString &&theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 TryBind binds Item to Key in map only if Key is not yet bound.
 
bool TryBind (const TCollection_AsciiString &theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 TryBind binds Item to Key in map only if Key is not yet bound.
 
bool TryBind (TCollection_AsciiString &&theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 TryBind binds Item to Key in map only if Key is not yet bound.
 
StdObjMgt_Persistent::InstantiatorTryBound (const TCollection_AsciiString &theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 TryBound binds Item to Key in map only if Key is not yet bound.
 
StdObjMgt_Persistent::InstantiatorTryBound (TCollection_AsciiString &&theKey, const StdObjMgt_Persistent::Instantiator &theItem)
 TryBound binds Item to Key in map only if Key is not yet bound.
 
StdObjMgt_Persistent::InstantiatorTryBound (const TCollection_AsciiString &theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 TryBound binds Item to Key in map only if Key is not yet bound.
 
StdObjMgt_Persistent::InstantiatorTryBound (TCollection_AsciiString &&theKey, StdObjMgt_Persistent::Instantiator &&theItem)
 TryBound binds Item to Key in map only if Key is not yet bound.
 
bool Emplace (K &&theKey, Args &&... theArgs)
 Emplace constructs value in-place; if key exists, destroys and reconstructs value.
 
StdObjMgt_Persistent::InstantiatorEmplaced (K &&theKey, Args &&... theArgs)
 Emplaced constructs value in-place; if key exists, destroys and reconstructs value.
 
bool TryEmplace (K &&theKey, Args &&... theArgs)
 TryEmplace constructs value in-place only if key not already bound.
 
StdObjMgt_Persistent::InstantiatorTryEmplaced (K &&theKey, Args &&... theArgs)
 TryEmplaced constructs value in-place only if key not already bound.
 
bool IsBound (const TCollection_AsciiString &theKey) const
 IsBound.
 
std::optional< std::pair< std::reference_wrapper< const TCollection_AsciiString >, std::reference_wrapper< const StdObjMgt_Persistent::Instantiator > > > Contained (const TCollection_AsciiString &theKey) const
 Contained returns optional pair of const references to key and value. Returns std::nullopt if the key is not found.
 
std::optional< std::pair< std::reference_wrapper< const TCollection_AsciiString >, std::reference_wrapper< StdObjMgt_Persistent::Instantiator > > > Contained (const TCollection_AsciiString &theKey)
 Contained returns optional pair of const key reference and mutable value reference. Returns std::nullopt if the key is not found.
 
bool UnBind (const TCollection_AsciiString &theKey)
 UnBind removes Item Key pair from map.
 
const StdObjMgt_Persistent::InstantiatorSeek (const TCollection_AsciiString &theKey) const
 Seek returns pointer to Item by Key. Returns NULL is Key was not bound.
 
const StdObjMgt_Persistent::InstantiatorFind (const TCollection_AsciiString &theKey) const
 Find returns the Item for Key. Raises if Key was not bound.
 
bool Find (const TCollection_AsciiString &theKey, StdObjMgt_Persistent::Instantiator &theValue) const
 Find Item for key with copying.
 
const StdObjMgt_Persistent::Instantiatoroperator() (const TCollection_AsciiString &theKey) const
 operator ()
 
StdObjMgt_Persistent::Instantiatoroperator() (const TCollection_AsciiString &theKey)
 operator ()
 
StdObjMgt_Persistent::InstantiatorChangeSeek (const TCollection_AsciiString &theKey)
 ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound.
 
StdObjMgt_Persistent::InstantiatorChangeFind (const TCollection_AsciiString &theKey)
 ChangeFind returns modifiable Item by Key. Raises if Key was not bound.
 
void Clear (const bool doReleaseMemory=false)
 Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused.
 
void Clear (const occ::handle< NCollection_BaseAllocator > &theAllocator)
 Clear data and reset allocator.
 
 ~NCollection_DataMap () override
 Destructor.
 
- Public Member Functions inherited from NCollection_BaseMap
size_t NbBuckets () const noexcept
 NbBuckets.
 
int Extent () const noexcept
 Extent (number of elements, legacy int-returning API).
 
int Length () const noexcept
 Length - number of elements (legacy int-returning API, synonym of Extent()).
 
size_t Size () const noexcept
 Size - number of elements.
 
bool IsEmpty () const noexcept
 IsEmpty.
 
const occ::handle< NCollection_BaseAllocator > & Allocator () const noexcept
 Returns attached allocator.
 

Additional Inherited Members

- Public Types inherited from NCollection_DataMap< TCollection_AsciiString, StdObjMgt_Persistent::Instantiator >
typedef TCollection_AsciiString key_type
 STL-compliant typedef for key type.
 
typedef StdObjMgt_Persistent::Instantiator value_type
 STL-compliant typedef for value type.
 
typedef NCollection_StlIterator< std::forward_iterator_tag, Iterator, StdObjMgt_Persistent::Instantiator, falseiterator
 Shorthand for a regular iterator type.
 
typedef NCollection_StlIterator< std::forward_iterator_tag, Iterator, StdObjMgt_Persistent::Instantiator, trueconst_iterator
 Shorthand for a constant iterator type.
 
using KeyValueRef
 Key-value pair reference for structured binding support. Enables: for (auto [key, value] : map.Items())
 
using ConstKeyValueRef
 Const key-value pair reference for structured binding support.
 
using ItemsView
 View class for key-value pair iteration (mutable).
 
using ConstItemsView
 View class for key-value pair iteration (const).
 
- Protected Member Functions inherited from NCollection_DataMap< TCollection_AsciiString, StdObjMgt_Persistent::Instantiator >
bool lookup (const TCollection_AsciiString &theKey, DataMapNode *&theNode) const
 Lookup for particular key in map.
 
bool lookup (const TCollection_AsciiString &theKey, DataMapNode *&theNode, size_t &theHash) const
 Lookup for particular key in map.
 
bool IsEqual (const TCollection_AsciiString &theKey1, const TCollection_AsciiString &theKey2) const
 
size_t HashCode (const TCollection_AsciiString &theKey, const size_t theUpperBound) const
 
auto emplaceImpl (K &&theKey, std::bool_constant< IsTry >, std::bool_constant< ReturnRef >, Args &&... theArgs) -> std::conditional_t< ReturnRef, StdObjMgt_Persistent::Instantiator &, bool >
 Implementation helper for Bind/TryBind/Bound/TryBound/Emplace/TryEmplace/Emplaced/TryEmplaced. Uses destroy + reconstruct in-place instead of assignment operator.
 
- Protected Member Functions inherited from NCollection_BaseMap
 NCollection_BaseMap (const size_t theNbBuckets, const bool single, const occ::handle< NCollection_BaseAllocator > &theAllocator)
 Constructor.
 
 NCollection_BaseMap (NCollection_BaseMap &&theOther) noexcept
 Move Constructor.
 
virtual ~NCollection_BaseMap ()=default
 Destructor.
 
bool BeginResize (const size_t theExtent, size_t &theNewBuckets, NCollection_ListNode **&data1, NCollection_ListNode **&data2) const
 BeginResize.
 
void EndResize (const size_t theExtent, const size_t theNewBuckets, NCollection_ListNode **data1, NCollection_ListNode **data2) noexcept
 EndResize.
 
bool Resizable () const noexcept
 Resizable.
 
size_t Increment () noexcept
 Increment.
 
size_t Decrement () noexcept
 Decrement.
 
void Destroy (NCollection_DelMapNode fDel, bool doReleaseMemory=true)
 Destroy.
 
size_t NextPrimeForMap (const size_t N) const noexcept
 NextPrimeForMap.
 
void exchangeMapsData (NCollection_BaseMap &theOther) noexcept
 Exchange content of two maps without data copying.
 
NCollection_BaseMapoperator= (NCollection_BaseMap &&) noexcept=delete
 Move operator.
 
 NCollection_BaseMap (const NCollection_BaseMap &)=delete
 Copy Constructor.
 
NCollection_BaseMapoperator= (const NCollection_BaseMap &)=delete
 Assign operator.
 
- Static Protected Member Functions inherited from NCollection_BaseMap
static size_t NbBucketsFromInt (const int theNbBuckets)
 Converts legacy int bucket count to size_t with validation.
 
- Protected Attributes inherited from NCollection_BaseMap
occ::handle< NCollection_BaseAllocatormyAllocator
 
NCollection_ListNode ** myData1
 
NCollection_ListNode ** myData2
 

Member Function Documentation

◆ Bind()

template<class Persistent >
void StdObjMgt_MapOfInstantiators::Bind ( const TCollection_AsciiString & theTypeName)
inline

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