internal static int countErrors(ReaderLifespanQosPolicy o)
        {
            int errorCount = 0;

            errorCount += countErrors(o.Duration);
            return(errorCount);
        }
 internal static void CopyOut(v_readerLifespanPolicyI_s from, ref ReaderLifespanQosPolicy to)
 {
     if (to == null)
     {
         to = new ReaderLifespanQosPolicy();
     }
     to.UseLifespan = from.v.used;
     DurationMarshaler.CopyOut(from.v.duration, ref to.Duration);
 }
 internal static DDS.ReturnCode CopyIn(ReaderLifespanQosPolicy from, ref v_readerLifespanPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.used = from.UseLifespan;
         result    = DurationMarshaler.CopyIn(from.Duration, ref to.v.duration);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "ReaderLifespanQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static void CopyOut(IntPtr from, ref ReaderLifespanQosPolicy to, int offset)
 {
 	if (to == null) to = new ReaderLifespanQosPolicy();
     to.UseLifespan = BaseMarshaler.ReadBoolean(from, offset + offset_use_lifespan);
     to.Duration = BaseMarshaler.ReadDuration(from, offset + offset_duration);
 }
 internal void CopyOut(ref ReaderLifespanQosPolicy to)
 {
     CopyOut(GapiPtr, ref to, 0);
 }
 internal static DDS.ReturnCode CopyIn(ReaderLifespanQosPolicy from, IntPtr to, int offset)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null) {
         BaseMarshaler.Write(to, offset + offset_use_lifespan, from.UseLifespan);
         BaseMarshaler.Write(to, offset + offset_duration, from.Duration);
     } else {
         result = DDS.ReturnCode.BadParameter;
         DDS.OpenSplice.OS.Report(
                 DDS.OpenSplice.ReportType.OS_ERROR,
                 "DDS.OpenSplice.CustomMarshalers.ReaderLifespanQosPolicyMarshaler.CopyIn",
                 "DDS/OpenSplice/CustomMarshalers/QosContainedMarshalers.cs",
                 DDS.ErrorCode.InvalidValue,
                 "ReaderLifespanQosPolicy attribute may not be a null pointer.");
     }
     return result; 
 }
 internal DDS.ReturnCode CopyIn(ReaderLifespanQosPolicy from)
 {
     cleanupRequired = true;
     return CopyIn(from, GapiPtr, 0);
 }