/**
  * Copy and cleanup functions.
  **/
 internal override DDS.ReturnCode CopyIn(SubscriberQos from, ref v_subscriberQos to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to._parent      = new v_qos();
         to._parent.kind = V_QOSKIND.V_SUBSCRIBER_QOS;
         result          = PresentationQosPolicyMarshaler.CopyIn(
             from.Presentation, ref to.presentation);
         if (result == DDS.ReturnCode.Ok)
         {
             result = PartitionQosPolicyMarshaler.CopyIn(
                 from.Partition, ref to.partition.v);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = GroupDataQosPolicyMarshaler.CopyIn(
                 from.GroupData, ref to.groupData);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = EntityFactoryQosPolicyMarshaler.CopyIn(
                 from.EntityFactory, ref to.entityFactory);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = ShareQosPolicyMarshaler.CopyIn(
                 from.Share, ref to.share);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "SubscriberQos attribute may not be a null pointer.");
     }
     return(result);
 }
 /**
  * Copy and cleanup functions.
  **/
 internal override DDS.ReturnCode CopyIn(DataReaderQos from, ref v_readerQos to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to._parent      = new v_qos();
         to._parent.kind = V_QOSKIND.V_READER_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 = 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 = TimeBasedFilterQosPolicyMarshaler.CopyIn(
                 from.TimeBasedFilter, ref to.pacing);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = ReaderDataLifecycleQosPolicyMarshaler.CopyIn(
                 from.ReaderDataLifecycle, ref to.lifecycle);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = SubscriptionKeyQosPolicyMarshaler.CopyIn(
                 from.SubscriptionKeys, ref to.userKey);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = ReaderLifespanQosPolicyMarshaler.CopyIn(
                 from.ReaderLifespan, ref to.lifespan);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = ShareQosPolicyMarshaler.CopyIn(
                 from.Share, ref to.share);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DataReaderQos attribute may not be a null pointer.");
     }
     return(result);
 }