Return Type | Function name | Arguments |
---|---|---|
void | hdsArtref::Generate | (hzChain&,hzHttpEvent*,unsigned int&,) |
Declared in file: hzDissemino.h
Defined in file : hdsGenerate.cpp
Function Logic:
Function body:
void hdsArtref::Generate (hzChain& C, hzHttpEvent* pE, unsigned int& nLine) { _hzfunc("hdsArtref::Generate") ; hzList<hdsVE*>::Iter ih ; hdsInfo* pInfo = 0; hdsNavtree* pAG = 0; hdsArticle* pArt = 0; hdsArticleStd* pArtStd = 0; hdsArticleCIF* pArtCIF = 0; hzString S ; if (!this) Fatal("No instance\n") ; if (pE) pInfo = (hdsInfo*) pE->Session() ; threadLog("info %p\n", pInfo) ; pAG = m_pApp->m_ArticleGroups[m_Group] ; if (!pAG) { if (pInfo && pInfo->m_pTree) if (pInfo->m_pTree->m_Groupname == m_Group) pAG = pInfo->m_pTree ; } if (!pAG) { C.Printf("SORRY: No such article group (%s)", *m_Group) ; return ; } if (m_Show == 300) { C << "\n<script language="javascript">\n" ; pAG->ExportDataScript(C) ; C.Printf("makeTree('%s');\n", *m_Group) ; C << "</script>\n" ; return ; } if (m_Article[0]== CHAR_AT) { if (!memcmp(*m_Article, "@resarg;/", 9)) { if (pE && pE->m_Resarg) pArt = (hdsArticle*) pAG->GetItem(pE->m_Resarg) ; else { S = *m_Article + 9; pArt = (hdsArticle*) pAG->GetItem(S) ; } } } else { pArt = (hdsArticle*) pAG->GetItem(m_Article) ; threadLog("fetched article %p %s\n", pArt, *m_Article) ; } if (!pArt) { C.Printf("SORRY: No article with group (%s) and name (%s)", *m_Group, *m_Article) ; } else { if (m_Show == 100) { C << pArt->m_Title ; } else if (m_Show == 200) { pArtStd = dynamic_cast<hdsArticleStd*>(pArt) ; if (pArtStd) { pArtStd->Display(C, pE) ; } else { pArtCIF = dynamic_cast<hdsArticleCIF*>(pArt) ; if (pArtCIF && pE) pArtCIF->m_pFunc(C, pArtCIF, pE) ; } } else { C.Printf("FOUND: article with group (%s) and name (%s) but no show directive", *m_Group, *pArt->m_Title) ; } } }