Export Repository Description Write out XML fragment describing the data object repository to the supplied chain. The anticipated use of this function is as part of an ADP export, so the supplied chain is not cleared. Returns: None
| Return Type | Function name | Arguments |
|---|---|---|
| void | hdbObjRepos::DescRepos | (hzChain&,uint32_t,) |
Declared in file: hzDatabase.h
Defined in file : hdbObjRepos.cpp
Function Logic:
Function body:
void hdbObjRepos::DescRepos (hzChain& Z)uint32_t nIndent,
{
// Export Repository Description
//
// Write out XML fragment describing the data object repository to the supplied chain. The anticipated use of this function is as part of an ADP export, so the supplied chain
// is not cleared.
//
// Arguments: 1) Z The chain to aggregate the class description to
// 2) nIndent The number of leading tabs to apply to each line
//
// Returns: None
_hzfunc("hdbObjRepos::DescRepos") ;
const hdbMember* pMbr ; // Data class member
hdbIndex* pIndex ; // Index
uint32_t nI ; // Indent
uint32_t nE ; // Entity count
uint16_t mbrNo ; // Member number
if (!m_pClass) hzerr(E_NOINIT, "No class") ;
if (!m_Name) hzerr(E_NOINIT, "No repos name") ;
if (!m_Workdir) hzerr(E_NOINIT, "No working directory") ;
for (nI = nIndent ; nI > 0; nI--)
Z.AddByte(CHAR_TAB) ;
Z.Printf("<repos id=\"%u\" name=\"%s\" workdir=\"%s\" class=\"%s\">\n", m_DeltaId, *m_Name, *m_Workdir, m_pClass->txtName()) ;
for (nE = 0; nE < m_mapIndex.Count() ; nE++)
{
mbrNo = m_mapIndex.GetKey(nE) ;
pIndex = m_mapIndex.GetObj(nE) ;
pMbr = m_pClass->GetMember(mbrNo) ;
if (!pMbr)
hzerr(E_CORRUPT, "No member %u\n", mbrNo) ;
if (!pIndex)
hzerr(E_CORRUPT, "No index for member %u\n", mbrNo) ;
for (nI = nIndent ; nI > 0; nI--)
Z.AddByte(CHAR_TAB) ;
Z.Printf("\t<index mbr=\"%s\" name=\"%s\"/>\n", pMbr->txtName(), pIndex->txtName()) ;
}
if (m_pBR_Delta)
{
for (nI = nIndent ; nI > 0; nI--)
Z.AddByte(CHAR_TAB) ;
Z.Printf("\t<binReposDelta name=\"%s\"/>\n", m_pBR_Delta->txtName()) ;
}
if (m_pBR_Datum)
{
for (nI = nIndent ; nI > 0; nI--)
Z.AddByte(CHAR_TAB) ;
Z.Printf("\t<binReposDatum name=\"%s\"/>\n", m_pBR_Datum->txtName()) ;
}
for (nI = nIndent ; nI > 0; nI--)
Z.AddByte(CHAR_TAB) ;
Z << "</repos>\n" ;
}