1 /****************************************************************************** 2 * 3 * 4 * 5 * Copyright (C) 1997-2015 by Dimitri van Heesch. 6 * 7 * Permission to use, copy, modify, and distribute this software and its 8 * documentation under the terms of the GNU General Public License is hereby 9 * granted. No representations are made about the suitability of this software 10 * for any purpose. It is provided "as is" without express or implied warranty. 11 * See the GNU General Public License for more details. 12 * 13 * Documents produced by Doxygen are derivative works derived from the 14 * input used in their production; they are not affected by this license. 15 * 16 */ 17 18 #ifndef FORTRANCODE_H 19 #define FORTRANCODE_H 20 21 #include "parserintf.h" 22 23 class CodeOutputInterface; 24 class FileDef; 25 class MemberDef; 26 class QCString; 27 class Definition; 28 29 class FortranCodeParser : public CodeParserInterface 30 { 31 public: 32 FortranCodeParser(FortranFormat format=FortranFormat_Unknown); 33 virtual ~FortranCodeParser(); 34 void parseCode(CodeOutputInterface &codeOutIntf, 35 const QCString &scopeName, 36 const QCString &input, 37 SrcLangExt lang, 38 bool isExampleBlock, 39 const QCString &exampleName=QCString(), 40 const FileDef *fileDef=0, 41 int startLine=-1, 42 int endLine=-1, 43 bool inlineFragment=FALSE, 44 const MemberDef *memberDef=0, 45 bool showLineNumbers=TRUE, 46 const Definition *searchCtx=0, 47 bool collectXRefs=TRUE 48 ); 49 void resetCodeParserState(); 50 51 private: 52 struct Private; 53 std::unique_ptr<Private> p; 54 }; 55 56 class FortranCodeParserFree : public FortranCodeParser 57 { 58 public: FortranCodeParserFree()59 FortranCodeParserFree() : FortranCodeParser(FortranFormat_Free) { } 60 }; 61 62 class FortranCodeParserFixed : public FortranCodeParser 63 { 64 public: FortranCodeParserFixed()65 FortranCodeParserFixed() : FortranCodeParser(FortranFormat_Fixed) { } 66 }; 67 68 #endif 69