void SchemaAttDefList::serialize(XSerializeEngine& serEng) { XMLAttDefList::serialize(serEng); if (serEng.isStoring()) { /*** * * Serialize RefHash2KeysTableOf<SchemaAttDef> * ***/ XTemplateSerializer::storeObject(fList, serEng); serEng.writeSize (fCount); // do not serialize fEnum } else { /*** * * Deserialize RefHash2KeysTableOf<SchemaAttDef> * ***/ XTemplateSerializer::loadObject(&fList, 29, true, serEng); // assume empty so we can size fArray just right serEng.readSize (fSize); if (!fEnum && fList) { fEnum = new (getMemoryManager()) RefHash2KeysTableOfEnumerator<SchemaAttDef>(fList, false, getMemoryManager()); } if(fSize) { (getMemoryManager())->deallocate(fArray); fArray = (SchemaAttDef **)((getMemoryManager())->allocate( sizeof(SchemaAttDef*) * fSize)); fCount = 0; while(fEnum->hasMoreElements()) { fArray[fCount++] = &fEnum->nextElement(); } } } }
void SchemaAttDef::serialize(XSerializeEngine& serEng) { XMLAttDef::serialize(serEng); if (serEng.isStoring()) { serEng.writeSize (fElemId); serEng<<(int)fPSVIScope; serEng<<fAttName; DatatypeValidator::storeDV(serEng, fDatatypeValidator); /*** * Serialize ValueVectorOf<unsigned int> ***/ XTemplateSerializer::storeObject(fNamespaceList, serEng); serEng<<fBaseAttDecl; } else { serEng.readSize (fElemId); int i; serEng>>i; fPSVIScope = (PSVIDefs::PSVIScope)i; serEng>>fAttName; fDatatypeValidator = DatatypeValidator::loadDV(serEng); /*** * Deserialize ValueVectorOf<unsigned int> ***/ XTemplateSerializer::loadObject(&fNamespaceList, 8, false, serEng); serEng>>fBaseAttDecl; } }
void XMLElementDecl::serialize(XSerializeEngine& serEng) { if (serEng.isStoring()) { serEng<<fElementName; serEng<<(int) fCreateReason; serEng.writeSize (fId); serEng<<fExternalElement; } else { serEng>>fElementName; int i; serEng>>i; fCreateReason=(CreateReasons)i; serEng.readSize (fId); serEng>>fExternalElement; } }