blob: 8e27223cdbd37f7c979f045d7815f7473b6245ea [file] [log] [blame]
/*******************************************************************************
* Copyright © 2012, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*
*******************************************************************************/
package eglx.lang;
import egl.lang.reflect.ClassType;
import egl.lang.reflect.Operation;
/**
* This is the class for booleans: true/false values.
*/
externalType EBoolean extends AnyValue type ClassType
/**
* Constructs a boolean with a default value of false.
*/
constructor();
/**
* {@Operation ==} Compares two booleans.
*/
static function $EQ(lvalue EBoolean? in, rvalue EBoolean? in) returns(EBoolean) {@Operation{"=="}};
/**
* {@Operation !=} Compares two booleans.
*/
static function $NEQ(lvalue EBoolean? in, rvalue EBoolean? in) returns(EBoolean) {@Operation{"!="}};
/**
* {@Operation &&} Returns true if both operands are true.
*/
static function $AND(lvalue EBoolean in, rvalue EBoolean in) returns(EBoolean) {@Operation{"&&"}};
/**
* {@Operation ||} Returns true if either operand is true.
*/
static function $OR(lvalue EBoolean in, rvalue EBoolean in) returns(EBoolean) {@Operation{"||"}};
/**
* {@Operation xor} Returns true if one operand is true and the other is false.
*/
static function $XOR(lvalue EBoolean in, rvalue EBoolean in) returns(EBoolean) {@Operation{"xor"}};
/**
* {@Operation !} Negates a boolean.
*/
static function $NOT(value EBoolean in) returns (EBoolean) {@Operation{"!"}};
end