bool SampleGeoref::serialize(SessionItemSerializer &serializer) const { XMLWriter writer("SampleGeoref"); if (mpRaster != NULL) { writer.addAttr("rasterId", mpRaster->getId()); } else { return false; } writer.addAttr("xSize", mXSize); writer.addAttr("ySize", mYSize); writer.addAttr("xScale", mXScale); writer.addAttr("yScale", mYScale); writer.addAttr("frames", mFrames); writer.addAttr("extrapolationAccurate", mExtrapolate); writer.addAttr("currentFrame", mCurrentFrame); writer.addAttr("rotate", mRotate); const Animation* pAnim = mpAnimation.get(); if (pAnim) { writer.addAttr("animationId", pAnim->getId()); } return serializer.serialize(writer); }
bool RangeProfilePlotManager::serialize(SessionItemSerializer& serializer) const { XMLWriter writer("RangeProfilePlotManager"); writer.addAttr("viewId", mpView->getId()); #pragma message(__FILE__ "(" STRING(__LINE__) ") : warning : We should be able to save the plot's session id and restore " \ "using that but the PlotWidget is not really part of the session. The following code is a work around and should be changed " \ "when OPTICKS-542 is implemented. (tclarke)") writer.pushAddPoint(writer.addElement("plot")); Serializable* pPlotSer = dynamic_cast<Serializable*>(mpPlot); // The imp side is serializable VERIFY(pPlotSer); if (!pPlotSer->toXml(&writer)) { return false; } writer.popAddPoint(); writer.pushAddPoint(writer.addElement("plotView")); Serializable* pPlotViewSer = dynamic_cast<Serializable*>(mpView); // The imp side is serializable VERIFY(pPlotViewSer); if (!pPlotViewSer->toXml(&writer)) { return false; } writer.popAddPoint(); for (std::map<Signature*, std::string>::const_iterator sig = mSigPointSets.begin(); sig != mSigPointSets.end(); ++sig) { writer.pushAddPoint(writer.addElement("signature")); writer.addAttr("sigId", sig->first->getId()); writer.addAttr("pointSetName", sig->second); writer.popAddPoint(); } if (!serializer.serialize(writer)) { return false; } serializer.endBlock(); return DockWindowShell::serialize(serializer); }
bool DataElementImp::serialize(SessionItemSerializer& serializer) const { XMLWriter xml(getObjectType().c_str()); if (!SessionItemImp::toXml(&xml)) { return false; } DataElement* pParent = getParent(); if (pParent != NULL) { xml.addAttr("parentId", pParent->getId()); } return toXml(&xml) && serializer.serialize(xml); }
bool SampleGeoref::serialize(SessionItemSerializer& serializer) const { if (mpRaster == NULL) { // execute() has not yet been called so there is no need to serialize any parameters return true; } XMLWriter writer("SampleGeoref"); writer.addAttr("rasterId", mpRaster->getId()); writer.addAttr("xSize", mXSize); writer.addAttr("ySize", mYSize); writer.addAttr("xScale", mXScale); writer.addAttr("yScale", mYScale); writer.addAttr("extrapolationAccurate", mExtrapolate); return serializer.serialize(writer); }
bool SpectralLibraryManager::serialize(SessionItemSerializer& serializer) const { XMLWriter writer("SpectralLibraryManager"); // Save Signatures for (std::vector<Signature*>::const_iterator it = mSignatures.begin(); it != mSignatures.end(); ++it) { Signature* pSignature = *it; if (pSignature != NULL) { writer.pushAddPoint(writer.addElement("Signature")); writer.addAttr("signatureId", pSignature->getId()); writer.popAddPoint(); } } return serializer.serialize(writer); }
bool GcpGeoreference::serialize(SessionItemSerializer &serializer) const { XMLWriter writer("GcpGeoreference"); if (mpRaster != NULL) { writer.addAttr("rasterId", mpRaster->getId()); } else { return false; } writer.addAttr("order", mOrder); writer.addAttr("reverseOrder", mReverseOrder); writer.addAttr("numRows", mNumRows); writer.addAttr("numCols", mNumColumns); XML_ADD_CONTAINER(writer, latCoefficients, &mLatCoefficients[0], &mLatCoefficients[COEFFS_FOR_ORDER(MAX_ORDER)]); XML_ADD_CONTAINER(writer, lonCoefficients, &mLonCoefficients[0], &mLonCoefficients[COEFFS_FOR_ORDER(MAX_ORDER)]); XML_ADD_CONTAINER(writer, xCoefficients, &mXCoefficients[0], &mXCoefficients[COEFFS_FOR_ORDER(MAX_ORDER)]); XML_ADD_CONTAINER(writer, yCoefficients, &mYCoefficients[0], &mYCoefficients[COEFFS_FOR_ORDER(MAX_ORDER)]); return serializer.serialize(writer); }
bool ModelServicesImp::serialize(SessionItemSerializer& serializer) const { XMLWriter writer("ModelServices"); XML_ADD_CONTAINER(writer, elementTypes, mElementTypes.begin(), mElementTypes.end()); return serializer.serialize(writer); }
bool PlugInDescriptorImp::serialize(SessionItemSerializer& serializer) const { return serializer.serialize(NULL, 0); }
bool ModuleDescriptor::serialize(SessionItemSerializer& serializer) const { return serializer.serialize(NULL, 0); }
bool serialize(SessionItemSerializer& serializer) const { return serializer.serialize(NULL, 0); }