ArgumentList *unmarshalArgumentList(StorageIntf *s) { uint i; uint count = unmarshalUInt(s); if (count==NULL_LIST) return 0; // null list ArgumentList *result = new ArgumentList; assert(count<1000000); //printf("unmarshalArgumentList: %d\n",count); for (i=0;i<count;i++) { Argument *a = new Argument; a->attrib = unmarshalQCString(s); a->type = unmarshalQCString(s); a->canType = unmarshalQCString(s); a->name = unmarshalQCString(s); a->array = unmarshalQCString(s); a->defval = unmarshalQCString(s); a->docs = unmarshalQCString(s); result->append(a); } result->constSpecifier = unmarshalBool(s); result->volatileSpecifier = unmarshalBool(s); result->pureSpecifier = unmarshalBool(s); return result; }
ArgumentList *ArgumentList::deepCopy() const { ArgumentList *argList = new ArgumentList; argList->setAutoDelete(TRUE); QListIterator<Argument> ali(*this); Argument *a; for (;(a=ali.current());++ali) { argList->append(new Argument(*a)); } argList->constSpecifier = constSpecifier; argList->volatileSpecifier = volatileSpecifier; argList->pureSpecifier = pureSpecifier; argList->trailingReturnType = trailingReturnType; argList->isDeleted = isDeleted; return argList; }
/*! Injects the info gathered by the XML parser into the Entry tree. * This tree contains the information extracted from the input in a * "unrelated" form. */ void TagFileParser::buildLists(Entry *root) { // build class list TagClassInfo *tci = m_tagFileClasses.first(); while (tci) { Entry *ce = new Entry; ce->section = Entry::CLASS_SEC; switch (tci->kind) { case TagClassInfo::Class: break; case TagClassInfo::Struct: ce->spec = Entry::Struct; break; case TagClassInfo::Union: ce->spec = Entry::Union; break; case TagClassInfo::Interface: ce->spec = Entry::Interface; break; case TagClassInfo::Exception: ce->spec = Entry::Exception; break; case TagClassInfo::Protocol: ce->spec = Entry::Protocol; break; case TagClassInfo::Category: ce->spec = Entry::Category; break; } ce->name = tci->name; if (tci->kind==TagClassInfo::Protocol) { ce->name+="-p"; } addDocAnchors(ce,tci->docAnchors); TagInfo *ti = new TagInfo; ti->tagName = m_tagName; ti->fileName = tci->filename; ce->tagInfo = ti; ce->lang = tci->isObjC ? SrcLangExt_ObjC : SrcLangExt_Unknown; // transfer base class list if (tci->bases) { delete ce->extends; ce->extends = tci->bases; tci->bases = 0; } if (tci->templateArguments) { if (ce->tArgLists==0) { ce->tArgLists = new QList<ArgumentList>; ce->tArgLists->setAutoDelete(TRUE); } ArgumentList *al = new ArgumentList; ce->tArgLists->append(al); QListIterator<QCString> sli(*tci->templateArguments); QCString *argName; for (;(argName=sli.current());++sli) { Argument *a = new Argument; a->type = "class"; a->name = *argName; al->append(a); } } buildMemberList(ce,tci->members); root->addSubEntry(ce); tci = m_tagFileClasses.next(); } // build file list TagFileInfo *tfi = m_tagFileFiles.first(); while (tfi) { Entry *fe = new Entry; fe->section = guessSection(tfi->name); fe->name = tfi->name; addDocAnchors(fe,tfi->docAnchors); TagInfo *ti = new TagInfo; ti->tagName = m_tagName; ti->fileName = tfi->filename; fe->tagInfo = ti; QCString fullName = m_tagName+":"+tfi->path+stripPath(tfi->name); fe->fileName = fullName; //printf("new FileDef() filename=%s\n",tfi->filename.data()); FileDef *fd = new FileDef(m_tagName+":"+tfi->path, tfi->name,m_tagName, tfi->filename ); FileName *mn; if ((mn=Doxygen::inputNameDict->find(tfi->name))) { mn->append(fd); } else { mn = new FileName(fullName,tfi->name); mn->append(fd); Doxygen::inputNameList->inSort(mn); Doxygen::inputNameDict->insert(tfi->name,mn); } buildMemberList(fe,tfi->members); root->addSubEntry(fe); tfi = m_tagFileFiles.next(); } // build namespace list TagNamespaceInfo *tni = m_tagFileNamespaces.first(); while (tni) { Entry *ne = new Entry; ne->section = Entry::NAMESPACE_SEC; ne->name = tni->name; addDocAnchors(ne,tni->docAnchors); TagInfo *ti = new TagInfo; ti->tagName = m_tagName; ti->fileName = tni->filename; ne->tagInfo = ti; buildMemberList(ne,tni->members); root->addSubEntry(ne); tni = m_tagFileNamespaces.next(); } // build package list TagPackageInfo *tpgi = m_tagFilePackages.first(); while (tpgi) { Entry *pe = new Entry; pe->section = Entry::PACKAGE_SEC; pe->name = tpgi->name; addDocAnchors(pe,tpgi->docAnchors); TagInfo *ti = new TagInfo; ti->tagName = m_tagName; ti->fileName = tpgi->filename; pe->tagInfo = ti; buildMemberList(pe,tpgi->members); root->addSubEntry(pe); tpgi = m_tagFilePackages.next(); } // build group list, but only if config file says to include it //if (Config_getBool("EXTERNAL_GROUPS")) //{ TagGroupInfo *tgi = m_tagFileGroups.first(); while (tgi) { Entry *ge = new Entry; ge->section = Entry::GROUPDOC_SEC; ge->name = tgi->name; ge->type = tgi->title; addDocAnchors(ge,tgi->docAnchors); TagInfo *ti = new TagInfo; ti->tagName = m_tagName; ti->fileName = tgi->filename; ge->tagInfo = ti; buildMemberList(ge,tgi->members); root->addSubEntry(ge); tgi = m_tagFileGroups.next(); } //} // build page list TagPageInfo *tpi = m_tagFilePages.first(); while (tpi) { Entry *pe = new Entry; pe->section = Entry::PAGEDOC_SEC; pe->name = tpi->name; pe->args = tpi->title; addDocAnchors(pe,tpi->docAnchors); TagInfo *ti = new TagInfo; ti->tagName = m_tagName; ti->fileName = tpi->filename; pe->tagInfo = ti; root->addSubEntry(pe); tpi = m_tagFilePages.next(); } }