1 /* Copyright (C) 2014 InfiniDB, Inc. 2 3 This program is free software; you can redistribute it and/or 4 modify it under the terms of the GNU General Public License 5 as published by the Free Software Foundation; version 2 of 6 the License. 7 8 This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License 14 along with this program; if not, write to the Free Software 15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 16 MA 02110-1301, USA. */ 17 18 /*********************************************************************** 19 * $Id: createtable.cpp 9210 2013-01-21 14:10:42Z rdempsey $ 20 * 21 * 22 ***********************************************************************/ 23 24 #include <iostream> 25 26 #define DDLPKG_DLLEXPORT 27 #include "ddlpkg.h" 28 #undef DDLPKG_DLLEXPORT 29 30 namespace ddlpackage 31 { 32 33 using namespace std; 34 CreateTableStatement()35CreateTableStatement::CreateTableStatement() : 36 fTableDef(0) 37 { 38 } 39 CreateTableStatement(TableDef * tableDef)40CreateTableStatement::CreateTableStatement(TableDef* tableDef) : 41 fTableDef(tableDef) 42 { 43 } 44 45 ~CreateTableStatement()46CreateTableStatement::~CreateTableStatement() 47 { 48 if (fTableDef) 49 { 50 delete fTableDef; 51 } 52 } 53 54 /** \brief Put to ostream. */ put(ostream & os) const55ostream& CreateTableStatement::put(ostream& os) const 56 { 57 os << "CreateTable " 58 << *fTableDef; 59 return os; 60 } 61 } 62