Initialize a HTML element (tag) to the parent element (if any), the tag type. Set also the id and line number (within the HTML in question)

Return TypeFunction nameArguments
hzEcodehzHtmElem::Init(hzDocHtml*,hzHtmElem*,hzString&,hzHtagtype,uint32_t,uint32_t,)

Declared in file: hzDocument.h
Defined in file : hzDocHtml.cpp

Function Logic:

0:START 1:unknown 2:items 3:Return E_ARGUMENT 4:unknown 5:m_Parent m_nLevel 6:m_Parent pParent m_nLevel items 7:m_Name m_Type m_Uid m_nLine m_Children m_Sibling 8:Return E_OK

Function body:

hzEcode hzHtmElem::Init (hzDocHtml* pRoot)hzHtmElem* pParent, hzString& tagname, hzHtagtype type, uint32_t id, uint32_t line, 
{
   //  Initialize a HTML element (tag) to the parent element (if any), the tag type. Set also the id and line number (within the HTML
   //  in question)
   //  
   //  Arguments: 1) pRoot Pointer to the HTML document root
   //     2) pParent Pointer to the parent element of this
   //     3) tagname The name of this tag
   //     4) htag HTML Tag type
   //     5) id  Numeric identifier
   //     6) line Line number of tag in the source HTML file
   //  
   //  Returns: E_ARGUMENT If no root is supplied
   //     E_OK  If the HTML element was initialized
   _hzfunc("hzHtmElem::Init") ;
   if (!pRoot)
   {
       hzerr(E_ARGUMENT, "No root supplied") ;
       return E_ARGUMENT ;
   }
   if (!pParent)
   {
       m_Parent = 0;
       m_nLevel = 0;
   }
   else
   {
       m_Parent = pParent->GetUid() ;
       m_nLevel = pParent->m_nLevel + 1;
       pParent->_addnode(this) ;
   }
   m_Name = tagname ;
   m_Type = type ;
   m_Uid = id ;
   m_nLine = line ;
   m_Children = 0;
   m_Sibling = 0;
   return E_OK ;
}