The Vish Visualization Shell 0.3
Vish
Public Types | Public Member Functions | List of all members
Wizt::VScriptAction< FunctorObject > Struct Template Reference

Invoking class member functions through the VScript API. More...

#include <ocean/plankton/VScript.hpp>

Inheritance diagram for Wizt::VScriptAction< FunctorObject >:
Wizt::VScriptFunctor MemCore::ReferenceBase< VScriptFunctor >

Public Types

typedef RefPtr< VScriptValue >(FunctorObject::* call_t) (const RefPtr< VScriptParameters > &V, const RefPtr< ValuePool > &)
 Member functions that are callable through the VScript API need to conform to the call_t type.
 
- Public Types inherited from MemCore::ReferenceBase< VScriptFunctor >
using reference_domain_t = VScriptFunctor
 The type of the base class.
 
using SelfPtr_t = WeakPtr< VScriptFunctor, VScriptFunctor >
 Type for a pointer to this object itself.
 

Public Member Functions

RefPtr< VScriptValuecall (const RefPtr< VScriptParameters > &V, const RefPtr< ValuePool > &Context) override
 Call a functor.
 
RefPtr< VScriptParametersdescribe () const override
 Retrieve parameter description of a functor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< VScriptFunctor >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< VScriptFunctor, VScriptFunctor > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (VScriptFunctor *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 

Additional Inherited Members

- Protected Member Functions inherited from MemCore::ReferenceBase< VScriptFunctor >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

template<class FunctorObject>
struct Wizt::VScriptAction< FunctorObject >

Invoking class member functions through the VScript API.

This template class allows to map a class member function to a scriptable function.

Member Function Documentation

◆ call()

template<class FunctorObject >
RefPtr< VScriptValue > Wizt::VScriptAction< FunctorObject >::call ( const RefPtr< VScriptParameters > &  V,
const RefPtr< ValuePool > &  Context 
)
inlineoverridevirtual

Call a functor.

Parameters
Vfunction arguments
Contextthe context information

Implements Wizt::VScriptFunctor.