internal override void CleanupIn(ref v_writerQos to)
 {
     DurabilityQosPolicyMarshaler.CleanupIn(ref to.durability);
     DeadlineQosPolicyMarshaler.CleanupIn(ref to.deadline);
     LatencyBudgetQosPolicyMarshaler.CleanupIn(ref to.latency);
     LivelinessQosPolicyMarshaler.CleanupIn(ref to.liveliness);
     ReliabilityQosPolicyMarshaler.CleanupIn(ref to.reliability);
     DestinationOrderQosPolicyMarshaler.CleanupIn(ref to._orderby);
     HistoryQosPolicyMarshaler.CleanupIn(ref to.history);
     ResourceLimitsQosPolicyMarshaler.CleanupIn(ref to.resource);
     TransportPriorityQosPolicyMarshaler.CleanupIn(ref to.transport);
     LifespanQosPolicyMarshaler.CleanupIn(ref to.lifespan);
     UserDataQosPolicyMarshaler.CleanupIn(ref to.userData);
     OwnershipQosPolicyMarshaler.CleanupIn(ref to.ownership);
     OwnershipStrengthQosPolicyMarshaler.CleanupIn(ref to.strength);
     WriterDataLifecycleQosPolicyMarshaler.CleanupIn(ref to.lifecycle);
 }
 internal override void CopyOut(v_writerQos from, ref DataWriterQos to)
 {
     if (to == null)
     {
         to = new DataWriterQos();
     }
     DurabilityQosPolicyMarshaler.CopyOut(from.durability, ref to.Durability);
     DeadlineQosPolicyMarshaler.CopyOut(from.deadline, ref to.Deadline);
     LatencyBudgetQosPolicyMarshaler.CopyOut(from.latency, ref to.LatencyBudget);
     LivelinessQosPolicyMarshaler.CopyOut(from.liveliness, ref to.Liveliness);
     ReliabilityQosPolicyMarshaler.CopyOut(from.reliability, ref to.Reliability);
     DestinationOrderQosPolicyMarshaler.CopyOut(from._orderby, ref to.DestinationOrder);
     HistoryQosPolicyMarshaler.CopyOut(from.history, ref to.History);
     ResourceLimitsQosPolicyMarshaler.CopyOut(from.resource, ref to.ResourceLimits);
     TransportPriorityQosPolicyMarshaler.CopyOut(from.transport, ref to.TransportPriority);
     LifespanQosPolicyMarshaler.CopyOut(from.lifespan, ref to.Lifespan);
     UserDataQosPolicyMarshaler.CopyOut(from.userData, ref to.UserData);
     OwnershipQosPolicyMarshaler.CopyOut(from.ownership, ref to.Ownership);
     OwnershipStrengthQosPolicyMarshaler.CopyOut(from.strength, ref to.OwnershipStrength);
     WriterDataLifecycleQosPolicyMarshaler.CopyOut(from.lifecycle, ref to.WriterDataLifecycle);
 }
 /**
  * Copy and cleanup functions.
  **/
 internal override DDS.ReturnCode CopyIn(DataWriterQos from, ref v_writerQos to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to._parent      = new v_qos();
         to._parent.kind = V_QOSKIND.V_WRITER_QOS;
         result          = DurabilityQosPolicyMarshaler.CopyIn(
             from.Durability, ref to.durability);
         if (result == DDS.ReturnCode.Ok)
         {
             result = DeadlineQosPolicyMarshaler.CopyIn(
                 from.Deadline, ref to.deadline);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = LatencyBudgetQosPolicyMarshaler.CopyIn(
                 from.LatencyBudget, ref to.latency);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = LivelinessQosPolicyMarshaler.CopyIn(
                 from.Liveliness, ref to.liveliness);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = ReliabilityQosPolicyMarshaler.CopyIn(
                 from.Reliability, ref to.reliability);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = DestinationOrderQosPolicyMarshaler.CopyIn(
                 from.DestinationOrder, ref to._orderby);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = HistoryQosPolicyMarshaler.CopyIn(
                 from.History, ref to.history);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = ResourceLimitsQosPolicyMarshaler.CopyIn(
                 from.ResourceLimits, ref to.resource);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = TransportPriorityQosPolicyMarshaler.CopyIn(
                 from.TransportPriority, ref to.transport);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = LifespanQosPolicyMarshaler.CopyIn(
                 from.Lifespan, ref to.lifespan);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = UserDataQosPolicyMarshaler.CopyIn(
                 from.UserData, ref to.userData);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = OwnershipQosPolicyMarshaler.CopyIn(
                 from.Ownership, ref to.ownership);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = OwnershipStrengthQosPolicyMarshaler.CopyIn(
                 from.OwnershipStrength, ref to.strength);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = WriterDataLifecycleQosPolicyMarshaler.CopyIn(
                 from.WriterDataLifecycle, ref to.lifecycle);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DataWriterQos attribute may not be a null pointer.");
     }
     return(result);
 }