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-2015  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 __Bif_OPER1_COMMUTE_HH_DEFINED__
22 #define __Bif_OPER1_COMMUTE_HH_DEFINED__
23 
24 #include "PrimitiveOperator.hh"
25 
26 //-----------------------------------------------------------------------------
27 /** Primitive operator ⍨ (commute/duplicate)
28  */
29 /// The class implementing ⍨
30 class Bif_OPER1_COMMUTE : public PrimitiveOperator
31 {
32 public:
33    /// Constructor.
Bif_OPER1_COMMUTE()34    Bif_OPER1_COMMUTE() : PrimitiveOperator(TOK_OPER1_COMMUTE) {}
35 
36    /// Overloaded Function::eval_LB().
37    virtual Token eval_LB(Token & LO, Value_P B);
38 
39    /// Overloaded Function::eval_LXB().
40    virtual Token eval_LXB(Token & LO, Value_P X, Value_P B);
41 
42    /// Overloaded Function::eval_ALB().
43    virtual Token eval_ALB(Value_P A, Token & LO, Value_P B);
44 
45    /// Overloaded Function::eval_ALXB().
46    virtual Token eval_ALXB(Value_P A, Token & LO, Value_P X, Value_P B);
47 
48    static Bif_OPER1_COMMUTE * fun;      ///< Built-in function.
49    static Bif_OPER1_COMMUTE  _fun;      ///< Built-in function.
50 
51 protected:
52 };
53 //-----------------------------------------------------------------------------
54 
55 #endif // __Bif_OPER1_COMMUTE_HH_DEFINED__
56