ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Owning list of ObjectHandles. More...
#include <ObjectList.hpp>
Public Types | |
using | Base = ObjectContainer< ObjectList, ManagedType, BaseType > |
Public Member Functions | |
ObjectList () | |
void | do_construct (VariantMap const ¶ms) 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 ¶meters) 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 |
Owning list of ObjectHandles.
ManagedType | Type of the managed objects, needs to be derived from ObjectHandle |
Definition at line 44 of file ObjectList.hpp.
using ScriptInterface::ObjectList< ManagedType, BaseType >::Base = ObjectContainer<ObjectList, ManagedType, BaseType> |
Definition at line 46 of file ObjectList.hpp.
|
inline |
Definition at line 59 of file ObjectList.hpp.
References ScriptInterface::make_vector_of_variants(), and ScriptInterface::AutoParameter::read_only.
|
inline |
Add an element to the list.
element | The element to add. |
Definition at line 78 of file ObjectList.hpp.
References ScriptInterface::ObjectList< ManagedType, BaseType >::add_in_core(), and ScriptInterface::ObjectList< ManagedType, BaseType >::has_in_core().
Referenced by ScriptInterface::ObjectList< ManagedType, BaseType >::do_call_method().
|
privatepure virtual |
|
inline |
Clear the list.
Definition at line 113 of file ObjectList.hpp.
References ScriptInterface::get_value(), and ScriptInterface::ObjectList< ManagedType, BaseType >::remove_in_core().
Referenced by ScriptInterface::ObjectList< ManagedType, BaseType >::do_call_method().
|
inlineoverrideprotected |
Definition at line 122 of file ObjectList.hpp.
References ScriptInterface::ObjectList< ManagedType, BaseType >::add(), ScriptInterface::ObjectList< ManagedType, BaseType >::clear(), ScriptInterface::get_value(), ScriptInterface::make_vector_of_variants(), ScriptInterface::none, and ScriptInterface::ObjectList< ManagedType, BaseType >::remove().
|
inlineoverride |
Definition at line 66 of file ObjectList.hpp.
References ScriptInterface::ObjectList< ManagedType, BaseType >::add_in_core(), ScriptInterface::get_value(), and params.
Referenced by ScriptInterface::Accumulators::AutoUpdateAccumulators::on_bind_system(), and ScriptInterface::Constraints::Constraints::on_bind_system().
|
inline |
List elements.
Definition at line 108 of file ObjectList.hpp.
|
privatepure virtual |
|
inline |
Removes all occurrences of an element from the list.
element | The element to remove. |
Definition at line 94 of file ObjectList.hpp.
References ScriptInterface::get_value(), ScriptInterface::ObjectList< ManagedType, BaseType >::has_in_core(), and ScriptInterface::ObjectList< ManagedType, BaseType >::remove_in_core().
Referenced by ScriptInterface::ObjectList< ManagedType, BaseType >::do_call_method().
|
privatepure virtual |