OpendTect-6_4  6.4
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TypeSetBase< T, I > Class Template Reference

Base class for TypeSet, usually not used as such. More...

Inherits OD::Set.

Inherited by LargeValVec< float >, and LargeValVec< od_uint64 >.

Public Types

typedef I size_type
 
typedef T object_type
 

Public Member Functions

virtual ~TypeSetBase ()
 
TypeSetBase< T, I > & operator= (const TypeSetBase< T, I > &ts)
 
size_type size () const
 
virtual int64_t nrItems () const
 
virtual bool setSize (size_type, T val=T())
 
virtual bool setCapacity (size_type sz, bool withmargin)
 
virtual size_type getCapacity () const
 
void setAll (T)
 
void replace (T, T)
 
T & operator[] (size_type)
 
const T & operator[] (size_type) const
 
T & first ()
 
const T & first () const
 
T & last ()
 
const T & last () const
 
virtual bool validIdx (int64_t) const
 
virtual size_type indexOf (T, bool forward=true, size_type start=-1) const
 
bool isPresent (const T &) const
 
size_type count (const T &) const
 
TypeSetBase< T, I > & add (const T &)
 
virtual void insert (size_type, const T &)
 
bool push (const T &)
 
pop ()
 
TypeSetBase< T, I > & operator+= (const T &t)
 
virtual bool append (const T *, size_type)
 
virtual bool append (const TypeSetBase< T, I > &)
 
virtual bool addIfNew (const T &)
 
virtual TypeSetBase< T, I > & copy (const T *, size_type)
 
virtual TypeSetBase< T, I > & copy (const TypeSetBase< T, I > &)
 
virtual void createUnion (const TypeSetBase< T, I > &)
 
virtual void createIntersection (const TypeSetBase< T, I > &)
 Only keeps common items. More...
 
virtual void createDifference (const TypeSetBase< T, I > &, bool must_preserve_order=false)
 Removes all items present in other set. More...
 
virtual void swap (int64_t, int64_t)
 
virtual void move (size_type from, size_type to)
 
virtual void getReOrdered (const size_type *, TypeSetBase< T, I > &)
 Fills as per the given array of indexes. More...
 
virtual void reverse ()
 
virtual void erase ()
 
virtual void removeSingle (size_type, bool preserver_order=true)
 
TypeSetBase< T, I > & operator-= (const T &)
 
virtual void removeRange (size_type from, size_type to)
 
virtual T * arr ()
 3rd party access More...
 
virtual const T * arr () const
 
std::vector< T > & vec ()
 
const std::vector< T > & vec () const
 
- Public Member Functions inherited from OD::Set
virtual ~Set ()
 
bool isEmpty () const
 
void setEmpty ()
 

Protected Member Functions

 TypeSetBase ()
 
 TypeSetBase (size_type nr, T typ)
 
 TypeSetBase (const T *, size_type nr)
 
 TypeSetBase (const TypeSetBase< T, size_type > &)
 
virtual T * gtArr () const
 

Protected Attributes

VectorAccess< T, I > vec_
 

Detailed Description

template<class T, class I>
class TypeSetBase< T, I >

Base class for TypeSet, usually not used as such.

Member Typedef Documentation

template<class T, class I>
typedef T TypeSetBase< T, I >::object_type
template<class T, class I>
typedef I TypeSetBase< T, I >::size_type

Constructor & Destructor Documentation

template<class T , class I >
TypeSetBase< T, I >::~TypeSetBase ( )
inlinevirtual
template<class T , class I >
TypeSetBase< T, I >::TypeSetBase ( )
inlineprotected
template<class T, class I >
TypeSetBase< T, I >::TypeSetBase ( size_type  nr,
typ 
)
inlineprotected
template<class T, class I >
TypeSetBase< T, I >::TypeSetBase ( const T *  tarr,
size_type  nr 
)
inlineprotected
template<class T, class I >
TypeSetBase< T, I >::TypeSetBase ( const TypeSetBase< T, size_type > &  t)
inlineprotected

Member Function Documentation

template<class T, class I >
TypeSetBase< T, I > & TypeSetBase< T, I >::add ( const T &  typ)
inline
template<class T, class I >
bool TypeSetBase< T, I >::addIfNew ( const T &  typ)
inlinevirtual
template<class T, class I >
bool TypeSetBase< T, I >::append ( const T *  tarr,
size_type  sz 
)
inlinevirtual
template<class T, class I>
bool TypeSetBase< T, I >::append ( const TypeSetBase< T, I > &  ts)
inlinevirtual
template<class T, class I>
virtual T* TypeSetBase< T, I >::arr ( )
inlinevirtual

3rd party access

template<class T, class I>
virtual const T* TypeSetBase< T, I >::arr ( ) const
inlinevirtual
template<class T, class I >
TypeSetBase< T, I > & TypeSetBase< T, I >::copy ( const T *  tarr,
size_type  sz 
)
inlinevirtual
template<class T, class I>
TypeSetBase< T, I > & TypeSetBase< T, I >::copy ( const TypeSetBase< T, I > &  ts)
inlinevirtual
template<class T, class I >
I TypeSetBase< T, I >::count ( const T &  typ) const
inline
template<class T, class I>
void TypeSetBase< T, I >::createDifference ( const TypeSetBase< T, I > &  ts,
bool  must_preserve_order = false 
)
inlinevirtual

Removes all items present in other set.

template<class T, class I>
void TypeSetBase< T, I >::createIntersection ( const TypeSetBase< T, I > &  ts)
inlinevirtual

Only keeps common items.

template<class T, class I>
void TypeSetBase< T, I >::createUnion ( const TypeSetBase< T, I > &  ts)
inlinevirtual

Adds items not already there

template<class T , class I >
void TypeSetBase< T, I >::erase ( )
inlinevirtual

Implements OD::Set.

template<class T , class I >
T & TypeSetBase< T, I >::first ( )
inline
template<class T , class I >
const T & TypeSetBase< T, I >::first ( ) const
inline
template<class T , class I >
I TypeSetBase< T, I >::getCapacity ( ) const
inlinevirtual
template<class T, class I>
void TypeSetBase< T, I >::getReOrdered ( const size_type idxs,
TypeSetBase< T, I > &  out 
)
inlinevirtual

Fills as per the given array of indexes.

template<class T , class I >
T * TypeSetBase< T, I >::gtArr ( ) const
inlineprotectedvirtual
template<class T, class I >
I TypeSetBase< T, I >::indexOf ( typ,
bool  forward = true,
size_type  start = -1 
) const
inlinevirtual
template<class T, class I >
void TypeSetBase< T, I >::insert ( size_type  idx,
const T &  typ 
)
inlinevirtual
template<class T, class I >
bool TypeSetBase< T, I >::isPresent ( const T &  t) const
inline
template<class T , class I >
T & TypeSetBase< T, I >::last ( )
inline
template<class T , class I >
const T & TypeSetBase< T, I >::last ( ) const
inline
template<class T , class I >
void TypeSetBase< T, I >::move ( size_type  from,
size_type  to 
)
inlinevirtual
template<class T, class I>
virtual int64_t TypeSetBase< T, I >::nrItems ( ) const
inlinevirtual

Implements OD::Set.

template<class T, class I>
TypeSetBase<T,I>& TypeSetBase< T, I >::operator+= ( const T &  t)
inline
template<class T, class I >
TypeSetBase< T, I > & TypeSetBase< T, I >::operator-= ( const T &  typ)
inline
template<class T, class I>
TypeSetBase<T,I>& TypeSetBase< T, I >::operator= ( const TypeSetBase< T, I > &  ts)
inline
template<class T , class I >
T & TypeSetBase< T, I >::operator[] ( size_type  idx)
inline
template<class T , class I >
const T & TypeSetBase< T, I >::operator[] ( size_type  idx) const
inline
template<class T , class I >
T TypeSetBase< T, I >::pop ( )
inline
template<class T, class I >
bool TypeSetBase< T, I >::push ( const T &  typ)
inline
template<class T , class I >
void TypeSetBase< T, I >::removeRange ( size_type  from,
size_type  to 
)
inlinevirtual
template<class T , class I >
void TypeSetBase< T, I >::removeSingle ( size_type  idx,
bool  preserver_order = true 
)
inlinevirtual
template<class T, class I >
void TypeSetBase< T, I >::replace ( val,
newval 
)
inline
template<class T , class I >
void TypeSetBase< T, I >::reverse ( )
inlinevirtual
template<class T, class I >
void TypeSetBase< T, I >::setAll ( val)
inline
template<class T , class I >
bool TypeSetBase< T, I >::setCapacity ( size_type  sz,
bool  withmargin 
)
inlinevirtual

Allocates mem only, no size() change

template<class T, class I >
bool TypeSetBase< T, I >::setSize ( size_type  sz,
val = T() 
)
inlinevirtual
Parameters
valvalue assigned to new items
template<class T , class I >
I TypeSetBase< T, I >::size ( ) const
inline
template<class T , class I >
void TypeSetBase< T, I >::swap ( int64_t  idx0,
int64_t  idx1 
)
inlinevirtual

Implements OD::Set.

template<class T , class I >
bool TypeSetBase< T, I >::validIdx ( int64_t  idx) const
inlinevirtual

Implements OD::Set.

template<class T , class I >
std::vector< T > & TypeSetBase< T, I >::vec ( )
inline
template<class T , class I >
const std::vector< T > & TypeSetBase< T, I >::vec ( ) const
inline

Member Data Documentation

template<class T, class I>
VectorAccess<T,I> TypeSetBase< T, I >::vec_
protected

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