|
| template<class Persistent > |
| void | Bind (const TCollection_AsciiString &theTypeName) |
| |
| 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_DataMap & | Assign (const NCollection_DataMap &theOther) |
| | Assignment. This method does not change the internal allocator.
|
| |
| NCollection_DataMap & | operator= (const NCollection_DataMap &theOther) |
| | Assignment operator.
|
| |
| NCollection_DataMap & | operator= (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::Instantiator * | Bound (const TCollection_AsciiString &theKey, const StdObjMgt_Persistent::Instantiator &theItem) |
| | Bound binds Item to Key in map.
|
| |
| StdObjMgt_Persistent::Instantiator * | Bound (TCollection_AsciiString &&theKey, const StdObjMgt_Persistent::Instantiator &theItem) |
| | Bound binds Item to Key in map.
|
| |
| StdObjMgt_Persistent::Instantiator * | Bound (const TCollection_AsciiString &theKey, StdObjMgt_Persistent::Instantiator &&theItem) |
| | Bound binds Item to Key in map.
|
| |
| StdObjMgt_Persistent::Instantiator * | Bound (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::Instantiator & | TryBound (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::Instantiator & | TryBound (TCollection_AsciiString &&theKey, const StdObjMgt_Persistent::Instantiator &theItem) |
| | TryBound binds Item to Key in map only if Key is not yet bound.
|
| |
| StdObjMgt_Persistent::Instantiator & | TryBound (const TCollection_AsciiString &theKey, StdObjMgt_Persistent::Instantiator &&theItem) |
| | TryBound binds Item to Key in map only if Key is not yet bound.
|
| |
| StdObjMgt_Persistent::Instantiator & | TryBound (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::Instantiator & | Emplaced (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::Instantiator & | TryEmplaced (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::Instantiator * | Seek (const TCollection_AsciiString &theKey) const |
| | Seek returns pointer to Item by Key. Returns NULL is Key was not bound.
|
| |
| const StdObjMgt_Persistent::Instantiator & | Find (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::Instantiator & | operator() (const TCollection_AsciiString &theKey) const |
| | operator ()
|
| |
| StdObjMgt_Persistent::Instantiator & | operator() (const TCollection_AsciiString &theKey) |
| | operator ()
|
| |
| StdObjMgt_Persistent::Instantiator * | ChangeSeek (const TCollection_AsciiString &theKey) |
| | ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound.
|
| |
| StdObjMgt_Persistent::Instantiator & | ChangeFind (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.
|
| |
| 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.
|
| |
|
| 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, false > | iterator |
| | Shorthand for a regular iterator type.
|
| |
| typedef NCollection_StlIterator< std::forward_iterator_tag, Iterator, StdObjMgt_Persistent::Instantiator, true > | const_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).
|
| |
| 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.
|
| |
| | 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_BaseMap & | operator= (NCollection_BaseMap &&) noexcept=delete |
| | Move operator.
|
| |
| | NCollection_BaseMap (const NCollection_BaseMap &)=delete |
| | Copy Constructor.
|
| |
| NCollection_BaseMap & | operator= (const NCollection_BaseMap &)=delete |
| | Assign operator.
|
| |
| static size_t | NbBucketsFromInt (const int theNbBuckets) |
| | Converts legacy int bucket count to size_t with validation.
|
| |
| occ::handle< NCollection_BaseAllocator > | myAllocator |
| |
| NCollection_ListNode ** | myData1 |
| |
| NCollection_ListNode ** | myData2 |
| |