lfCamera::lfCamera (const lfCamera &other) { Maker = lf_mlstr_dup (other.Maker); Model = lf_mlstr_dup (other.Model); Variant = lf_mlstr_dup (other.Variant); Mount = g_strdup (other.Mount); CropFactor = other.CropFactor; }
lfCamera &lfCamera::operator = (const lfCamera &other) { lf_free (Maker); Maker = lf_mlstr_dup (other.Maker); lf_free (Model); Model = lf_mlstr_dup (other.Model); lf_free (Variant); Variant = lf_mlstr_dup (other.Variant); _lf_setstr (&Mount, other.Mount); CropFactor = other.CropFactor; return *this; }
lfMount::lfMount (const lfMount &other) { Name = lf_mlstr_dup (other.Name); Compat = NULL; if (other.Compat) for (int i = 0; other.Compat [i]; i++) AddCompat (other.Compat [i]); }
lfLens &lfLens::operator = (const lfLens &other) { lf_free (Maker); Maker = lf_mlstr_dup (other.Maker); lf_free (Model); Model = lf_mlstr_dup (other.Model); MinFocal = other.MinFocal; MaxFocal = other.MaxFocal; MinAperture = other.MinAperture; MaxAperture = other.MaxAperture; lf_free (Mounts); Mounts = NULL; if (other.Mounts) for (int i = 0; other.Mounts [i]; i++) AddMount (other.Mounts [i]); CenterX = other.CenterX; CenterY = other.CenterY; CropFactor = other.CropFactor; AspectRatio = other.AspectRatio; Type = other.Type; lf_free (CalibDistortion); CalibDistortion = NULL; if (other.CalibDistortion) for (int i = 0; other.CalibDistortion [i]; i++) AddCalibDistortion (other.CalibDistortion [i]); lf_free (CalibTCA); CalibTCA = NULL; if (other.CalibTCA) for (int i = 0; other.CalibTCA [i]; i++) AddCalibTCA (other.CalibTCA [i]); lf_free (CalibVignetting); CalibVignetting = NULL; if (other.CalibVignetting) for (int i = 0; other.CalibVignetting [i]; i++) AddCalibVignetting (other.CalibVignetting [i]); lf_free (CalibCrop); CalibCrop = NULL; if (other.CalibCrop) for (int i = 0; other.CalibCrop [i]; i++) AddCalibCrop (other.CalibCrop [i]); lf_free (CalibFov); CalibFov = NULL; if (other.CalibFov) for (int i = 0; other.CalibFov [i]; i++) AddCalibFov (other.CalibFov [i]); return *this; }
lfLens &lfLens::operator = (const lfLens &other) { lf_free (Maker); Maker = lf_mlstr_dup (other.Maker); lf_free (Model); Model = lf_mlstr_dup (other.Model); MinFocal = other.MinFocal; MaxFocal = other.MaxFocal; MinAperture = other.MinAperture; MaxAperture = other.MaxAperture; lf_free (Mounts); Mounts = NULL; if (other.Mounts) for (int i = 0; other.Mounts [i]; i++) AddMount (other.Mounts [i]); CenterX = other.CenterX; CenterY = other.CenterY; RedCCI = other.RedCCI; GreenCCI = other.GreenCCI; BlueCCI = other.BlueCCI; CropFactor = other.CropFactor; Type = other.Type; lf_free (CalibDistortion); CalibDistortion = NULL; if (other.CalibDistortion) for (int i = 0; other.CalibDistortion [i]; i++) AddCalibDistortion (other.CalibDistortion [i]); lf_free (CalibTCA); CalibTCA = NULL; if (other.CalibTCA) for (int i = 0; other.CalibTCA [i]; i++) AddCalibTCA (other.CalibTCA [i]); lf_free (CalibVignetting); CalibVignetting = NULL; if (other.CalibVignetting) for (int i = 0; other.CalibVignetting [i]; i++) AddCalibVignetting (other.CalibVignetting [i]); return *this; }
lfMount &lfMount::operator = (const lfMount &other) { lf_free (Name); Name = lf_mlstr_dup (other.Name); lf_free (Compat); Compat = NULL; if (other.Compat) for (int i = 0; other.Compat [i]; i++) AddCompat (other.Compat [i]); return *this; }