ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ScriptInterface::ObjectList< ManagedType, BaseType > Class Template Referenceabstract

Owning list of ObjectHandles. More...

#include <ObjectList.hpp>

+ Inheritance diagram for ScriptInterface::ObjectList< ManagedType, BaseType >:
+ Collaboration diagram for ScriptInterface::ObjectList< ManagedType, BaseType >:

Public Types

using Base = ObjectContainer< ObjectList, ManagedType, BaseType >
 

Public Member Functions

 ObjectList ()
 
void do_construct (VariantMap const &params) override
 
void add (std::shared_ptr< ManagedType > const &element)
 Add an element to the list.
 
void remove (std::shared_ptr< ManagedType > const &element)
 Removes all occurrences of an element from the list.
 
auto const & elements () const
 List elements.
 
void clear ()
 Clear the list.
 

Protected Member Functions

Variant do_call_method (std::string const &method, VariantMap const &parameters) override
 

Private Member Functions

virtual void add_in_core (const std::shared_ptr< ManagedType > &obj_ptr)=0
 
virtual void remove_in_core (const std::shared_ptr< ManagedType > &obj_ptr)=0
 
virtual bool has_in_core (const std::shared_ptr< ManagedType > &obj_ptr) const =0
 

Detailed Description

template<typename ManagedType, class BaseType = ObjectHandle>
class ScriptInterface::ObjectList< ManagedType, BaseType >

Owning list of ObjectHandles.

Template Parameters
ManagedTypeType of the managed objects, needs to be derived from ObjectHandle

Definition at line 44 of file ObjectList.hpp.

Member Typedef Documentation

◆ Base

template<typename ManagedType , class BaseType = ObjectHandle>
using ScriptInterface::ObjectList< ManagedType, BaseType >::Base = ObjectContainer<ObjectList, ManagedType, BaseType>

Definition at line 46 of file ObjectList.hpp.

Constructor & Destructor Documentation

◆ ObjectList()

template<typename ManagedType , class BaseType = ObjectHandle>
ScriptInterface::ObjectList< ManagedType, BaseType >::ObjectList ( )
inline

Member Function Documentation

◆ add()

template<typename ManagedType , class BaseType = ObjectHandle>
void ScriptInterface::ObjectList< ManagedType, BaseType >::add ( std::shared_ptr< ManagedType > const &  element)
inline

◆ add_in_core()

template<typename ManagedType , class BaseType = ObjectHandle>
virtual void ScriptInterface::ObjectList< ManagedType, BaseType >::add_in_core ( const std::shared_ptr< ManagedType > &  obj_ptr)
privatepure virtual

◆ clear()

template<typename ManagedType , class BaseType = ObjectHandle>
void ScriptInterface::ObjectList< ManagedType, BaseType >::clear ( )
inline

◆ do_call_method()

template<typename ManagedType , class BaseType = ObjectHandle>
Variant ScriptInterface::ObjectList< ManagedType, BaseType >::do_call_method ( std::string const &  method,
VariantMap const &  parameters 
)
inlineoverrideprotected

◆ do_construct()

template<typename ManagedType , class BaseType = ObjectHandle>
void ScriptInterface::ObjectList< ManagedType, BaseType >::do_construct ( VariantMap const &  params)
inlineoverride

◆ elements()

template<typename ManagedType , class BaseType = ObjectHandle>
auto const & ScriptInterface::ObjectList< ManagedType, BaseType >::elements ( ) const
inline

List elements.

Definition at line 108 of file ObjectList.hpp.

◆ has_in_core()

template<typename ManagedType , class BaseType = ObjectHandle>
virtual bool ScriptInterface::ObjectList< ManagedType, BaseType >::has_in_core ( const std::shared_ptr< ManagedType > &  obj_ptr) const
privatepure virtual

◆ remove()

template<typename ManagedType , class BaseType = ObjectHandle>
void ScriptInterface::ObjectList< ManagedType, BaseType >::remove ( std::shared_ptr< ManagedType > const &  element)
inline

Removes all occurrences of an element from the list.

Parameters
elementThe element to remove.

Definition at line 94 of file ObjectList.hpp.

References ScriptInterface::ObjectList< ManagedType, BaseType >::has_in_core(), and ScriptInterface::ObjectList< ManagedType, BaseType >::remove_in_core().

Referenced by ScriptInterface::ObjectList< ManagedType, BaseType >::do_call_method().

◆ remove_in_core()

template<typename ManagedType , class BaseType = ObjectHandle>
virtual void ScriptInterface::ObjectList< ManagedType, BaseType >::remove_in_core ( const std::shared_ptr< ManagedType > &  obj_ptr)
privatepure virtual

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