AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
autopasTools::PseudoContainer< T > Class Template Reference

Wrapper class for things like std::vector to be used in templated methods that take an AutoPas or ParticleContainer. More...

#include <PseudoContainer.h>

Public Types

using ActualT = std::remove_pointer_t< std::decay_t< T > >
 Actual type of the container without qualifiers or pointers.
 
using ParticleType = typename ActualT::value_type
 Particle / value type.
 

Public Member Functions

 PseudoContainer (T &actualContainer)
 Constructor.
 
void addParticle (const ParticleType &p)
 Wrapper for push_back.
 

Detailed Description

template<class T>
class autopasTools::PseudoContainer< T >

Wrapper class for things like std::vector to be used in templated methods that take an AutoPas or ParticleContainer.

This wrapper for example maps functions like std::vector::push_back to AutoPas::addParticle().

It does not take ownership of the wrapped object but only holds a pointer to it!

Template Parameters
TFull type of the wrapped container

Constructor & Destructor Documentation

◆ PseudoContainer()

template<class T >
autopasTools::PseudoContainer< T >::PseudoContainer ( T &  actualContainer)
inlineexplicit

Constructor.

Parameters
actualContainerReference to container to be wrapped.

Member Function Documentation

◆ addParticle()

template<class T >
void autopasTools::PseudoContainer< T >::addParticle ( const ParticleType p)
inline

Wrapper for push_back.

Parameters
p

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