Load a webapp config file into an XML document, then call ReadWebapp() with the root node, which is expected to be a <webappCfg> tag. Arguments: None

Return TypeFunction nameArguments
hzEcodehdsApp::ReadWebappCfg(hzString&,)

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

Function Logic:

0:START 1:unknown 2:items 3:unknown 4:Return hzerr(E_NOINIT,No project file) 5:items rc 6:unknown 7:items 8:Return hzerr(rc,Could not load project file [%s],*cfgPath) 9:items pRoot 10:unknown 11:items 12:Return E_OPENFAIL 13:items rc 14:Return rc

Function body:

hzEcode hdsApp::ReadWebappCfg (hzString& cfgPath)
{
   //  Category: Dissemino Application Configuration
   //  
   //  Load a webapp config file into an XML document, then call ReadWebapp() with the root node, which is expected to be a <webappCfg> tag.
   //  
   //  Arguments: None
   //  
   //  Returns: E_ARGUMENT If no project file is supplied
   //     E_OPENFAIL If the project file could not be loaded
   //     E_CONFIG If there are errors in the XML config
   //     E_OK  If the project config was read in
   _hzfunc("hdsApp::ReadWebappCfg") ;
   hzDocXml        X ;             //  The config document
   hzXmlNode*      pRoot ;         //  Config document root
   hzString        S ;             //  Intermeadiate string
   hzEcode         rc = E_OK ;     //  Return code
   if (!this)
       hzexit(E_CORRUPT, "No Instance") ;
   if (!m_BaseDir || !m_RootFile)
       return hzerr(E_NOINIT, "No project file") ;
   //  S = m_BaseDir ;
   //  S += "/config/" ;
   //  S += m_RootFile ;
   m_pLog->Log("Processing Webapp Cfg File [%s]\n", *S) ;
   rc = X.Load(*cfgPath) ;
   if (rc != E_OK)
   {
       m_pLog->Log(X.Error()) ;
       return hzerr(rc, "Could not load project file [%s]", *cfgPath) ;
   }
   m_pLog->Log("Loaded project file [%s]\n", *cfgPath) ;
   pRoot = X.GetRoot() ;
   if (!pRoot)
   {
       hzerr(E_OPENFAIL, "Could not obtain project file root [%s]", *S) ;
       return E_OPENFAIL ;
   }
   m_pLog->Log("Obtained project's XML root <%s>\n", pRoot->txtName()) ;
   rc = ReadWebapp(pRoot) ;
   return rc ;
}