gatb.core-API-0.0.0
ContainerSet< Item > Class Template Reference

Implementation of the Container interface. More...

#include <ContainerSet.hpp>

Inheritance diagram for ContainerSet< Item >:
Inheritance graph

Public Member Functions

 ContainerSet (dp::Iterator< Item > *it)
 
bool contains (const Item &item)
 
- Public Member Functions inherited from Container< Item >
virtual ~Container ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

template<typename Item>
class gatb::core::tools::collections::impl::ContainerSet< Item >

Implementation of the Container interface.

This implementation uses a sorted vector for the 'contains' method. It implies a binary_search (log(N) complexity)

Constructor & Destructor Documentation

ContainerSet ( dp::Iterator< Item > *  it)
inline

Constructor.

Parameters
[in]it: iterator over the items of the container. They are all inserted in the vector and the vector is then sorted.

Member Function Documentation

bool contains ( const Item &  item)
inlinevirtual

Tells whether an item exists or not

Returns
true if the item exists, false otherwise

Implements Container< Item >.


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