1 /* 2 * The Doomsday Engine Project -- libcore 3 * 4 * Copyright © 2004-2017 Jaakko Keränen <jaakko.keranen@iki.fi> 5 * 6 * @par License 7 * LGPL: http://www.gnu.org/licenses/lgpl.html 8 * 9 * <small>This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU Lesser General Public License as published by 11 * the Free Software Foundation; either version 3 of the License, or (at your 12 * option) any later version. This program is distributed in the hope that it 13 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 15 * General Public License for more details. You should have received a copy of 16 * the GNU Lesser General Public License along with this program; if not, see: 17 * http://www.gnu.org/licenses</small> 18 */ 19 20 #ifndef LIBDENG2_PRINTSTATEMENT_H 21 #define LIBDENG2_PRINTSTATEMENT_H 22 23 #include "../Statement" 24 25 namespace de { 26 27 class ArrayExpression; 28 29 /** 30 * Prints arguments to standard output. 31 * 32 * @ingroup script 33 */ 34 class PrintStatement : public Statement 35 { 36 public: 37 /** 38 * Constructor. 39 * 40 * @param arguments Array expression that contains all the arguments 41 * of the print statement. Ownership transferred to the statement. 42 */ 43 PrintStatement(ArrayExpression *arguments = 0); 44 45 ~PrintStatement(); 46 47 void execute(Context &context) const; 48 49 // Implements ISerializable. 50 void operator >> (Writer &to) const; 51 void operator << (Reader &from); 52 53 private: 54 ArrayExpression *_arg; 55 }; 56 57 } // namespace de 58 59 #endif /* LIBDENG2_PRINTSTATEMENT_H */ 60