MCPcopy Index your code
hub / github.com/MapServer/MapServer / msCopyLayer

Function msCopyLayer

mapcopy.c:781–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779 **********************************************************************/
780
781int msCopyLayer(layerObj *dst, layerObj *src)
782{
783 int i, return_value;
784 featureListNodeObjPtr current;
785
786 MS_COPYSTELEM(index);
787 MS_COPYSTRING(dst->classitem, src->classitem);
788
789 MS_COPYSTELEM(classitemindex);
790
791 for (i = 0; i < src->numclasses; i++) {
792 if (msGrowLayerClasses(dst) == NULL)
793 return MS_FAILURE;
794#ifndef __cplusplus
795 initClass(dst->class[i]);
796 return_value = msCopyClass(dst->class[i], src->class[i], dst);
797#else
798 initClass(dst->_class[i]);
799 return_value = msCopyClass(dst->_class[i], src->_class[i], dst);
800#endif
801 if (return_value != MS_SUCCESS) {
802 msSetError(MS_MEMERR, "Failed to copy class.", "msCopyLayer()");
803 return MS_FAILURE;
804 }
805 dst->numclasses++;
806 }
807 MS_COPYSTRING(dst->header, src->header);
808 MS_COPYSTRING(dst->footer, src->footer);
809#ifndef __cplusplus
810 MS_COPYSTRING(dst->template, src->template);
811#else
812 MS_COPYSTRING(dst->_template, src->_template);
813#endif
814
815 MS_COPYSTRING(dst->name, src->name);
816 MS_COPYSTRING(dst->group, src->group);
817 MS_COPYSTRING(dst->data, src->data);
818
819 MS_COPYSTELEM(status);
820 MS_COPYSTELEM(type);
821 MS_COPYSTELEM(annotate);
822 MS_COPYSTELEM(tolerance);
823 MS_COPYSTELEM(toleranceunits);
824 MS_COPYSTELEM(symbolscaledenom);
825 MS_COPYSTELEM(scalefactor);
826 MS_COPYSTELEM(minscaledenom);
827 MS_COPYSTELEM(maxscaledenom);
828
829 MS_COPYSTELEM(labelminscaledenom);
830 MS_COPYSTELEM(labelmaxscaledenom);
831 MS_COPYSTELEM(mingeowidth);
832 MS_COPYSTELEM(maxgeowidth);
833
834 MS_COPYSTELEM(sizeunits);
835 MS_COPYSTELEM(maxfeatures);
836
837 MS_COPYCOLOR(&(dst->offsite), &(src->offsite));
838

Callers 6

msDrawQueryLayerFunction · 0.85
msClusterLayerOpenFunction · 0.85
msCopyMapFunction · 0.85
msUnionLayerOpenFunction · 0.85
php_mapscript.cFile · 0.85
layer.cFile · 0.85

Calls 13

msGrowLayerClassesFunction · 0.85
initClassFunction · 0.85
msCopyClassFunction · 0.85
msSetErrorFunction · 0.85
msCopyProjectionFunction · 0.85
msCopyClusterFunction · 0.85
insertFeatureListFunction · 0.85
msCopyExpressionFunction · 0.85
msCopyHashTableFunction · 0.85
msLayerAddProcessingFunction · 0.85
msLayerGetProcessingFunction · 0.85
initJoinFunction · 0.85

Tested by

no test coverage detected