NuriaProject Framework  0.1
The NuriaProject Framework
Public Member Functions | List of all members
Nuria::TestCall Class Reference

The TestCall class encapsulates a call to a test function for LazyCondition. More...

#include <lazyevaluation.hpp>

Public Member Functions

 TestCall ()
 
 TestCall (const QString &name, const QVariantList &args)
 
 TestCall (const Nuria::Callback &callback, const QVariantList &args)
 
const QVariantList & arguments () const
 
Nuria::Callback callback () const
 
bool isNative () const
 
QString name () const
 

Detailed Description

The TestCall class encapsulates a call to a test function for LazyCondition.

Note
Usually you don't interact with this class directly, instead see test.

This class makes it possible for LazyCondition and evaluators to interact with test methods. Methods can be of two types: Named or native.

A named method can be used with any evaluator, but it's up to the evaluator which methods are supported. A evaluator may support registering methods or may only provide pre-specified ones.

Native methods on the other hand are stored as Callback and thus are only usable if the evaluator is run in the application itself. These conditions can't be serialized and should be used with care.

See also
Nuria::test

Constructor & Destructor Documentation

Nuria::TestCall::TestCall ( )

Creates a invalid instance.

Nuria::TestCall::TestCall ( const QString &  name,
const QVariantList &  args 
)

Creates a instance refering to a named method.

Nuria::TestCall::TestCall ( const Nuria::Callback callback,
const QVariantList &  args 
)

Creates a instance refering to a native method.

Member Function Documentation

const QVariantList& Nuria::TestCall::arguments ( ) const

Returns the arguments which are passed to the method. May contain other Nuria::Field instances, including method calls.

Nuria::Callback Nuria::TestCall::callback ( ) const

Returns the Callback instance if this is a native method. Else a invalid Callback is returned.

See also
isNative
bool Nuria::TestCall::isNative ( ) const

Returns true if this is a native method.

See also
name callback
QString Nuria::TestCall::name ( ) const

Returns the name of the method if this is a named method. Else a empty string is returned.

See also
isNative

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