// Equals tests equality against another Layer. It only considers the values of the attributes
// on Layer struct, not on parent core.DxfParseable.
774845
func (l Layer) Equals(other core.DxfElement) bool {
	if otherLayer, ok := other.(*Layer); ok {
		return l.Name == otherLayer.Name &&
			l.Color == otherLayer.Color &&
			l.LineType == otherLayer.LineType &&
			l.Locked == otherLayer.Locked &&
			l.Frozen == otherLayer.Frozen &&
			l.On == otherLayer.On
	}
	return false
}
1365648
func (v *StructB) Equals(rhs *StructB) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Aa == nil && rhs.Aa == nil) || (v.Aa != nil && rhs.Aa != nil && v.Aa.Equals(rhs.Aa))) {
		return false
	}
	if !v.Ab.Equals(rhs.Ab) {
		return false
	}

	return true
}
672217
func (p LWPolyline) Equals(other core.DxfElement) bool {
	if otherLWPolyline, ok := other.(*LWPolyline); ok {
		return p.BaseEntity.Equals(otherLWPolyline.BaseEntity) &&
			p.Closed == otherLWPolyline.Closed &&
			p.Plinegen == otherLWPolyline.Plinegen &&
			core.FloatEquals(p.ConstantWidth, otherLWPolyline.ConstantWidth) &&
			core.FloatEquals(p.Elevation, otherLWPolyline.Elevation) &&
			core.FloatEquals(p.Thickness, otherLWPolyline.Thickness) &&
			p.Points.Equals(otherLWPolyline.Points) &&
			p.ExtrusionDirection.Equals(otherLWPolyline.ExtrusionDirection)
	}
	return false
}
1247444
func equals(a, b interface{}) bool {
	sameType := reflect.TypeOf(a) == reflect.TypeOf(b)
	if _, ok := a.([]byte); ok {
		if _, ok := b.([]byte); !ok {
			// panic(fmt.Sprintf("incomparable type: %v vs %v", a, b))
			return false
		}
		b1 := a.([]byte)
		b2 := b.([]byte)
		if len(b1) != len(b2) {
			return false
		}
		for i := 0; i < len(b1) && i < len(b2); i++ {
			if b1[i] != b2[i] {
				return false
			}
		}
		return true
	} else if _, ok := a.(int64); ok {
		if _, ok := b.(int64); !ok {
			// panic(fmt.Sprintf("incomparable type: %v vs %v", a, b))
			return false
		}
		return a.(int64) == b.(int64)
	} else if a == nil && b == nil {
		return true
	} else if sameType && a == b {
		return true
	}
	return false
}
491429
func (v *NestedListsI32x3) Equals(rhs *NestedListsI32x3) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Integerlist == nil && rhs.Integerlist == nil) || (v.Integerlist != nil && rhs.Integerlist != nil && _List_List_List_I32_Equals(v.Integerlist, rhs.Integerlist))) {
		return false
	}

	return true
}
1176690
func (v *KeyValue_SetValue_Result) Equals(rhs *KeyValue_SetValue_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}

	return true
}
1249709
func (slice TagSlice) Equals(other DxfElement) bool {
	if otherSlice, ok := other.(TagSlice); ok {
		if len(slice) != len(otherSlice) {
			return false
		}

		for index, tag := range slice {
			otherTag := otherSlice[index]

			if !tag.Equals(otherTag) {
				return false
			}
		}
		return true
	}
	return false
}
581316
func (c Circle) Equals(other core.DxfElement) bool {
	if otherCircle, ok := other.(*Circle); ok {
		return c.BaseEntity.Equals(otherCircle.BaseEntity) &&
			core.FloatEquals(c.Thickness, otherCircle.Thickness) &&
			c.Center.Equals(otherCircle.Center) &&
			core.FloatEquals(c.Radius, otherCircle.Radius) &&
			c.ExtrusionDirection.Equals(otherCircle.ExtrusionDirection)
	}
	return false
}
1271212
func (style Style) Equals(other core.DxfElement) bool {
	if otherStyle, ok := other.(*Style); ok {
		return style.Name == otherStyle.Name &&
			core.FloatEquals(style.Height, otherStyle.Height) &&
			core.FloatEquals(style.Width, otherStyle.Width) &&
			core.FloatEquals(style.Oblique, otherStyle.Oblique) &&
			style.IsBackwards == otherStyle.IsBackwards &&
			style.IsUpsideDown == otherStyle.IsUpsideDown &&
			style.IsShape == otherStyle.IsShape &&
			style.IsVerticalText == otherStyle.IsVerticalText &&
			style.Font == otherStyle.Font &&
			style.BigFont == otherStyle.BigFont
	}
	return false
}
354085
func (p Polyline) Equals(other core.DxfElement) bool {
	if otherPolyline, ok := other.(*Polyline); ok {
		return p.BaseEntity.Equals(otherPolyline.BaseEntity) &&
			core.FloatEquals(p.Elevation, otherPolyline.Elevation) &&
			core.FloatEquals(p.Thickness, otherPolyline.Thickness) &&
			p.Closed == otherPolyline.Closed &&
			p.CurveFitVerticesAdded == otherPolyline.CurveFitVerticesAdded &&
			p.SplineFitVerticesAdded == otherPolyline.SplineFitVerticesAdded &&
			p.Is3dPolyline == otherPolyline.Is3dPolyline &&
			p.Is3dPolygonMesh == otherPolyline.Is3dPolygonMesh &&
			p.PolygonMeshClosedNDir == otherPolyline.PolygonMeshClosedNDir &&
			p.IsPolyfaceMesh == otherPolyline.IsPolyfaceMesh &&
			p.LineTypeParentAround == otherPolyline.LineTypeParentAround &&
			core.FloatEquals(p.DefaultStartWidth, otherPolyline.DefaultStartWidth) &&
			core.FloatEquals(p.DefaultEndWidth, otherPolyline.DefaultEndWidth) &&
			p.VertexCountM == otherPolyline.VertexCountM &&
			p.VertexCountN == otherPolyline.VertexCountN &&
			p.SmoothDensityM == otherPolyline.SmoothDensityM &&
			p.SmoothDensityN == otherPolyline.SmoothDensityN &&
			p.SmoothSurface == otherPolyline.SmoothSurface &&
			p.ExtrusionDirection.Equals(otherPolyline.ExtrusionDirection) &&
			p.Vertices.Equals(otherPolyline.Vertices)
	}
	return false
}
1069036
func (ti TemplateInfo) Equals(other TemplateInfo) bool {
	if len(other) != len(ti) {
		return false
	}
	for i, me := range ti {
		if !me.Equals(&other[i]) {
			return false
		}
	}
	return true
}
1087872
func (v *Xtruct) Equals(rhs *Xtruct) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.StringThing, rhs.StringThing) {
		return false
	}
	if !_Byte_EqualsPtr(v.ByteThing, rhs.ByteThing) {
		return false
	}
	if !_I32_EqualsPtr(v.I32Thing, rhs.I32Thing) {
		return false
	}
	if !_I64_EqualsPtr(v.I64Thing, rhs.I64Thing) {
		return false
	}

	return true
}
1370778
func (ch *Channel) Equals(other *Channel) bool {
	return reflect.DeepEqual(ch, other)
}
1006389
func (c *Config) Equals(other *Config) bool {
	if (c.Blocks != nil || len(c.Blocks) != 0) || (other.Blocks != nil || len(other.Blocks) != 0) {
		if !reflect.DeepEqual(c.Blocks, other.Blocks) {
			return false
		}
	}
	if (c.variables != nil || len(c.variables) != 0) || (other.variables != nil || len(other.variables) != 0) {
		if !reflect.DeepEqual(c.variables, other.variables) {
			return false
		}
	}
	return true
}
161718
func (l *L4Addr) Equals(o *L4Addr) bool {
	switch {
	case (l == nil) != (o == nil):
		return false
	case (l == nil) && (o == nil):
		return true
	}
	return l.Port == o.Port && l.Protocol == o.Protocol
}
614623
func (f Float) Equals(other DxfElement) bool {
	if fValue, ok := other.(*Float); ok {
		return f.value == fValue.value
	}
	return false
}
122628
func (v *CrazyNesting) Equals(rhs *CrazyNesting) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.StringField, rhs.StringField) {
		return false
	}
	if !((v.SetField == nil && rhs.SetField == nil) || (v.SetField != nil && rhs.SetField != nil && _Set_Insanity_Equals(v.SetField, rhs.SetField))) {
		return false
	}
	if !_List_Map_Set_I32_Map_I32_Set_List_Map_Insanity_String_Equals(v.ListField, rhs.ListField) {
		return false
	}
	if !((v.BinaryField == nil && rhs.BinaryField == nil) || (v.BinaryField != nil && rhs.BinaryField != nil && bytes.Equal(v.BinaryField, rhs.BinaryField))) {
		return false
	}

	return true
}