bool NFCClassModule::Load(rapidxml::xml_node<>* attrNode, NF_SHARE_PTR<NFIClass> pParentClass) { const char* pstrLogicClassName = attrNode->first_attribute("Id")->value(); const char* pstrType = attrNode->first_attribute("Type")->value(); const char* pstrPath = attrNode->first_attribute("Path")->value(); const char* pstrInstancePath = attrNode->first_attribute("InstancePath")->value(); //printf( "-----------------------------------------------------\n"); //printf( "%s:\n", pstrLogicClassName ); NF_SHARE_PTR<NFIClass> pClass(NF_NEW NFCClass(pstrLogicClassName)); AddElement(pstrLogicClassName, pClass); pClass->SetParent(pParentClass); pClass->SetTypeName(pstrType); pClass->SetInstancePath(pstrInstancePath); AddClass(pstrPath, pClass); for (rapidxml::xml_node<>* pDataNode = attrNode->first_node(); pDataNode; pDataNode = pDataNode->next_sibling()) { //her children Load(pDataNode, pClass); } //printf( "-----------------------------------------------------\n"); return true; }
void oClub::addTableRow(Table &table) const { table.addRow(getTableId(), pClass(this)); bool dbClub = table.getInternalName() != TB_CLUBS; bool canEdit = dbClub ? !oe->isClient() : true; pClub it = pClub(this); int row = 0; table.set(row++, *it, TID_ID, itos(getId()), false); table.set(row++, *it, TID_MODIFIED, getTimeStamp(), false); table.set(row++, *it, TID_CLUB, getName(), canEdit); row = oe->oClubData->fillTableCol(*this, table, canEdit); if (!dbClub) { table.set(row++, *it, TID_NUM, itos(tNumRunners), false); table.set(row++, *it, TID_FEE, oe->formatCurrency(tFee), false); table.set(row++, *it, TID_PAID, oe->formatCurrency(tPaid), false); } }