79 { enumValues.setAutoDelete(
TRUE); }
98 enum Kind { Class, Struct,
Union, Interface,
Exception, Protocol, Category, Enum, Service, Singleton };
249 m_endElementHandlers(17),
252 m_startElementHandlers.setAutoDelete(
TRUE);
253 m_endElementHandlers.setAutoDelete(
TRUE);
275 m_inputFileName = fileName.
utf8();
280 ::warn(m_inputFileName,m_locator->lineNumber(),fmt);
282 void warn(
const char *fmt,
const char *
s)
284 ::warn(m_inputFileName,m_locator->lineNumber(),fmt,
s);
298 else if (kind==
"struct")
304 else if (kind==
"union")
310 else if (kind==
"interface")
316 else if (kind==
"enum")
322 else if (kind==
"exception")
328 else if (kind==
"protocol")
334 else if (kind==
"category")
340 else if (kind==
"service")
346 else if (kind==
"singleton")
352 else if (kind==
"file")
357 else if (kind==
"namespace")
360 m_state = InNamespace;
362 else if (kind==
"group")
367 else if (kind==
"page")
372 else if (kind==
"package")
377 else if (kind==
"dir")
384 warn(
"Unknown compound attribute `%s' found!\n",kind.
data());
387 if (isObjC==
"yes" && m_curClass)
389 m_curClass->isObjC =
TRUE;
397 case InClass: m_tagFileClasses.append(m_curClass);
399 case InFile: m_tagFileFiles.append(m_curFile);
401 case InNamespace: m_tagFileNamespaces.append(m_curNamespace);
402 m_curNamespace=0;
break;
403 case InGroup: m_tagFileGroups.append(m_curGroup);
405 case InPage: m_tagFilePages.append(m_curPage);
407 case InDir: m_tagFileDirs.append(m_curDir);
409 case InPackage: m_tagFilePackages.append(m_curPackage);
410 m_curPackage=0;
break;
412 warn(
"tag `compound' was not expected!\n");
423 if (protStr==
"protected")
427 else if (protStr==
"private")
431 if (virtStr==
"virtual")
435 else if (virtStr==
"pure")
437 m_curMember->virt =
Pure;
439 if (staticStr==
"yes")
441 m_curMember->isStatic =
TRUE;
443 m_stateStack.push(
new State(m_state));
449 m_state = *m_stateStack.top();
450 m_stateStack.remove();
453 case InClass: m_curClass->members.append(m_curMember);
break;
454 case InFile: m_curFile->members.append(m_curMember);
break;
455 case InNamespace: m_curNamespace->members.append(m_curMember);
break;
456 case InGroup: m_curGroup->members.append(m_curMember);
break;
457 case InPackage: m_curPackage->members.append(m_curMember);
break;
458 default:
warn(
"Unexpected tag `member' found\n");
break;
464 if (m_state==InMember)
469 m_curEnumValue->anchor = attrib.
value(
"anchor").
utf8();
470 m_curEnumValue->clangid = attrib.
value(
"clangid").
utf8();
471 m_stateStack.push(
new State(m_state));
472 m_state = InEnumValue;
476 warn(
"Found enumvalue tag outside of member tag\n");
482 m_curEnumValue->name = m_curString.stripWhiteSpace();
483 m_state = *m_stateStack.top();
484 m_stateStack.remove();
485 if (m_state==InMember)
487 m_curMember->enumValues.append(m_curEnumValue);
496 case InClass: m_curClass->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString));
break;
497 case InFile: m_curFile->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString));
break;
498 case InNamespace: m_curNamespace->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString));
break;
499 case InGroup: m_curGroup->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString));
break;
500 case InPage: m_curPage->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString,m_title));
break;
501 case InMember: m_curMember->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString));
break;
502 case InPackage: m_curPackage->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString));
break;
503 case InDir: m_curDir->docAnchors.append(
new TagAnchorInfo(m_fileName,m_curString));
break;
504 default:
warn(
"Unexpected tag `member' found\n");
break;
512 case InClass: m_curClass->classList.append(m_curString);
break;
513 case InFile: m_curFile->classList.append(m_curString);
break;
514 case InNamespace: m_curNamespace->classList.append(m_curString);
break;
515 case InGroup: m_curGroup->classList.append(m_curString);
break;
516 case InPackage: m_curPackage->classList.append(m_curString);
break;
517 default:
warn(
"Unexpected tag `class' found\n");
break;
525 case InNamespace: m_curNamespace->classList.append(m_curString);
break;
526 case InFile: m_curFile->namespaceList.append(m_curString);
break;
527 case InGroup: m_curGroup->namespaceList.append(m_curString);
break;
528 default:
warn(
"Unexpected tag `namespace' found\n");
break;
536 case InGroup: m_curGroup->fileList.append(m_curString);
break;
537 case InDir: m_curDir->fileList.append(m_curString);
break;
538 default:
warn(
"Unexpected tag `file' found\n");
break;
546 case InGroup: m_curGroup->fileList.append(m_curString);
break;
547 default:
warn(
"Unexpected tag `page' found\n");
break;
555 case InDir: m_curDir->subdirList.append(m_curString);
break;
556 default:
warn(
"Unexpected tag `page' found\n");
break;
567 m_fileName = attrib.
value(
"file").
utf8();
574 if (m_state==InMember)
576 m_curMember->type = m_curString;
580 warn(
"Unexpected tag `type' found\n");
588 case InClass: m_curClass->name = m_curString;
break;
589 case InFile: m_curFile->name = m_curString;
break;
590 case InNamespace: m_curNamespace->name = m_curString;
break;
591 case InGroup: m_curGroup->name = m_curString;
break;
592 case InPage: m_curPage->name = m_curString;
break;
593 case InDir: m_curDir->name = m_curString;
break;
594 case InMember: m_curMember->name = m_curString;
break;
595 case InPackage: m_curPackage->name = m_curString;
break;
596 default:
warn(
"Unexpected tag `name' found\n");
break;
603 if (m_state==InClass && m_curClass)
609 if (protStr==
"protected")
613 else if (protStr==
"private")
617 if (virtStr==
"virtual")
621 if (m_curClass->bases==0)
626 m_curClass->bases->append(
new BaseInfo(m_curString,prot,virt));
630 warn(
"Unexpected tag `base' found\n");
636 if (m_state==InClass && m_curClass)
638 m_curClass->bases->getLast()->name = m_curString;
642 warn(
"Unexpected tag `base' found\n");
648 if (m_state==InFile && m_curFile)
652 m_curIncludes->name = attrib.
value(
"name").
utf8();
655 m_curFile->includes.append(m_curIncludes);
659 warn(
"Unexpected tag `includes' found\n");
666 m_curIncludes->text = m_curString;
671 if (m_state==InClass && m_curClass)
673 if (m_curClass->templateArguments==0)
678 m_curClass->templateArguments->append(
new QCString(m_curString));
682 warn(
"Unexpected tag `templarg' found\n");
690 case InClass: m_curClass->filename = m_curString;
break;
691 case InNamespace: m_curNamespace->filename = m_curString;
break;
692 case InFile: m_curFile->filename = m_curString;
break;
693 case InGroup: m_curGroup->filename = m_curString;
break;
694 case InPage: m_curPage->filename = m_curString;
break;
695 case InPackage: m_curPackage->filename = m_curString;
break;
696 case InDir: m_curDir->filename = m_curString;
break;
697 default:
warn(
"Unexpected tag `filename' found\n");
break;
705 case InFile: m_curFile->path = m_curString;
break;
706 case InDir: m_curDir->path = m_curString;
break;
707 default:
warn(
"Unexpected tag `path' found\n");
break;
713 if (m_state==InMember)
715 m_curMember->anchor = m_curString;
719 warn(
"Unexpected tag `anchor' found\n");
725 if (m_state==InMember)
727 m_curMember->clangId = m_curString;
729 else if (m_state==InClass)
731 m_curClass->clangId = m_curString;
733 else if (m_state==InNamespace)
735 m_curNamespace->clangId = m_curString;
739 warn(
"warning: Unexpected tag `anchor' found\n");
747 if (m_state==InMember)
749 m_curMember->anchorFile = m_curString;
753 warn(
"Unexpected tag `anchorfile' found\n");
759 if (m_state==InMember)
761 m_curMember->arglist = m_curString;
765 warn(
"Unexpected tag `arglist' found\n");
772 case InGroup: m_curGroup->title = m_curString;
break;
773 case InPage: m_curPage->title = m_curString;
break;
774 default:
warn(
"Unexpected tag `title' found\n");
break;
780 if (m_state==InGroup)
782 m_curGroup->subgroupList.append(m_curString);
786 warn(
"Unexpected tag `subgroup' found\n");
810 m_stateStack.setAutoDelete(
TRUE);
811 m_tagFileClasses.setAutoDelete(
TRUE);
812 m_tagFileFiles.setAutoDelete(
TRUE);
813 m_tagFileNamespaces.setAutoDelete(
TRUE);
814 m_tagFileGroups.setAutoDelete(
TRUE);
815 m_tagFilePages.setAutoDelete(
TRUE);
816 m_tagFilePackages.setAutoDelete(
TRUE);
817 m_tagFileDirs.setAutoDelete(
TRUE);
881 warn(
"Unknown tag `%s' found!\n",name.
data());
896 warn(
"Unknown tag `%s' found!\n",name.
data());
903 m_curString+=ch.
utf8();
908 void buildLists(
Entry *root);
961 err(
"Fatal error at line %d column %d: %s\n",
980 for (;(cd=lci.
current());++lci)
996 for (;(md=mci.current());++mci)
1008 for (;(nd=lni.current());++lni)
1016 msg(
" class: %s \n", (*it).latin1() );
1021 for (;(md=mci.current());++mci)
1033 for (;(fd=lfi.current());++lfi)
1041 msg(
" namespace: %s \n", (*it).latin1() );
1046 msg(
" class: %s \n", (*it).latin1() );
1051 for (;(md=mci.current());++mci)
1062 for (;(ii=mii.current());++mii)
1071 for (;(gd=lgi.current());++lgi)
1079 msg(
" namespace: %s \n", (*it).latin1() );
1084 msg(
" class: %s \n", (*it).latin1() );
1089 msg(
" file: %s \n", (*it).latin1() );
1094 msg(
" subgroup: %s \n", (*it).latin1() );
1099 msg(
" page: %s \n", (*it).latin1() );
1104 for (;(md=mci.current());++mci)
1116 for (;(pd=lpi.current());++lpi)
1125 for (;(dd=ldi.current());++ldi)
1133 msg(
" file: %s \n", (*it).latin1() );
1138 msg(
" subdir: %s \n", (*it).latin1() );
1169 for (;(tmi=mii.
current());++mii)
1216 if (tmi->
kind==
"define")
1221 else if (tmi->
kind==
"enumvalue")
1226 else if (tmi->
kind==
"property")
1231 else if (tmi->
kind==
"event")
1236 else if (tmi->
kind==
"variable")
1241 else if (tmi->
kind==
"typedef")
1247 else if (tmi->
kind==
"enumeration")
1252 else if (tmi->
kind==
"function")
1257 else if (tmi->
kind==
"signal")
1262 else if (tmi->
kind==
"prototype")
1267 else if (tmi->
kind==
"friend")
1273 else if (tmi->
kind==
"dcop")
1278 else if (tmi->
kind==
"slot")
1356 for (;(argName=sli.
current());++sli)
1365 buildMemberList(ce,tci->
members);
1387 tfi->
name,m_tagName,
1402 buildMemberList(fe,tfi->
members);
1421 buildMemberList(ne,tni->
members);
1439 buildMemberList(pe,tpgi->
members);
1458 buildMemberList(ge,tgi->
members);
1493 for (;(fd=fni.
current());++fni)
1501 for (;(ii=mii.
current());++mii)
1510 for (;(ifd=ifni.
current());++ifni)
1530 if (!fi.
exists())
return;
1534 QFile xmlFile( fullName );
1539 reader.
parse( source );
TagInfo * tagInfo
tag file info
QDict< EndElementHandler > m_endElementHandlers
void warn(const char *fmt, const char *s)
TagEnumValueInfo * m_curEnumValue
TagMemberInfo * m_curMember
void operator()(const QXmlAttributes &attrib)
bool startElement(const QString &, const QString &, const QString &name, const QXmlAttributes &attrib)
The QXmlLocator class provides the XML handler classes with information about the actual parsing posi...
This class represents an function or template argument list.
EndElementHandler(TagFileParser *parent, Handler h)
uint64 spec
class/member specifiers
TagAnchorInfoList docAnchors
TagFileParser(const char *tagName)
void startDocAnchor(const QXmlAttributes &attrib)
void msg(const char *fmt,...)
bool warning(const QXmlParseException &)
bool error(const QXmlParseException &)
void append(const type *d)
int guessSection(const char *name)
QList< TagMemberInfo > members
static const uint64 Exception
QStringList namespaceList
void startBase(const QXmlAttributes &attrib)
bool parse(const QXmlInputSource &input)
QStringList namespaceList
TagAnchorInfo(const QCString &f, const QCString &l, const QCString &t=QCString())
TagIncludeInfo * m_curIncludes
static FileNameList * inputNameList
ArgumentList * argList
member arguments as a list
void startIgnoreElement(const QXmlAttributes &)
void addSubEntry(Entry *e)
void setFileName(const QString &fileName)
static QCString stripPath(const QCString &s)
static FileNameDict * inputNameDict
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
QList< TagEnumValueInfo > enumValues
void setErrorHandler(QXmlErrorHandler *handler)
The QXmlErrorHandler class provides an interface to report errors in XML data.
QList< TagPackageInfo > m_tagFilePackages
QList< TagClassInfo > m_tagFileClasses
QList< TagFileInfo > m_tagFileFiles
QString value(int index) const
void append(const char *key, const T *d)
void startEnumValue(const QXmlAttributes &attrib)
TagAnchorInfoList docAnchors
int findRev(char c, int index=-1, bool cs=TRUE) const
QList< TagGroupInfo > m_tagFileGroups
TagAnchorInfoList docAnchors
QList< TagMemberInfo > members
QList< ArgumentList > * tArgLists
template argument declarations
void startIncludes(const QXmlAttributes &attrib)
virtual ~TagFileErrorHandler()
The QXmlSimpleReader class provides an implementation of a simple XML reader (i.e. parser).
void startStringValue(const QXmlAttributes &)
void warn(const char *fmt)
static const uint64 Strong
This class contains the information about the argument of a function or template. ...
StartElementHandler(TagFileParser *parent, Handler h)
const char * data() const
TagClassInfo * m_curClass
QList< BaseInfo > * bases
void setContentHandler(QXmlContentHandler *handler)
virtual ~TagAnchorInfoList()
QList< TagIncludeInfo > includes
QList< Grouping > * groups
list of groups this entry belongs to
void inSort(const type *d)
membership in group was defined by @ingroup
void startCompound(const QXmlAttributes &attrib)
bool endElement(const QString &, const QString &, const QString &name)
TagAnchorInfoList docAnchors
QCString right(uint len) const
QCString name
the name of the base class
static const uint64 Interface
static const uint64 Protocol
QList< SectionInfo > * anchors
list of anchors defined in this entry
def dump(input_file, output_file)
TagGroupInfo * m_curGroup
The QXmlDefaultHandler class provides a default implementation of all XML handler classes...
void stringToArgumentList(const char *argsString, ArgumentList *al, QCString *extraTypeChars)
QCString & prepend(const char *s)
QCString args
member argument string
static SectionDict * sectionDict
A bunch of utility functions.
const char * data() const
TagPackageInfo * m_curPackage
Protection protection
class protection
void parseTagFile(Entry *root, const char *fullName)
QList< TagDirInfo > m_tagFileDirs
void buildMemberList(Entry *ce, QList< TagMemberInfo > &members)
void warn(const char *file, int line, const char *fmt,...)
QList< TagPageInfo > m_tagFilePages
void err(const char *fmt,...)
TagAnchorInfoList docAnchors
void startMember(const QXmlAttributes &attrib)
QCString getOutputFileBase() const
The QFile class is an I/O device that operates on files.
bool fatalError(const QXmlParseException &exception)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Specifier virt
virtualness of the entry
QDict< StartElementHandler > m_startElementHandlers
TagAnchorInfoList docAnchors
void addDocAnchors(Entry *e, const TagAnchorInfoList &l)
TagAnchorInfoList docAnchors
void setDocumentLocator(QXmlLocator *locator)
QStack< State > m_stateStack
static const uint64 Category
QCString fileName
file this entry was extracted from
QList< TagMemberInfo > members
The QXmlAttributes class provides XML attributes.
static msg_handler handler
void addIncludeDependency(FileDef *fd, const char *incName, bool local, bool imported, bool indirect)
QList< TagNamespaceInfo > m_tagFileNamespaces
void buildLists(Entry *root)
MethodTypes mtype
signal, slot, (dcop) method, or property?
TagNamespaceInfo * m_curNamespace
static const uint64 Struct
QList< TagMemberInfo > members
The QFileInfo class provides system-independent file information.
static const uint64 Union
SrcLangExt lang
programming language in which this entry was found
TagAnchorInfoList docAnchors
static const uint64 Service
QList< QCString > * templateArguments
void setAutoDelete(bool enable)
def parent(G, child, parent_type)
QList< BaseInfo > * extends
list of base classes
cet::coded_exception< error, detail::translate > exception
QStringList namespaceList
The QXmlParseException class is used to report errors with the QXmlErrorHandler interface.
bool characters(const QString &ch)
static const uint64 Singleton
int section
entry type (see Sections);
QList< TagMemberInfo > members