iceberg-cpp
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
iceberg::DataFileSet Class Reference

A set of DataFile pointers with insertion order preserved and deduplicated by file path. More...

#include <data_file_set.h>

Public Types

using value_type = std::shared_ptr< DataFile >
 
using iterator = typename std::vector< value_type >::iterator
 
using const_iterator = typename std::vector< value_type >::const_iterator
 
using difference_type = typename std::vector< value_type >::difference_type
 

Public Member Functions

std::pair< iterator, bool > insert (const value_type &file)
 Insert a data file into the set.
 
std::pair< iterator, bool > insert (value_type &&file)
 Insert a data file into the set (move version).
 
size_t size () const
 Get the number of elements in the set.
 
bool empty () const
 Check if the set is empty.
 
void clear ()
 Clear all elements from the set.
 
iterator begin ()
 Get iterator to the beginning.
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 Get iterator to the end.
 
const_iterator end () const
 
const_iterator cend () const
 
std::span< const value_type > as_span () const
 Get a non-owning view of the data files in insertion order.
 

Detailed Description

A set of DataFile pointers with insertion order preserved and deduplicated by file path.

Member Function Documentation

◆ insert()

std::pair< iterator, bool > iceberg::DataFileSet::insert ( const value_type &  file)
inline

Insert a data file into the set.

Parameters
fileThe data file to insert
Returns
A pair with an iterator to the inserted element (or the existing one) and a bool indicating whether insertion took place

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