1 /* 2 This file is part of GNU APL, a free implementation of the 3 ISO/IEC Standard 13751, "Programming Language APL, Extended" 4 5 Copyright (C) 2008-2016 Dr. Jürgen Sauermann 6 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __QUAD_FX_HH_DEFINED__ 22 #define __QUAD_FX_HH_DEFINED__ 23 24 #include "QuadFunction.hh" 25 26 //----------------------------------------------------------------------------- 27 /** 28 The system function Quad-FX (Fix) 29 */ 30 /// The class implementing ⎕FX 31 class Quad_FX : public QuadFunction 32 { 33 public: 34 /// Constructor. Quad_FX()35 Quad_FX() : QuadFunction(TOK_Quad_FX) {} 36 37 static Quad_FX * fun; ///< Built-in function. 38 static Quad_FX _fun; ///< Built-in function. 39 40 /// overloaded Function::eval_B(). 41 virtual Token eval_B(Value_P B); 42 43 /// overloaded Function::eval_AB(). 44 virtual Token eval_AB(Value_P A, Value_P B); 45 46 /// overloaded Function::eval_AXB(). 47 virtual Token eval_AXB(Value_P A, Value_P X, Value_P B); 48 49 /// do ⎕FX with execution properties \b exec_props 50 static Token do_quad_FX(const int * exec_props, Value_P B, 51 const UTF8_string & creator, bool tolerant); 52 53 protected: 54 /// do ⎕FX with execution properties \b exec_props 55 static Token do_quad_FX(const int * exec_props, const UCS_string & text, 56 const UTF8_string & creator, bool tolerant); 57 58 /// ⎕FX with native function and optional library reference 59 static Token do_native_FX(Value_P A, Axis axis, Value_P B); 60 }; 61 //----------------------------------------------------------------------------- 62 #endif // __QUAD_FX_HH_DEFINED__ 63 64