Map records the element name of one of the child attributes. Map panics if attName is not the name of a child attribute.
(elemName, attName string)
| 113 | // Map records the element name of one of the child attributes. |
| 114 | // Map panics if attName is not the name of a child attribute. |
| 115 | func (ma *MappedAttributeExpr) Map(elemName, attName string) { |
| 116 | if att := AsObject(ma.Type).Attribute(attName); att == nil { |
| 117 | panic(attName + " is not the name of a child of the mapped attribute") // bug |
| 118 | } |
| 119 | ma.nameMap[attName] = elemName |
| 120 | ma.reverseMap[elemName] = attName |
| 121 | } |
| 122 | |
| 123 | // Delete removes a child attribute given its name. |
| 124 | func (ma *MappedAttributeExpr) Delete(attName string) { |
no test coverage detected