SetImpl< SET > Class Template Reference

#include <set.h>

Inheritance diagram for SetImpl< SET >:

Public Types

using SetType = typename std::decay< SET >::type
 
using ValueType = typename SetType::ValueType
 
using Super = typename std::conditional< CONSTSET||!REFERENCE, SetInterface< ValueType >, NonConstSet< ValueType > >::type
 
using Interface = typename Super::Interface
 
using Iterator = typename Interface::Iterator
 
using ConstIterator = typename Interface::ConstIterator
 

Public Member Functions

 MAXON_IMPLEMENTATION_SIMPLE (SetImpl)
 
 SetImpl ()
 
 SetImpl (SET &&set)
 
 SetImpl (SetImpl &&src)
 
Int GetCount () const
 
Bool Contains (const ValueType &value) const
 
Result< void > Insert (const ValueType &value, Bool &added=BoolLValue())
 
Result< void > Insert (ValueType &&value, Bool &added=BoolLValue())
 
Result< BoolErase (const ValueType &value)
 
Iterator Erase (const Iterator &iterator)
 
Result< void > CopyFrom (const Interface &other)
 
Result< Interface * > Clone (Bool copyContent) const
 
String ToString (const FormatStatement *formatStatement=nullptr) const
 
Int GetMemorySize () const
 
const DataTypeGetValueDataType () const
 
void Reset ()
 
void Flush ()
 
void IteratorInit (Iterator *it, Bool end)
 
void IteratorInit (ConstIterator *it, Bool end) const
 
void IteratorInitMove (Iterator *dest, Iterator *src) const
 
void IteratorInitMove (ConstIterator *dest, ConstIterator *src) const
 
void IteratorFree (Iterator *it) const
 
void IteratorFree (ConstIterator *it) const
 
Bool IteratorIsEqual (const Iterator *a, const Iterator *b) const
 
Bool IteratorIsEqual (const ConstIterator *a, const ConstIterator *b) const
 
void IteratorInc (Iterator *it) const
 
void IteratorInc (ConstIterator *it) const
 
const ValueTypeIteratorGet (const Iterator *it) const
 
const ValueTypeIteratorGet (const ConstIterator *it) const
 
std::add_lvalue_reference< SET >::type GetSet ()
 
const SetTypeGetSet () const
 

Static Public Attributes

static const Bool CONSTSET
 
static const Bool REFERENCE
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (SetImpl)
 

Static Private Member Functions

static SetType::Iterator & GetIterator (Iterator *it)
 
static SetType::ConstIterator & GetIterator (ConstIterator *it)
 
static const SetType::Iterator & GetIterator (const Iterator *it)
 
static const SetType::ConstIterator & GetIterator (const ConstIterator *it)
 

Private Attributes

SET _set
 

Member Typedef Documentation

◆ SetType

using SetType = typename std::decay<SET>::type

◆ ValueType

using ValueType = typename SetType::ValueType

◆ Super

using Super = typename std::conditional<CONSTSET || !REFERENCE, SetInterface<ValueType>, NonConstSet<ValueType> >::type

◆ Interface

using Interface = typename Super::Interface

◆ Iterator

using Iterator = typename Interface::Iterator

◆ ConstIterator

using ConstIterator = typename Interface::ConstIterator

Constructor & Destructor Documentation

◆ SetImpl() [1/3]

SetImpl ( )

◆ SetImpl() [2/3]

SetImpl ( SET &&  set)
explicit

◆ SetImpl() [3/3]

SetImpl ( SetImpl< SET > &&  src)

Member Function Documentation

◆ MAXON_IMPLEMENTATION_SIMPLE()

MAXON_IMPLEMENTATION_SIMPLE ( SetImpl< SET >  )

◆ GetCount()

Int GetCount ( void  ) const

◆ Contains()

Bool Contains ( const ValueType value) const

◆ Insert() [1/2]

Result<void> Insert ( const ValueType value,
Bool added = BoolLValue() 
)

◆ Insert() [2/2]

Result<void> Insert ( ValueType &&  value,
Bool added = BoolLValue() 
)

◆ Erase() [1/2]

Result<Bool> Erase ( const ValueType value)

◆ Erase() [2/2]

Iterator Erase ( const Iterator iterator)

◆ CopyFrom()

Result<void> CopyFrom ( const Interface other)

◆ Clone()

Result<Interface*> Clone ( Bool  copyContent) const

◆ ToString()

String ToString ( const FormatStatement formatStatement = nullptr) const

◆ GetMemorySize()

Int GetMemorySize ( void  ) const

◆ GetValueDataType()

const DataType& GetValueDataType ( ) const

◆ Reset()

void Reset ( void  )

◆ Flush()

void Flush ( void  )

◆ IteratorInit() [1/2]

void IteratorInit ( Iterator it,
Bool  end 
)

◆ IteratorInit() [2/2]

void IteratorInit ( ConstIterator it,
Bool  end 
) const

◆ IteratorInitMove() [1/2]

void IteratorInitMove ( Iterator dest,
Iterator src 
) const

◆ IteratorInitMove() [2/2]

void IteratorInitMove ( ConstIterator dest,
ConstIterator src 
) const

◆ IteratorFree() [1/2]

void IteratorFree ( Iterator it) const

◆ IteratorFree() [2/2]

void IteratorFree ( ConstIterator it) const

◆ IteratorIsEqual() [1/2]

Bool IteratorIsEqual ( const Iterator a,
const Iterator b 
) const

◆ IteratorIsEqual() [2/2]

Bool IteratorIsEqual ( const ConstIterator a,
const ConstIterator b 
) const

◆ IteratorInc() [1/2]

void IteratorInc ( Iterator it) const

◆ IteratorInc() [2/2]

void IteratorInc ( ConstIterator it) const

◆ IteratorGet() [1/2]

const ValueType* IteratorGet ( const Iterator it) const

◆ IteratorGet() [2/2]

const ValueType* IteratorGet ( const ConstIterator it) const

◆ GetSet() [1/2]

std::add_lvalue_reference<SET>::type GetSet ( )

◆ GetSet() [2/2]

const SetType& GetSet ( ) const

◆ GetIterator() [1/4]

static SetType::Iterator& GetIterator ( Iterator it)
staticprivate

◆ GetIterator() [2/4]

static SetType::ConstIterator& GetIterator ( ConstIterator it)
staticprivate

◆ GetIterator() [3/4]

static const SetType::Iterator& GetIterator ( const Iterator it)
staticprivate

◆ GetIterator() [4/4]

static const SetType::ConstIterator& GetIterator ( const ConstIterator it)
staticprivate

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( SetImpl< SET >  )
private

Member Data Documentation

◆ CONSTSET

const Bool CONSTSET
static

◆ REFERENCE

const Bool REFERENCE
static

◆ _set

SET _set
private