The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members

Implementation of a function that may be called through a script interface. More...

#include <ocean/plankton/VScript.hpp>

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

Public Member Functions

virtual RefPtr< VScriptValuecall (const RefPtr< VScriptParameters > &V, const RefPtr< ValuePool > &VP)=0
 Call a functor relative to a Context.
 
virtual RefPtr< VScriptParametersdescribe () const =0
 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

- 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.
 
- 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

Implementation of a function that may be called through a script interface.

The function is invoked via the call() member function. The functor also allows to retrieve information about how to call the function via the member function describe() which returns the desired parameter list.

A function may be polymorphic and behave differently depending on the provided argument types. Each argument comes with a list of possible types in the argument description. Upon function call, only one type is set.

Each argument is specified via a name. Instead of providing this full name, also aliases and shortcuts can be specified.

The return value of the function may be of different type, depending on the function's behaviour.

In any case all values are transported in the form of textual encodings within a string.