OpendTect  7.0
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ObjectSet< T > Class Template Reference

Set of pointers to objects. More...

Inherits OD::Set.

Inherited by ManagedObjectSetBase< T >.

Public Types

typedef impl_type::const_iterator const_iterator
 
typedef const value_typeconst_reference
 
typedef size_type difference_type
 
typedef size_type idx_type
 
typedef impl_type::iterator iterator
 
typedef T object_type
 
typedef value_typereference
 
typedef int size_type
 
typedef T * value_type
 

Public Member Functions

 ObjectSet ()
 
 ObjectSet (const ObjectSet &)
 
 ObjectSet (T *)
 
 ObjectSet (T *, T *)
 
 ObjectSet (T *, T *, T *)
 
virtual ~ObjectSet ()
 
ObjectSetadd (T *t)
 
bool addIfNew (T *)
 
void allowNull (bool yn=true)
 
virtual void append (const ObjectSet &)
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
ObjectSetclone () const override
 
virtual void copy (const ObjectSet &)
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
void erase () override
 
T * first ()
 
const T * first () const
 
virtual T * get (const T *) const
 check & unconst More...
 
virtual T * get (idx_type)
 
virtual const T * get (idx_type) const
 
idx_type getIdx (const_iterator it) const
 
idx_type getIdx (iterator it) const
 
virtual idx_type indexOf (const T *) const
 
virtual void insertAfter (T *newptr, idx_type)
 
virtual void insertAt (T *newptr, idx_type)
 
virtual bool isManaged () const
 
virtual bool isPresent (const T *) const
 
T * last ()
 
const T * last () const
 
size_type max_size () const
 
std::int64_t nrItems () const override
 
bool nullAllowed () const
 
bool operator!= (const ObjectSet &oth) const
 
ObjectSetoperator+= (T *t)
 
virtual ObjectSetoperator-= (T *)
 
ObjectSetoperator= (const ObjectSet &)
 
bool operator== (const ObjectSet &) const
 
const T * operator[] (const T *t) const
 
T * operator[] (idx_type i)
 
const T * operator[] (idx_type i) const
 
void plainErase ()
 
virtual T * pop ()
 
void push (T *t)
 
virtual void removeRange (idx_type from, idx_type to)
 
virtual T * removeSingle (idx_type, bool keep_order=true)
 
virtual T * replace (idx_type, T *)
 
void reverse () override
 
void setNullAllowed (bool yn=true)
 
size_type size () const
 
void swap (idx_type, idx_type)
 
void swap (ObjectSet &oth)
 
void swapItems (std::int64_t i1, std::int64_t i2) override
 
void useIndexes (const idx_type *)
 
bool validIdx (std::int64_t) const override
 
- Public Member Functions inherited from OD::Set
virtual ~Set ()
 
bool isEmpty () const
 
void setEmpty ()
 

Protected Types

typedef VectorAccess< T *, size_typeimpl_type
 

Protected Member Functions

virtual ObjectSetdoAdd (T *)
 

Protected Attributes

bool allow0_ = false
 
impl_type vec_
 

Additional Inherited Members

- Static Public Member Functions inherited from OD::Set
static std::int32_t maxIdx32 ()
 
static std::int64_t maxIdx64 ()
 

Detailed Description

template<class T>
class ObjectSet< T >

Set of pointers to objects.

The ObjectSet does not manage the objects, it is just a collection of pointers to the objects. If you want management, use ManagedObjectSet.

Note: you can use indexOf(ptr) to see whether the object is in the set. If you know that the object is in the set, and you need the index of it, then you can use getIdx(ptr) to obtain its index.

<>

Member Typedef Documentation

◆ const_iterator

template<class T >
typedef impl_type::const_iterator ObjectSet< T >::const_iterator

◆ const_reference

template<class T >
typedef const value_type& ObjectSet< T >::const_reference

◆ difference_type

template<class T >
typedef size_type ObjectSet< T >::difference_type

◆ idx_type

template<class T >
typedef size_type ObjectSet< T >::idx_type

◆ impl_type

template<class T >
typedef VectorAccess<T*,size_type> ObjectSet< T >::impl_type
protected

◆ iterator

template<class T >
typedef impl_type::iterator ObjectSet< T >::iterator

◆ object_type

template<class T >
typedef T ObjectSet< T >::object_type

◆ reference

template<class T >
typedef value_type& ObjectSet< T >::reference

◆ size_type

template<class T >
typedef int ObjectSet< T >::size_type

◆ value_type

template<class T >
typedef T* ObjectSet< T >::value_type

Constructor & Destructor Documentation

◆ ObjectSet() [1/5]

template<class T >
ObjectSet< T >::ObjectSet
inline

◆ ObjectSet() [2/5]

template<class T >
ObjectSet< T >::ObjectSet ( T *  t)
inlineexplicit

◆ ObjectSet() [3/5]

template<class T >
ObjectSet< T >::ObjectSet ( T *  t0,
T *  t1 
)
inlineexplicit

◆ ObjectSet() [4/5]

template<class T >
ObjectSet< T >::ObjectSet ( T *  t0,
T *  t1,
T *  t2 
)
inlineexplicit

◆ ObjectSet() [5/5]

template<class T >
ObjectSet< T >::ObjectSet ( const ObjectSet< T > &  t)
inline

◆ ~ObjectSet()

template<class T >
virtual ObjectSet< T >::~ObjectSet ( )
inlinevirtual

Member Function Documentation

◆ add()

template<class T >
ObjectSet& ObjectSet< T >::add ( T *  t)
inline

◆ addIfNew()

template<class T >
bool ObjectSet< T >::addIfNew ( T *  ptr)
inline

◆ allowNull()

template<class T >
void ObjectSet< T >::allowNull ( bool  yn = true)
inline

◆ append()

template<class T >
void ObjectSet< T >::append ( const ObjectSet< T > &  os)
inlinevirtual

◆ begin() [1/2]

template<class T >
iterator ObjectSet< T >::begin ( )
inline

◆ begin() [2/2]

template<class T >
const_iterator ObjectSet< T >::begin ( ) const
inline

◆ cbegin()

template<class T >
const_iterator ObjectSet< T >::cbegin ( ) const
inline

◆ cend()

template<class T >
const_iterator ObjectSet< T >::cend ( ) const
inline

◆ clone()

template<class T >
ObjectSet* ObjectSet< T >::clone ( ) const
inlineoverridevirtual

Implements OD::Set.

Reimplemented in RefObjectSet< T >, RefObjectSet< visBase::DataObject >, RefObjectSet< const ReflectivityModelBase >, RefObjectSet< EM::EMObject >, RefObjectSet< RandomSeisDataPack >, RefObjectSet< Pick::Set >, RefObjectSet< ReflectivityModelTrace >, RefObjectSet< const EM::Surface >, RefObjectSet< PreStack::Gather >, RefObjectSet< Well::Data >, RefObjectSet< RegularSeisDataPack >, RefObjectSet< const Pick::Set >, RefObjectSet< Network::HttpRequestProcess >, ManagedObjectSet< uiGMTOverlayGrpFactory::Entry >, ManagedObjectSet< WellDataIOProvider >, ManagedObjectSet< OD::PythonAccess::ModuleInfo >, ManagedObjectSet< visBase::Text >, ManagedObjectSet< DataPackMgr >, ManagedObjectSet< visSurvey::HorizonDisplay::IntersectionData >, ManagedObjectSet< WeakPtr< T > >, ManagedObjectSet< LineData >, ManagedObjectSet< uiToolButtonSetup >, ManagedObjectSet< Seis::PreLoadDataEntry >, ManagedObjectSet< IOPar >, ManagedObjectSet< uiGraphicsItem >, ManagedObjectSet< HostData >, ManagedObjectSet< SeisTrcReader >, ManagedObjectSet< EntryData >, ManagedObjectSet< GMTParFactory::Entry >, ManagedObjectSet< Strat::Lithology >, ManagedObjectSet< SeisPSIOProvider >, ManagedObjectSet< const UnitOfMeasure >, ManagedObjectSet< Strat::LevelSet >, ManagedObjectSet< LaySeqAttrib >, ManagedObjectSet< Mnemonic >, ManagedObjectSet< OD::ModDep >, ManagedObjectSet< Marker >, ManagedObjectSet< PropertyRef >, ManagedObjectSet< BufferString >, ManagedObjectSet< SectorData >, ManagedObjectSet< DataEntry >, ManagedObjectSet< ElasticModel >, and ManagedObjectSet< StringPair >.

◆ copy()

template<class T >
void ObjectSet< T >::copy ( const ObjectSet< T > &  os)
inlinevirtual

◆ doAdd()

template<class T >
ObjectSet< T > & ObjectSet< T >::doAdd ( T *  ptr)
inlineprotectedvirtual

◆ empty()

template<class T >
bool ObjectSet< T >::empty ( ) const
inline

◆ end() [1/2]

template<class T >
iterator ObjectSet< T >::end ( )
inline

◆ end() [2/2]

template<class T >
const_iterator ObjectSet< T >::end ( ) const
inline

◆ erase()

template<class T >
void ObjectSet< T >::erase ( )
inlineoverridevirtual

Implements OD::Set.

Reimplemented in EntryDataSet.

◆ first() [1/2]

template<class T >
T * ObjectSet< T >::first
inline

◆ first() [2/2]

template<class T >
const T * ObjectSet< T >::first
inline

◆ get() [1/3]

template<class T >
T * ObjectSet< T >::get ( const T *  t) const
inlinevirtual

check & unconst

◆ get() [2/3]

template<class T >
T * ObjectSet< T >::get ( idx_type  vidx)
inlinevirtual

◆ get() [3/3]

template<class T >
const T * ObjectSet< T >::get ( idx_type  vidx) const
inlinevirtual

◆ getIdx() [1/2]

template<class T >
idx_type ObjectSet< T >::getIdx ( const_iterator  it) const
inline

◆ getIdx() [2/2]

template<class T >
idx_type ObjectSet< T >::getIdx ( iterator  it) const
inline

◆ indexOf()

template<class T >
ObjectSet< T >::idx_type ObjectSet< T >::indexOf ( const T *  ptr) const
inlinevirtual

◆ insertAfter()

template<class T >
void ObjectSet< T >::insertAfter ( T *  newptr,
idx_type  vidx 
)
inlinevirtual

◆ insertAt()

template<class T >
void ObjectSet< T >::insertAt ( T *  newptr,
idx_type  vidx 
)
inlinevirtual

◆ isManaged()

template<class T >
virtual bool ObjectSet< T >::isManaged ( ) const
inlinevirtual

Reimplemented in ManagedObjectSetBase< T >, and ElasticModel.

◆ isPresent()

template<class T >
bool ObjectSet< T >::isPresent ( const T *  ptr) const
inlinevirtual

◆ last() [1/2]

template<class T >
T * ObjectSet< T >::last
inline

◆ last() [2/2]

template<class T >
const T * ObjectSet< T >::last
inline

◆ max_size()

template<class T >
size_type ObjectSet< T >::max_size ( ) const
inline

◆ nrItems()

template<class T >
std::int64_t ObjectSet< T >::nrItems ( ) const
inlineoverridevirtual

Implements OD::Set.

◆ nullAllowed()

template<class T >
bool ObjectSet< T >::nullAllowed ( ) const
inline

◆ operator!=()

template<class T >
bool ObjectSet< T >::operator!= ( const ObjectSet< T > &  oth) const
inline

◆ operator+=()

template<class T >
ObjectSet& ObjectSet< T >::operator+= ( T *  t)
inline

◆ operator-=()

template<class T >
ObjectSet< T > & ObjectSet< T >::operator-= ( T *  ptr)
inlinevirtual

Reimplemented in ManagedObjectSetBase< T >.

◆ operator=()

template<class T >
ObjectSet< T > & ObjectSet< T >::operator= ( const ObjectSet< T > &  oth)
inline

◆ operator==()

template<class T >
bool ObjectSet< T >::operator== ( const ObjectSet< T > &  oth) const
inline

◆ operator[]() [1/3]

template<class T >
const T* ObjectSet< T >::operator[] ( const T *  t) const
inline

◆ operator[]() [2/3]

template<class T >
T* ObjectSet< T >::operator[] ( idx_type  i)
inline

◆ operator[]() [3/3]

template<class T >
const T* ObjectSet< T >::operator[] ( idx_type  i) const
inline

◆ plainErase()

template<class T >
void ObjectSet< T >::plainErase ( )
inline

Not virtual. Don't use casually.

◆ pop()

template<class T >
T * ObjectSet< T >::pop
inlinevirtual

Reimplemented in ManagedObjectSetBase< T >, and ElasticModel.

◆ push()

template<class T >
void ObjectSet< T >::push ( T *  t)
inline

◆ removeRange()

template<class T >
void ObjectSet< T >::removeRange ( idx_type  from,
idx_type  to 
)
inlinevirtual

Reimplemented in ElasticModel, and ManagedObjectSetBase< T >.

◆ removeSingle()

template<class T >
T * ObjectSet< T >::removeSingle ( idx_type  vidx,
bool  keep_order = true 
)
inlinevirtual
Returns
the removed pointer.

Reimplemented in ElasticModel, and ManagedObjectSetBase< T >.

◆ replace()

template<class T >
T * ObjectSet< T >::replace ( idx_type  vidx,
T *  newptr 
)
inlinevirtual

◆ reverse()

template<class T >
void ObjectSet< T >::reverse
inlineoverridevirtual

Implements OD::Set.

◆ setNullAllowed()

template<class T >
void ObjectSet< T >::setNullAllowed ( bool  yn = true)
inline

◆ size()

template<class T >
size_type ObjectSet< T >::size ( ) const
inline

◆ swap() [1/2]

template<class T >
void ObjectSet< T >::swap ( idx_type  idx1,
idx_type  idx2 
)
inline

◆ swap() [2/2]

template<class T >
void ObjectSet< T >::swap ( ObjectSet< T > &  oth)
inline

◆ swapItems()

template<class T >
void ObjectSet< T >::swapItems ( std::int64_t  i1,
std::int64_t  i2 
)
inlineoverridevirtual

Implements OD::Set.

◆ useIndexes()

template<class T >
void ObjectSet< T >::useIndexes ( const idx_type idxs)
inline

◆ validIdx()

template<class T >
bool ObjectSet< T >::validIdx ( std::int64_t  vidx) const
inlineoverridevirtual

Implements OD::Set.

Member Data Documentation

◆ allow0_

template<class T >
bool ObjectSet< T >::allow0_ = false
protected

◆ vec_

template<class T >
impl_type ObjectSet< T >::vec_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024