protected virtual EXPR_ITEM CloneExprItem(openehr.openehr.am.archetype.assertion.EXPR_LEAF o) { EXPR_LEAF result = new EXPR_LEAF(); result.type = o.type().ToString(); if (result.type.StartsWith("OE_")) result.type = result.type.Substring(3); if (o.reference_type() != null) result.reference_type = o.reference_type().ToString(); switch (result.type) { case "C_STRING": result.item = CloneString(o.item() as openehr.openehr.am.archetype.constraint_model.primitive.Impl.C_STRING); break; case "String": result.item = o.item().ToString(); break; default: throw new NotSupportedException(result.type); } return result; }
protected virtual object Visit(openehr.openehr.am.archetype.constraint_model.Impl.C_PRIMITIVE_OBJECT o, int depth) { C_PRIMITIVE_OBJECT result = new C_PRIMITIVE_OBJECT(); CloneC_Object(result, o); if (o.item() != null) result.item = CloneC_Primitive(o.item()); return result; }