KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Classes | List of all members
Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType > Class Template Referencefinal

A sorted associative container similar to an STL set, but uses a vector to store pointers to its data. More...

#include <pointer_vector_set.h>

Collaboration diagram for Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >:

Public Types

Iterators
using iterator = boost::indirect_iterator< typename TContainerType::iterator >
 
using const_iterator = boost::indirect_iterator< typename TContainerType::const_iterator >
 
using reverse_iterator = boost::indirect_iterator< typename TContainerType::reverse_iterator >
 
using const_reverse_iterator = boost::indirect_iterator< typename TContainerType::const_reverse_iterator >
 
Other definitions
using size_type = typename TContainerType::size_type
 
using ptr_iterator = typename TContainerType::iterator
 
using ptr_const_iterator = typename TContainerType::const_iterator
 
using ptr_reverse_iterator = typename TContainerType::reverse_iterator
 
using ptr_const_reverse_iterator = typename TContainerType::const_reverse_iterator
 
using difference_type = typename TContainerType::difference_type
 

Public Member Functions

Life Cycle
 PointerVectorSet ()
 Default constructor. More...
 
template<class TInputIteratorType >
 PointerVectorSet (TInputIteratorType First, TInputIteratorType Last, size_type NewMaxBufferSize=1)
 Constructs a PointerVectorSet from a range of elements. More...
 
 PointerVectorSet (const PointerVectorSet &rOther)
 Copy constructor for PointerVectorSet. More...
 
 PointerVectorSet (const TContainerType &rContainer)
 Constructs a PointerVectorSet from a container. More...
 
 ~PointerVectorSet ()
 Destructor. More...
 
Operators
PointerVectorSetoperator= (const PointerVectorSet &rOther)
 Assignment operator for PointerVectorSet. More...
 
TDataType & operator[] (const key_type &Key)
 Accesses an element by key and returns a reference. More...
 
pointeroperator() (const key_type &Key)
 Function for inserting or retrieving a pointer associated with a key. More...
 
bool operator== (const PointerVectorSet &r) const noexcept
 Equality comparison operator for two PointerVectorSet objects. More...
 
bool operator< (const PointerVectorSet &r) const noexcept
 Less than comparison operator for two PointerVectorSet objects. More...
 
Operations
iterator begin ()
 Returns an iterator pointing to the beginning of the container. More...
 
const_iterator begin () const
 Returns a constant iterator pointing to the beginning of the container. More...
 
const_iterator cbegin ()
 Returns a constant iterator pointing to the beginning of the container. More...
 
const_iterator cbegin () const
 Returns a constant iterator pointing to the beginning of the container. More...
 
iterator end ()
 Returns an iterator pointing to the end of the container. More...
 
const_iterator end () const
 Returns a constant iterator pointing to the end of the container. More...
 
const_iterator cend ()
 Returns a constant iterator pointing to the end of the container. More...
 
const_iterator cend () const
 Returns a constant iterator pointing to the end of the container. More...
 
reverse_iterator rbegin ()
 Returns a reverse iterator pointing to the beginning of the container. More...
 
const_reverse_iterator rbegin () const
 Returns a constant reverse iterator pointing to the beginning of the container. More...
 
reverse_iterator rend ()
 Returns a reverse iterator pointing to the end of the container. More...
 
const_reverse_iterator rend () const
 Returns a constant reverse iterator pointing to the end of the container. More...
 
ptr_iterator ptr_begin ()
 Returns an iterator pointing to the beginning of the underlying data container. More...
 
ptr_const_iterator ptr_begin () const
 Returns a constant iterator pointing to the beginning of the underlying data container. More...
 
ptr_iterator ptr_end ()
 Returns an iterator pointing to the end of the underlying data container. More...
 
ptr_const_iterator ptr_end () const
 Returns a constant iterator pointing to the end of the underlying data container. More...
 
ptr_reverse_iterator ptr_rbegin ()
 Returns a reverse iterator pointing to the beginning of the underlying data container. More...
 
ptr_const_reverse_iterator ptr_rbegin () const
 Returns a constant reverse iterator pointing to the beginning of the underlying data container. More...
 
ptr_reverse_iterator ptr_rend ()
 Returns a reverse iterator pointing to the end of the underlying data container. More...
 
ptr_const_reverse_iterator ptr_rend () const
 Returns a constant reverse iterator pointing to the end of the underlying data container. More...
 
reference front () noexcept
 Returns a reference to the first element in the container. More...
 
const_reference front () const noexcept
 Returns a constant reference to the first element in the container. More...
 
reference back () noexcept
 Returns a reference to the last element in the container. More...
 
const_reference back () const noexcept
 Returns a constant reference to the last element in the container. More...
 
size_type size () const
 Returns the number of elements in the container. More...
 
size_type max_size () const
 Returns the maximum possible number of elements the container can hold. More...
 
key_compare key_comp () const
 Returns the key comparison function used for ordering elements in the container. More...
 
void swap (PointerVectorSet &rOther)
 Swaps the contents of this PointerVectorSet with another. More...
 
void push_back (TPointerType x)
 Adds a pointer to the end of the set. More...
 
void pop_back ()
 Removes the last element from the set. More...
 
iterator insert (iterator Position, const TPointerType pData)
 Inserts a pointer at the specified position. More...
 
template<class InputIterator >
void insert (InputIterator First, InputIterator Last)
 Insert elements from a range of iterators. More...
 
iterator erase (iterator pos)
 Erase an element at the specified position. More...
 
iterator erase (iterator first, iterator last)
 Erase a range of elements defined by iterators. More...
 
iterator erase (const key_type &k)
 Erase an element with the specified key. More...
 
void clear ()
 Clear the set, removing all elements. More...
 
iterator find (const key_type &Key)
 Find an element with the specified key. More...
 
const_iterator find (const key_type &Key) const
 Find an element with the specified key (const version). More...
 
size_type count (const key_type &Key)
 Count the number of elements with the specified key. More...
 
void reserve (int reservedsize)
 Reserves memory for a specified number of elements. More...
 
int capacity ()
 Get the current capacity of the underlying data container. More...
 
void Sort ()
 Sort the elements in the set. More...
 
void Unique ()
 Remove duplicate elements from the set. More...
 
Access
TContainerType & GetContainer ()
 
const TContainerType & GetContainer () const
 
size_type GetMaxBufferSize () const
 Get the maximum size of buffer used in the container. More...
 
void SetMaxBufferSize (const size_type NewSize)
 Set the maximum size of buffer used in the container. More...
 
size_type GetSortedPartSize () const
 Get the sorted part size of buffer used in the container. More...
 
void SetSortedPartSize (const size_type NewSize)
 Set the sorted part size of buffer used in the container. More...
 
Inquiry
bool empty () const
 Check if the data container is empty. More...
 
bool IsSorted () const
 Check if the data container is sorted. More...
 
Input and output
std::string Info () const
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Type Definitions

using key_type = typename std::remove_reference< decltype(std::declval< TGetKeyType >()(std::declval< TDataType >()))>::type
 Key type for searching in this container. More...
 
using data_type = TDataType
 
using value_type = TDataType
 
using key_compare = TCompareType
 
using pointer = TPointerType
 
using reference = TDataType &
 
using const_reference = const TDataType &
 
using ContainerType = TContainerType
 
 KRATOS_CLASS_POINTER_DEFINITION (PointerVectorSet)
 Pointer definition of PointerVectorSet. More...
 

Serialization

class Serializer
 

Detailed Description

template<class TDataType, class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
class Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >

A sorted associative container similar to an STL set, but uses a vector to store pointers to its data.

The PointerVectorSet is a sorted associative container that behaves like an STL set but employs a vector to store pointers to its data elements. Many of its methods are inspired by the Boost ptr_container library, with modifications to support shared pointers.

Note
Unlike the Boost counterpart, this container does not manage memory deallocation automatically. It relies on the use of smart pointers or manual memory management for resource cleanup.
Author
Pooyan Dadvand

Member Typedef Documentation

◆ const_iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::const_iterator = boost::indirect_iterator<typename TContainerType::const_iterator>

◆ const_reference

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::const_reference = const TDataType&

◆ const_reverse_iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::const_reverse_iterator = boost::indirect_iterator<typename TContainerType::const_reverse_iterator>

◆ ContainerType

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ContainerType = TContainerType

◆ data_type

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::data_type = TDataType

◆ difference_type

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::difference_type = typename TContainerType::difference_type

◆ iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::iterator = boost::indirect_iterator<typename TContainerType::iterator>

◆ key_compare

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::key_compare = TCompareType

◆ key_type

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::key_type = typename std::remove_reference<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>::type

Key type for searching in this container.

◆ pointer

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::pointer = TPointerType

◆ ptr_const_iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_const_iterator = typename TContainerType::const_iterator

◆ ptr_const_reverse_iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_const_reverse_iterator = typename TContainerType::const_reverse_iterator

◆ ptr_iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_iterator = typename TContainerType::iterator

◆ ptr_reverse_iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_reverse_iterator = typename TContainerType::reverse_iterator

◆ reference

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::reference = TDataType&

◆ reverse_iterator

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::reverse_iterator = boost::indirect_iterator<typename TContainerType::reverse_iterator>

◆ size_type

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::size_type = typename TContainerType::size_type

◆ value_type

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
using Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::value_type = TDataType

Constructor & Destructor Documentation

◆ PointerVectorSet() [1/4]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::PointerVectorSet ( )
inline

Default constructor.

◆ PointerVectorSet() [2/4]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
template<class TInputIteratorType >
Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::PointerVectorSet ( TInputIteratorType  First,
TInputIteratorType  Last,
size_type  NewMaxBufferSize = 1 
)
inline

Constructs a PointerVectorSet from a range of elements.

This constructor initializes a PointerVectorSet with elements in the range [First, Last).

Template Parameters
TInputIteratorTypeThe type of the input iterator.
Parameters
FirstAn input iterator pointing to the beginning of the range.
LastAn input iterator pointing to the end of the range.
NewMaxBufferSizeThe maximum buffer size (default is 1).

◆ PointerVectorSet() [3/4]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::PointerVectorSet ( const PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType > &  rOther)
inline

Copy constructor for PointerVectorSet.

Parameters
rOtherThe PointerVectorSet to copy from.

◆ PointerVectorSet() [4/4]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::PointerVectorSet ( const TContainerType &  rContainer)
inlineexplicit

Constructs a PointerVectorSet from a container.

This constructor initializes a PointerVectorSet with elements from a container.

Parameters
rContainerThe container to copy elements from.

◆ ~PointerVectorSet()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::~PointerVectorSet ( )
inline

Destructor.

Member Function Documentation

◆ back() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_reference Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::back ( ) const
inlinenoexcept

Returns a constant reference to the last element in the container.

Note
This function is marked as "noexcept," and it asserts that the container is not empty.
Returns
A constant reference to the last element in the container.

◆ back() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
reference Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::back ( )
inlinenoexcept

Returns a reference to the last element in the container.

Note
This function is marked as "noexcept," and it asserts that the container is not empty.
Returns
A reference to the last element in the container.

◆ begin() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::begin ( )
inline

Returns an iterator pointing to the beginning of the container.

Returns
An iterator pointing to the beginning of the container.

◆ begin() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::begin ( ) const
inline

Returns a constant iterator pointing to the beginning of the container.

Returns
A constant iterator pointing to the beginning of the container.

◆ capacity()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
int Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::capacity ( )
inline

Get the current capacity of the underlying data container.

This function returns the current capacity of the underlying data container.

Returns
The current capacity of the data container.

◆ cbegin() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::cbegin ( )
inline

Returns a constant iterator pointing to the beginning of the container.

Returns
A constant iterator pointing to the beginning of the container.

◆ cbegin() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::cbegin ( ) const
inline

Returns a constant iterator pointing to the beginning of the container.

Returns
A constant iterator pointing to the beginning of the container.

◆ cend() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::cend ( )
inline

Returns a constant iterator pointing to the end of the container.

Returns
A constant iterator pointing to the end of the container.

◆ cend() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::cend ( ) const
inline

Returns a constant iterator pointing to the end of the container.

Returns
A constant iterator pointing to the end of the container.

◆ clear()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::clear ( )
inline

Clear the set, removing all elements.

This function clears the set by removing all elements, resetting mSortedPartSize to zero, and setting mMaxBufferSize to 1.

◆ count()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
size_type Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::count ( const key_type Key)
inline

Count the number of elements with the specified key.

This function counts the number of elements with the specified key in the set. It returns 1 if the element is found and 0 if it's not found.

Parameters
KeyThe key to count.
Returns
The number of elements with the specified key (0 or 1).

◆ empty()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
bool Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::empty ( ) const
inline

Check if the data container is empty.

This function checks if the data container, represented by the member variable mData, is empty.

Returns
True if the data container is empty, false otherwise.

◆ end() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::end ( )
inline

Returns an iterator pointing to the end of the container.

Returns
An iterator pointing to the end of the container.

◆ end() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::end ( ) const
inline

Returns a constant iterator pointing to the end of the container.

Returns
A constant iterator pointing to the end of the container.

◆ erase() [1/3]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::erase ( const key_type k)
inline

Erase an element with the specified key.

This function erases an element with the specified key by first finding the element using the find function and then erasing it using the erase(iterator) function.

Parameters
kThe key of the element to erase.
Returns
An iterator pointing to the element following the erased element, or end() if the element with the specified key was not found.

◆ erase() [2/3]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::erase ( iterator  first,
iterator  last 
)
inline

Erase a range of elements defined by iterators.

This function erases a range of elements defined by the iterators first and last and updates mSortedPartSize to match the size of the data container.

Parameters
firstAn iterator pointing to the beginning of the range to erase.
lastAn iterator pointing to the end of the range to erase.
Returns
An iterator pointing to the element following the last erased element.

◆ erase() [3/3]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::erase ( iterator  pos)
inline

Erase an element at the specified position.

This function erases the element at the specified position and updates mSortedPartSize to match the size of the data container. If the provided position is equal to end(), it returns end().

Parameters
posAn iterator pointing to the position of the element to erase.
Returns
An iterator pointing to the element following the erased element, or end() if the provided position was equal to end().

◆ find() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::find ( const key_type Key)
inline

Find an element with the specified key.

This function searches for an element with the specified key in the set. If the element is found, it returns an iterator to the found element. If the element is not found, it returns an iterator pointing to the end of the set.

Parameters
KeyThe key to search for.
Returns
An iterator pointing to the found element or the end of the set if not found.

◆ find() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::find ( const key_type Key) const
inline

Find an element with the specified key (const version).

This function is a const version of find() and searches for an element with the specified key in the set. If the element is found, it returns a const_iterator to the found element. If the element is not found, it returns a const_iterator pointing to the end of the set.

Parameters
KeyThe key to search for.
Returns
A const_iterator pointing to the found element or the end of the set if not found.

◆ front() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_reference Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::front ( ) const
inlinenoexcept

Returns a constant reference to the first element in the container.

Note
This function is marked as "noexcept," and it asserts that the container is not empty.
Returns
A constant reference to the first element in the container.

◆ front() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
reference Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::front ( )
inlinenoexcept

Returns a reference to the first element in the container.

Note
This function is marked as "noexcept," and it asserts that the container is not empty.
Returns
A reference to the first element in the container.

◆ GetContainer() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
TContainerType& Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::GetContainer ( )
inline

Gives a reference to underly normal container.

◆ GetContainer() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const TContainerType& Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::GetContainer ( ) const
inline

Gives a constant reference to underly normal container.

◆ GetMaxBufferSize()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
size_type Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::GetMaxBufferSize ( ) const
inline

Get the maximum size of buffer used in the container.

◆ GetSortedPartSize()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
size_type Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::GetSortedPartSize ( ) const
inline

Get the sorted part size of buffer used in the container.

◆ Info()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
std::string Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::Info ( ) const
inline

Turn back information as a string.

◆ insert() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
template<class InputIterator >
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::insert ( InputIterator  First,
InputIterator  Last 
)
inline

Insert elements from a range of iterators.

This function inserts elements from a range defined by the iterators First and Last into the set. It uses the insert function to insert each element.

Parameters
FirstAn input iterator pointing to the beginning of the range to insert.
LastAn input iterator pointing to the end of the range to insert.

◆ insert() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::insert ( iterator  Position,
const TPointerType  pData 
)
inline

Inserts a pointer at the specified position.

This function inserts a given pointer at the specified position in the set. It also maintains the sorting order and updates mSortedPartSize if necessary.

Parameters
PositionAn iterator pointing to the position where the pointer should be inserted.
pDataThe pointer to be inserted.
Returns
An iterator pointing to the inserted element.

◆ IsSorted()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
bool Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::IsSorted ( ) const
inline

Check if the data container is sorted.

This function checks if the sorted portion of the data, indicated by the member variable mSortedPartSize, is equal to the total size of the data container mData. This is used to determine if the data is sorted.

Returns
True if the data is sorted, false otherwise.

◆ key_comp()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
key_compare Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::key_comp ( ) const
inline

Returns the key comparison function used for ordering elements in the container.

This function returns an instance of the key comparison function (TCompareType) used for ordering elements in the container.

Returns
The key comparison function.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::KRATOS_CLASS_POINTER_DEFINITION ( PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >  )

Pointer definition of PointerVectorSet.

◆ max_size()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
size_type Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::max_size ( ) const
inline

Returns the maximum possible number of elements the container can hold.

Returns
The maximum possible number of elements the container can hold.

◆ operator()()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
pointer& Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::operator() ( const key_type Key)
inline

Function for inserting or retrieving a pointer associated with a key.

This function allows you to insert or retrieve a pointer associated with a key in the set. If the key already exists in the set, it returns the corresponding pointer. If not, it inserts the key and a new pointer into the set and returns the newly inserted pointer.

Parameters
KeyThe key for which you want to insert or retrieve a pointer.
Returns
A reference to the pointer associated with the given key.

◆ operator<()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
bool Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::operator< ( const PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType > &  r) const
inlinenoexcept

Less than comparison operator for two PointerVectorSet objects.

This operator checks if one PointerVectorSet is less than another by comparing their elements using the CompareKey comparison function in a lexicographical order.

Note
This function is marked as "noexcept," and it asserts that the container is not empty.
Parameters
rThe PointerVectorSet to compare with.
Returns
true if this set is less than r, false otherwise.

◆ operator=()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
PointerVectorSet& Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::operator= ( const PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType > &  rOther)
inline

Assignment operator for PointerVectorSet.

Assigns the contents of another PointerVectorSet to this one.

Parameters
rOtherThe PointerVectorSet to assign from.
Returns
A reference to the modified PointerVectorSet.

◆ operator==()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
bool Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::operator== ( const PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType > &  r) const
inlinenoexcept

Equality comparison operator for two PointerVectorSet objects.

This operator checks if two PointerVectorSet objects are equal by comparing their sizes and the equality of their elements using the EqualKeyTo comparison function.

Note
This function is marked as "noexcept," and it asserts that the container is not empty.
Parameters
rThe PointerVectorSet to compare with.
Returns
true if the two sets are equal, false otherwise.

◆ operator[]()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
TDataType& Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::operator[] ( const key_type Key)
inline

Accesses an element by key and returns a reference.

This operator allows you to access an element in the PointerVectorSet by its key. If the key is not found, a new element with the provided key is inserted into the set.

Parameters
KeyThe key of the element to access or insert.
Returns
A reference to the accessed or newly inserted element.

◆ pop_back()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::pop_back ( )
inline

Removes the last element from the set.

This function removes the last element (pointer) from the set and updates mSortedPartSize if necessary.

◆ PrintData()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::PrintData ( std::ostream &  rOStream) const
inline

Print object's data.

◆ PrintInfo()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::PrintInfo ( std::ostream &  rOStream) const
inline

Print information about this object.

◆ ptr_begin() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_begin ( )
inline

Returns an iterator pointing to the beginning of the underlying data container.

Returns
An iterator pointing to the beginning of the underlying data container.

◆ ptr_begin() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_begin ( ) const
inline

Returns a constant iterator pointing to the beginning of the underlying data container.

Returns
A constant iterator pointing to the beginning of the underlying data container.

◆ ptr_end() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_end ( )
inline

Returns an iterator pointing to the end of the underlying data container.

Returns
An iterator pointing to the end of the underlying data container.

◆ ptr_end() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_const_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_end ( ) const
inline

Returns a constant iterator pointing to the end of the underlying data container.

Returns
A constant iterator pointing to the end of the underlying data container.

◆ ptr_rbegin() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_rbegin ( )
inline

Returns a reverse iterator pointing to the beginning of the underlying data container.

Returns
A reverse iterator pointing to the beginning of the underlying data container.

◆ ptr_rbegin() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_const_reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_rbegin ( ) const
inline

Returns a constant reverse iterator pointing to the beginning of the underlying data container.

Returns
A constant reverse iterator pointing to the beginning of the underlying data container.

◆ ptr_rend() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_rend ( )
inline

Returns a reverse iterator pointing to the end of the underlying data container.

Returns
A reverse iterator pointing to the end of the underlying data container.

◆ ptr_rend() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
ptr_const_reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::ptr_rend ( ) const
inline

Returns a constant reverse iterator pointing to the end of the underlying data container.

Returns
A constant reverse iterator pointing to the end of the underlying data container.

◆ push_back()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::push_back ( TPointerType  x)
inline

Adds a pointer to the end of the set.

This function appends a given pointer to the end of the set.

Parameters
xThe pointer to be added to the end of the set.

◆ rbegin() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::rbegin ( )
inline

Returns a reverse iterator pointing to the beginning of the container.

Returns
A reverse iterator pointing to the beginning of the container.

◆ rbegin() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::rbegin ( ) const
inline

Returns a constant reverse iterator pointing to the beginning of the container.

Returns
A constant reverse iterator pointing to the beginning of the container.

◆ rend() [1/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::rend ( )
inline

Returns a reverse iterator pointing to the end of the container.

Returns
A reverse iterator pointing to the end of the container.

◆ rend() [2/2]

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
const_reverse_iterator Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::rend ( ) const
inline

Returns a constant reverse iterator pointing to the end of the container.

Returns
A constant reverse iterator pointing to the end of the container.

◆ reserve()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::reserve ( int  reservedsize)
inline

Reserves memory for a specified number of elements.

This function reserves memory in the underlying data container for a specified number of elements.

Parameters
reservedsizeThe number of elements to reserve memory for.

◆ SetMaxBufferSize()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::SetMaxBufferSize ( const size_type  NewSize)
inline

Set the maximum size of buffer used in the container.

This container uses a buffer which keep data unsorted. After buffer size arrived to the MaxBufferSize it will sort all container and empties buffer.

Parameters
NewSizeIs the new buffer maximum size.

◆ SetSortedPartSize()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::SetSortedPartSize ( const size_type  NewSize)
inline

Set the sorted part size of buffer used in the container.

Parameters
NewSizeIs the new buffer maximum size.

◆ size()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
size_type Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::size ( ) const
inline

Returns the number of elements in the container.

Returns
The number of elements in the container.

◆ Sort()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::Sort ( )
inline

Sort the elements in the set.

This function sorts the elements in the set using the CompareKey comparison function. After sorting, it updates mSortedPartSize to match the size of the data container.

◆ swap()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::swap ( PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType > &  rOther)
inline

Swaps the contents of this PointerVectorSet with another.

This function swaps the contents of this PointerVectorSet with another set, including mSortedPartSize, mMaxBufferSize, and mData.

Parameters
rOtherThe other PointerVectorSet to swap with.

◆ Unique()

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
void Kratos::PointerVectorSet< TDataType, TGetKeyType, TCompareType, TEqualType, TPointerType, TContainerType >::Unique ( )
inline

Remove duplicate elements from the set.

This function removes duplicate elements from the set using the EqualKeyTo comparison function. After removing duplicates, it updates mSortedPartSize to match the size of the data container.

Friends And Related Function Documentation

◆ Serializer

template<class TDataType , class TGetKeyType = SetIdentityFunction<TDataType>, class TCompareType = std::less<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TEqualType = std::equal_to<decltype(std::declval<TGetKeyType>()(std::declval<TDataType>()))>, class TPointerType = typename TDataType::Pointer, class TContainerType = std::vector<TPointerType>>
friend class Serializer
friend

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