Display the inactive HTML tag as part of page Returns: None

Return TypeFunction nameArguments
voidhdsHtag::Generate(hzChain&,hzHttpEvent*,uint32_t&,)

Declared in file: hzDissemino.h
Defined in file : hdsGenerate.cpp

Function Logic:

0:START 1:unknown 2:items 3:unknown 4:items 5:nLine 6:items items 7:unknown 8:aLo 9:unknown 10:aHi 11:unknown 12:pa items items items items 13:unknown 14:items 15:items 16:items 17:items 18:unknown 19:unknown 20:S 21:unknown 22:items 23:items 24:items 25:unknown 26:S 27:unknown 28:items 29:items 30:S tagForm 31:unknown 32:unknown 33:items 34:unknown 35:items 36:nLine 37:items items items items 38: No text

Function body:

void hdsHtag::Generate (hzChain& C)hzHttpEvent* pE, uint32_t& nLine, 
{
   //  Display the inactive HTML tag as part of page
   //  
   //  Arguments: 1) C  The HTML output chain
   //     2) pE  The HTTP event being responded to
   //     3) nLine Line number tracker (controls NL printing)
   //  
   //  Returns: None
   _hzfunc("hdsHtag::Generate") ;
   hdsVE*      pVE ;       //  For processing subtags
                           //  hzFixPair pa ;  // Tag attribute
   hzPair      pa ;        //  Tag attribute
   hzString    S ;         //  Temp string
   uint32_t    n ;         //  Tab counter
   int32_t     aLo ;       //  First attribute
   int32_t     aHi ;       //  Last attribute
   int32_t     nA ;        //  Attribute iterator
   hzHtagform  tagForm ;   //  HTML tag type
   //  Write out newline and tabs if the current tag's line is greater than the supplied line
   if (m_Line != nLine)
   {
       C.AddByte(CHAR_NL) ;
       for (n = m_Indent ; n ; n--)
           C.AddByte(CHAR_TAB) ;
       nLine = m_Line ;
   }
   //  Write out the opening tag
   C.AddByte(CHAR_LESS) ;
   C << m_Tag ;
   if (m_nAttrs)
   {
       aLo = m_pApp->m_VE_attrs.First(m_VID) ;
       if (aLo >&eq; 0)
       {
           aHi = m_pApp->m_VE_attrs.Last(m_VID) ;
           for (nA = aLo ; nA <&eq; aHi ; nA++)
           {
               pa = m_pApp->m_VE_attrs.GetObj(nA) ;
               C.AddByte(CHAR_SPACE) ;
               C << *pa.name ;
               C.AddByte(CHAR_EQUAL) ;
               C.AddByte(CHAR_DQUOTE) ;
               if (pE && (m_flagVE & VE_AT_ACTIVE))
                   C << m_pApp->ConvertText(*pa.value, pE) ;
               else
                   C << *pa.value ;
               C.AddByte(CHAR_DQUOTE) ;
           }
       }
   }
   C.AddByte(CHAR_MORE) ;
   //  Now for each subtag, output first the pretext (part of this tag's content) and then call Display on the subtag
   for (pVE = Children() ; pVE ; pVE = pVE->Sibling())
   {
       if (pVE->m_strPretext)
       {
           S = pVE->m_strPretext ;
           if (pE && (pVE->m_flagVE & VE_PT_ACTIVE))
               C << m_pApp->ConvertText(S, pE) ;
           else
               C << S ;
       }
       pVE->Generate(C, pE, nLine) ;
   }
   //  Now write out the content
   if (m_strContent)
   {
       //  if (pLang && m_usiContent)
       //   S = pLang->m_LangStrings[m_usiContent] ;
       //  else
           S = m_strContent ;
       if (pE && m_flagVE & VE_CT_ACTIVE)
           C << m_pApp->ConvertText(S, pE) ;
       else
           C << S ;
   }
   //  Now write the antitag
   S = *m_Tag ;
   tagForm = TagLookup(S) ;
   if (tagForm.rule != HTRULE_SINGLE)
   {
       if (nLine != m_Line)
       {
           C.AddByte(CHAR_NL) ;
           for (n = m_Indent ; n ; n--)
               C.AddByte(CHAR_TAB) ;
           nLine = m_Line ;
       }
       C.AddByte(CHAR_LESS) ;
       C.AddByte(CHAR_FWSLASH) ;
       C << m_Tag ;
       C.AddByte(CHAR_MORE) ;
   }
}