1 /********************************************************************** 2 Copyright (C) 2010 by Chris Morley 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation version 2 of 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 #include <openbabel/babelconfig.h> 14 #include <openbabel/obconversion.h> 15 #include <openbabel/base.h> 16 17 namespace OpenBabel 18 { 19 20 class NulFormat : public OBFormat 21 { 22 public: NulFormat()23 NulFormat() { OBConversion::RegisterFormat("nul",this); } 24 Description()25 virtual const char* Description() { return "Outputs nothing"; }; 26 Flags()27 virtual unsigned int Flags() { return NOTREADABLE; }; 28 WriteChemObject(OBConversion * pConv)29 virtual bool WriteChemObject(OBConversion* pConv) 30 { 31 delete pConv->GetChemObject(); 32 return true; 33 } WriteMolecule(OBBase *,OBConversion *)34 bool WriteMolecule(OBBase* /*pOb*/, OBConversion* /*pConv*/) { return false; } 35 }; 36 37 NulFormat theNulFormat; 38 39 } //namespace OpenBabel 40 41