int msCopySymbol(symbolObj *dst, symbolObj *src, mapObj *map) { int i; initSymbol(dst); MS_COPYSTRING(dst->name, src->name); MS_COPYSTELEM(type); MS_COPYSTELEM(inmapfile); /* map is a special case */ dst->map = map; MS_COPYSTELEM(sizex); MS_COPYSTELEM(sizey); MS_COPYSTELEM(anchorpoint_x); MS_COPYSTELEM(anchorpoint_y); for (i=0; i < src->numpoints; i++) { MS_COPYPOINT(&(dst->points[i]), &(src->points[i])); } MS_COPYSTELEM(numpoints); MS_COPYSTELEM(filled); MS_COPYSTRING(dst->imagepath, src->imagepath); MS_COPYSTELEM(transparent); MS_COPYSTELEM(transparentcolor); MS_COPYSTRING(dst->character, src->character); MS_COPYSTELEM(antialias); MS_COPYSTRING(dst->font, src->font); MS_COPYSTRING(dst->full_pixmap_path,src->full_pixmap_path); return(MS_SUCCESS); }
int msCopyJoin(joinObj *dst, joinObj *src) { MS_COPYSTRING(dst->name, src->name); /* makes no sense to copy the items or values since they are runtime additions to the mapfile */ MS_COPYSTRING(dst->table, src->table); MS_COPYSTRING(dst->from, src->from); MS_COPYSTRING(dst->to, src->to); MS_COPYSTRING(dst->header, src->header); #ifndef __cplusplus MS_COPYSTRING(dst->template, src->template);
int msCopySymbolSet(symbolSetObj *dst, symbolSetObj *src, mapObj *map) { int i, return_value; MS_COPYSTRING(dst->filename, src->filename); dst->map = map; dst->fontset = &(map->fontset); /* Copy child symbols */ for (i = 0; i < src->numsymbols; i++) { if (msGrowSymbolSet(dst) == NULL) return MS_FAILURE; return_value = msCopySymbol(dst->symbol[i], src->symbol[i], map); if (return_value != MS_SUCCESS) { msSetError(MS_MEMERR,"Failed to copy symbol.","msCopySymbolSet()"); return(MS_FAILURE); } dst->numsymbols++; } /* MS_COPYSTELEM(imagecachesize); */ /* I have a feeling that the code below is not quite right - Sean */ /*copyProperty(&(dst->imagecache), &(src->imagecache), sizeof(struct imageCacheObj)); */ dst->imagecachesize = 0; /* since we are not copying the cache set the cache to NUNLL and the size to 0 (bug 1521) */ dst->imagecache = NULL; return(MS_SUCCESS); }
int msCopyExpression(expressionObj *dst, expressionObj *src) { MS_COPYSTRING(dst->string, src->string); MS_COPYSTELEM(type); dst->compiled = MS_FALSE; return MS_SUCCESS; }
int msCopyItem(itemObj *dst, itemObj *src) { MS_COPYSTRING(dst->name, src->name); MS_COPYSTELEM(type); MS_COPYSTELEM(index); MS_COPYSTELEM(size); MS_COPYSTELEM(numdecimals); return MS_SUCCESS; }
int msCopyFontSet(fontSetObj *dst, fontSetObj *src, mapObj *map) { MS_COPYSTRING(dst->filename, src->filename); MS_COPYSTELEM(numfonts); if (&(src->fonts)) { /* if (!dst->fonts) */ /* dst->fonts = msCreateHashTable(); */ if (msCopyHashTable(&(dst->fonts), &(src->fonts)) != MS_SUCCESS) return MS_FAILURE; } dst->map = map; return MS_SUCCESS; }