71 bool sameTranslationUnit,
72 QStrList &filesInSameTranslationUnit) = 0;
104 const char *scopeName,
108 const char *exampleName=0,
112 bool inlineFragment=
FALSE,
114 bool showLineNumbers=
TRUE,
149 : m_defaultParser(0) { m_parsers.setAutoDelete(
TRUE); }
152 delete m_defaultParser;
168 m_parsers.insert(name,parser);
176 if (parserName==0 || extension==0)
return FALSE;
178 if (intf==0)
return FALSE;
179 if (m_extensions.find(extension)!=0)
181 m_extensions.remove(extension);
183 m_extensions.insert(extension,intf);
194 if (ext.
isEmpty()) ext=
".no_extension";
196 if (intf==0 && ext.
length()>4)
198 intf = m_extensions.find(ext.
left(4));
200 return intf ? intf : m_defaultParser;
ParserInterface * getParser(const char *extension)
virtual void startTranslationUnit(const char *fileName)=0
This file contains a number of basic enums and types.
QDict< ParserInterface > m_parsers
Abstract interface for programming language parsers.
void registerDefaultParser(ParserInterface *parser)
QCString left(uint len) const
void registerParser(const char *name, ParserInterface *parser)
virtual void finishTranslationUnit()=0
virtual void parsePrototype(const char *text)=0
virtual bool needsPreprocessing(const QCString &extension)=0
virtual ~ParserInterface()
Manages programming language parsers.
ParserInterface * m_defaultParser
bool registerExtension(const char *extension, const char *parserName)
QDict< ParserInterface > m_extensions
virtual void parseInput(const char *fileName, const char *fileBuf, Entry *root, bool sameTranslationUnit, QStrList &filesInSameTranslationUnit)=0
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
virtual void resetCodeParserState()=0