/*! Add a list item to the contents file. * \param isDir TRUE if the item is a directory, FALSE if it is a text * \param ref the URL of to the item. * \param file the file containing the definition of the item * \param anchor the anchor within the file. * \param name the name of the item. * \param separateIndex put the entries in a separate index file * \param addToNavIndex add this entry to the quick navigation index * \param def Definition corresponding to this entry */ void FTVHelp::addContentsItem(bool isDir, const char *name, const char *ref, const char *file, const char *anchor, bool separateIndex, bool addToNavIndex, Definition *def ) { //printf("%p: m_indent=%d addContentsItem(%s,%s,%s,%s)\n",this,m_indent,name,ref,file,anchor); QList<FTVNode> *nl = &m_indentNodes[m_indent]; FTVNode *newNode = new FTVNode(isDir,ref,file,anchor,name,separateIndex,addToNavIndex,def); if (!nl->isEmpty()) { nl->getLast()->isLast=FALSE; } nl->append(newNode); newNode->index = nl->count()-1; if (m_indent>0) { QList<FTVNode> *pnl = &m_indentNodes[m_indent-1]; newNode->parent = pnl->getLast(); } }
void VhdlParser::addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf) { VhdlConfNode* co=0; QCString ent,arch,lab; QCString l=genLabels; ent=a; // lab = VhdlDocGen::parseForConfig(ent,arch); if (b) { ent=b; // lab=VhdlDocGen::parseForBinding(ent,arch); } int level=0; if (!configL.isEmpty()) { VhdlConfNode* vc=configL.getLast(); level=vc->level; if (levelCounter==0) { pushLabel(forL,ent); } else if (level<levelCounter) { if (!isLeaf) { pushLabel(forL,ent); } } else if (level>levelCounter) { forL=popLabel(forL); } } else { pushLabel(forL,ent); } if (inlineConf) { confName=lastCompound->name; } //fprintf(stderr,"\n[%s %d %d]\n",forL.data(),levelCounter,level); co=new VhdlConfNode(a,b,confName.lower().data(),forL.lower().data(),isLeaf); if (inlineConf) { co->isInlineConf=TRUE; } configL.append(co); }// addConfigure
/*! Add a list item to the contents file. * \param isDir TRUE if the item is a directory, FALSE if it is a text * \param ref the URL of to the item. * \param file the file containing the definition of the item * \param anchor the anchor within the file. * \param name the name of the item. */ void FTVHelp::addContentsItem(bool isDir, const char *name, const char *ref, const char *file, const char *anchor ) { QList<FTVNode> *nl = &m_indentNodes[m_indent]; FTVNode *newNode = new FTVNode(isDir,ref,file,anchor,name); if (!nl->isEmpty()) { nl->getLast()->isLast=FALSE; } nl->append(newNode); if (m_indent>0) { QList<FTVNode> *pnl = &m_indentNodes[m_indent-1]; newNode->parent = pnl->getLast(); } }
/*! Decrease the level of the contents hierarchy. * This will end the current sublist. * \sa incContentsDepth() */ void FTVHelp::decContentsDepth() { ASSERT(m_indent>0); if (m_indent>0) { m_indent--; QList<FTVNode> *nl = &m_indentNodes[m_indent]; FTVNode *parent = nl->getLast(); QList<FTVNode> *children = &m_indentNodes[m_indent+1]; while (!children->isEmpty()) { parent->children.append(children->take(0)); } } }