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

Stored relocation table is modeled as a child class of NCollection_DataMap<int, occ::handle<Standard_Transient>> that stores a handle to the file header section. With that attribute drivers have access to the file header section. More...

#include <XmlObjMgt_SRelocationTable.hxx>

Inheritance diagram for XmlObjMgt_SRelocationTable:
Inheritance graph
[legend]

Public Member Functions

const occ::handle< Storage_HeaderData > & GetHeaderData () const
 Returns a handle to the header data of the file that is begin read.
 
void SetHeaderData (const occ::handle< Storage_HeaderData > &theHeaderData)
 Sets the storage header data.
 
void Clear (const bool doReleaseMemory=true)
 
- Public Member Functions inherited from NCollection_IndexedMap< occ::handle< Standard_Transient > >
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.
 
IndexedItemsView IndexedItems () const
 Returns a view for key-index pair iteration. Usage: for (auto [aKey, anIndex] : aMap.IndexedItems())
 
 NCollection_IndexedMap ()
 Empty constructor.
 
 NCollection_IndexedMap (const size_t theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor.
 
 NCollection_IndexedMap (const int theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor (legacy int-taking).
 
 NCollection_IndexedMap (const NCollection_DefaultHasher< occ::handle< Standard_Transient > > &theHasher, const size_t theNbBuckets=1, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (copy).
 
 NCollection_IndexedMap (const NCollection_DefaultHasher< occ::handle< Standard_Transient > > &theHasher, const int theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (copy, legacy int-taking).
 
 NCollection_IndexedMap (NCollection_DefaultHasher< occ::handle< Standard_Transient > > &&theHasher, const size_t theNbBuckets=1, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (move).
 
 NCollection_IndexedMap (NCollection_DefaultHasher< occ::handle< Standard_Transient > > &&theHasher, const int theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor with custom hasher (move, legacy int-taking).
 
 NCollection_IndexedMap (const NCollection_IndexedMap &theOther)
 Copy constructor.
 
 NCollection_IndexedMap (NCollection_IndexedMap &&theOther) noexcept
 Move constructor.
 
void Exchange (NCollection_IndexedMap &theOther) noexcept
 Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well!
 
const NCollection_DefaultHasher< occ::handle< Standard_Transient > > & GetHasher () const noexcept
 Returns const reference to the hasher.
 
NCollection_IndexedMapAssign (const NCollection_IndexedMap &theOther)
 Assign. This method does not change the internal allocator.
 
NCollection_IndexedMapoperator= (const NCollection_IndexedMap &theOther)
 Assignment operator.
 
NCollection_IndexedMapoperator= (NCollection_IndexedMap &&theOther) noexcept
 Move operator.
 
void ReSize (const size_t theExtent)
 ReSize.
 
void ReSize (const int theExtent)
 
int Add (const occ::handle< Standard_Transient > &theKey1)
 Add adds a new key to the map.
 
int Add (occ::handle< Standard_Transient > &&theKey1)
 Add adds a new key to the map.
 
const occ::handle< Standard_Transient > & Added (const occ::handle< Standard_Transient > &theKey1)
 Added: add a new key if not yet in the map, and return reference to either newly added or previously existing key.
 
const occ::handle< Standard_Transient > & Added (occ::handle< Standard_Transient > &&theKey1)
 Added: add a new key if not yet in the map, and return reference to either newly added or previously existing key.
 
int Emplace (Args &&... theArgs)
 Emplace constructs key in-place; if key exists, destroys and reconstructs.
 
const occ::handle< Standard_Transient > & Emplaced (Args &&... theArgs)
 Emplaced constructs key in-place; if key exists, overwrites.
 
int TryEmplace (Args &&... theArgs)
 TryEmplace constructs key in-place only if not already present.
 
const occ::handle< Standard_Transient > & TryEmplaced (Args &&... theArgs)
 TryEmplaced constructs key in-place only if not already present.
 
bool Contains (const occ::handle< Standard_Transient > &theKey1) const
 Contains.
 
std::optional< std::reference_wrapper< const occ::handle< Standard_Transient > > > Contained (const occ::handle< Standard_Transient > &theKey1) const
 Contained returns optional const reference to the key in the map. Returns std::nullopt if the key is not found.
 
void Substitute (const size_t theIndex, const occ::handle< Standard_Transient > &theKey1)
 Substitute.
 
void Substitute (const int theIndex, const occ::handle< Standard_Transient > &theKey1)
 
void Swap (const size_t theIndex1, const size_t theIndex2)
 Swaps two elements with the given indices.
 
void Swap (const int theIndex1, const int theIndex2)
 
void RemoveLast ()
 RemoveLast.
 
void RemoveFromIndex (const size_t theIndex)
 Remove the key of the given index. Caution! The index of the last key can be changed.
 
void RemoveFromIndex (const int theIndex)
 
bool RemoveKey (const occ::handle< Standard_Transient > &theKey1)
 Remove the given key. Caution! The index of the last key can be changed.
 
const occ::handle< Standard_Transient > & FindKey (const size_t theIndex) const
 FindKey.
 
const occ::handle< Standard_Transient > & FindKey (const int theIndex) const
 
const occ::handle< Standard_Transient > & operator() (const size_t theIndex) const
 operator ()
 
const occ::handle< Standard_Transient > & operator() (const int theIndex) const
 
int FindIndex (const occ::handle< Standard_Transient > &theKey1) const
 FindIndex.
 
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_IndexedMap () 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_IndexedMap< occ::handle< Standard_Transient > >
typedef occ::handle< Standard_Transientkey_type
 STL-compliant typedef for key type.
 
typedef NCollection_StlIterator< std::forward_iterator_tag, Iterator, occ::handle< Standard_Transient >, trueconst_iterator
 Shorthand for a constant iterator type.
 
typedef const_iterator iterator
 Shorthand for iterator type (same as const_iterator for key-only maps).
 
using KeyIndexRef
 Key-index pair reference for structured binding support. Enables: for (auto [key, index] : map.IndexedItems())
 
using IndexedItemsView
 View class for key-index pair iteration.
 
- Protected Member Functions inherited from NCollection_IndexedMap< occ::handle< Standard_Transient > >
bool lookup (const occ::handle< Standard_Transient > &theKey, IndexedMapNode *&theNode, size_t &theHash) const
 Lookup for particular key in map.
 
bool lookup (const occ::handle< Standard_Transient > &theKey, IndexedMapNode *&theNode) const
 Lookup for particular key in map.
 
bool IsEqual (const occ::handle< Standard_Transient > &theKey1, const occ::handle< Standard_Transient > &theKey2) const
 
size_t HashCode (const occ::handle< Standard_Transient > &theKey, const size_t theUpperBound) const
 
auto addImpl (K &&theKey1, std::bool_constant< ReturnRef >) -> std::conditional_t< ReturnRef, const occ::handle< Standard_Transient > &, int >
 Implementation helper for Add/Added (uses TryEmplace behavior - no modification on existing).
 
auto emplaceImpl (std::bool_constant< IsTry >, std::bool_constant< ReturnRef >, Args &&... theArgs) -> std::conditional_t< ReturnRef, const occ::handle< Standard_Transient > &, int >
 Implementation helper for Emplace/Emplaced.
 
- 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_IndexedMap< occ::handle< Standard_Transient > >
NCollection_DefaultHasher< occ::handle< Standard_Transient > > myHasher
 
- Protected Attributes inherited from NCollection_BaseMap
occ::handle< NCollection_BaseAllocatormyAllocator
 
NCollection_ListNode ** myData1
 
NCollection_ListNode ** myData2
 

Detailed Description

Stored relocation table is modeled as a child class of NCollection_DataMap<int, occ::handle<Standard_Transient>> that stores a handle to the file header section. With that attribute drivers have access to the file header section.

Member Function Documentation

◆ Clear()

void XmlObjMgt_SRelocationTable::Clear ( const bool doReleaseMemory = true)

◆ GetHeaderData()

const occ::handle< Storage_HeaderData > & XmlObjMgt_SRelocationTable::GetHeaderData ( ) const

Returns a handle to the header data of the file that is begin read.

◆ SetHeaderData()

void XmlObjMgt_SRelocationTable::SetHeaderData ( const occ::handle< Storage_HeaderData > & theHeaderData)

Sets the storage header data.

Parameters
theHeaderDataheader data of the file that is begin read

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