Content


NTL
Core
CFunctionSpaceship

CFunctionSpaceship


Class provides implementation of the spaceship comparison operator <=> for expressions. It is being used by expression runners.

Function result is integer. It equals -1 if first operand is less than the second one, 1 - if first operand is greater than the second one and 0 otherwise.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CFunctionSpaceship :public CFunction
{
public:
    // IFunction methods 
    bool Run() override;

    CFunctionSpaceship(IErrorListener *error_listener, IFunction *operand1, IFunction *operand2);
};
Namespace: nitisa::script
Include: Nitisa/Modules/Script/Functions/Comparison/FunctionSpaceship.h