protected virtual object Visit(openehr.openehr.am.openehr_profile.data_types.text.Impl.C_CODE_PHRASE o, int depth)
        {
            C_CODE_PHRASE result = new C_CODE_PHRASE();
            CloneC_Object(result, o);

            if (o.terminology_id() != null)
            {
                TERMINOLOGY_ID terminologyId = new TERMINOLOGY_ID();
                terminologyId.value = o.terminology_id().value().ToString();
                result.terminology_id = terminologyId;
            }

            if (o.code_list() != null)
            {
                result.code_list = new string[o.code_list().count()];

                for (int i = 1; i <= result.code_list.Length; i++)
                    result.code_list[i - 1] = o.code_list().i_th(i).ToString();
            }

            if (o.has_assumed_value())
                result.assumed_value = CloneCodePhrase((openehr.openehr.rm.data_types.text.Impl.CODE_PHRASE)o.assumed_value());

            return result;
        }