protected virtual C_REAL CloneReal(openehr.openehr.am.archetype.constraint_model.primitive.Impl.C_REAL o)
        {
            C_REAL result = new C_REAL();

            if (o.interval() != null)
                result.range = CloneIntervalOfReal(o.interval());

            if (o.has_assumed_value())
            {
                result.assumed_valueSpecified = true;
                result.assumed_value = ((EiffelKernel.dotnet.REAL_32_REF)o.assumed_value()).item();
            }

            if (o.list() != null && o.list().count() > 0)
            {
                result.list = new float[o.list().count()];

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

            return result;
        }
        protected virtual C_INTEGER CloneInteger(openehr.openehr.am.archetype.constraint_model.primitive.Impl.C_INTEGER o)
        {
            C_INTEGER result = new C_INTEGER();

            if (o.interval() != null)
                result.range = CloneIntervalOfInteger(o.interval());

            if (o.has_assumed_value())
            {
                result.assumed_valueSpecified = true;
                result.assumed_value = ((EiffelKernel.INTEGER_32_REF)o.assumed_value()).item();
            }

            if (o.list() != null && o.list().count() > 0)
            {
                result.list = new int[o.list().count()];

                for (int i = 1; i <= o.list().count(); i++)
                    result.list[i - 1] = o.list().i_th(i);
            }

            return result;
        }
        protected virtual C_TIME CloneTime(openehr.openehr.am.archetype.constraint_model.primitive.Impl.C_TIME o)
        {
            C_TIME result = new C_TIME();

            if (o.has_assumed_value())
                result.assumed_value = o.assumed_value().ToString();

            if (o.pattern() != null)
                result.pattern = o.pattern().ToString();

            result.range = CloneIntervalOfTime(o.interval());

            return result;
        }
        protected virtual C_DURATION CloneDuration(openehr.openehr.am.archetype.constraint_model.primitive.Impl.C_DURATION o)
        {
            C_DURATION result = new C_DURATION();

            if (o.has_assumed_value())
                result.assumed_value = o.assumed_value().ToString();

            if (o.pattern() != null)
                result.pattern = o.pattern().ToString();

            result.range = cloneDurationRange(o.interval());

            return result;
        }
        protected virtual CARDINALITY CloneCardinality(openehr.openehr.am.archetype.constraint_model.CARDINALITY o)
        {
            CARDINALITY result = new CARDINALITY();

            result.is_ordered = o.is_ordered();
            result.is_unique = o.is_unique();
            result.interval = CloneIntervalOfInteger(o.interval());

            return result;
        }