Doxygen
Loading...
Searching...
No Matches
pycode.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2020 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15/* This code is based on the work done by the MoxyPyDoxy team
16 * (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)
17 * in Spring 2005 as part of CS 179E: Compiler Design Project
18 * at the University of California, Riverside; the course was
19 * taught by Peter H. Froehlich <phf@acm.org>.
20 */
21
22
23#ifndef PYCODE_H
24#define PYCODE_H
25
26#include "parserintf.h"
27
28class FileDef;
29class MemberDef;
30class QCString;
31class Definition;
32
34{
35 public:
37 ~PythonCodeParser() override;
39
40 void parseCode(OutputCodeList &codeOutIntf,
41 const QCString &scopeName,
42 const QCString &input,
43 SrcLangExt lang,
44 bool stripCodeComments,
45 bool isExampleBlock,
46 const QCString &exampleName=QCString(),
47 const FileDef *fileDef=nullptr,
48 int startLine=-1,
49 int endLine=-1,
50 bool inlineFragment=FALSE,
51 const MemberDef *memberDef=nullptr,
52 bool showLineNumbers=TRUE,
53 const Definition *searchCtx=nullptr,
54 bool collectXrefs=TRUE
55 ) override;
56 void resetCodeParserState() override;
57 private:
58 struct Private;
59 std::unique_ptr<Private> p;
60};
61
62
63#endif
Abstract interface for code parsers.
Definition parserintf.h:83
The common base class of all entity definitions found in the sources.
Definition definition.h:76
A model of a file symbol.
Definition filedef.h:99
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
Class representing a list of different code generators.
Definition outputlist.h:164
void resetCodeParserState() override
Resets the state of the code parser.
Definition pycode.l:1514
~PythonCodeParser() override
Definition pycode.l:1509
void parseCode(OutputCodeList &codeOutIntf, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool stripCodeComments, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXrefs=TRUE) override
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
Definition pycode.l:1526
std::unique_ptr< Private > p
Definition pycode.h:59
This is an alternative implementation of QCString.
Definition qcstring.h:101
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
SrcLangExt
Language as given by extension.
Definition types.h:42