/**
  * Copy and cleanup functions.
  **/
 internal override DDS.ReturnCode CopyIn(DomainParticipantQos from, ref v_participantQos to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to._parent      = new v_qos();
         to._parent.kind = V_QOSKIND.V_PARTICIPANT_QOS;
         result          = UserDataQosPolicyMarshaler.CopyIn(from.UserData, ref to.userData);
         if (result == DDS.ReturnCode.Ok)
         {
             result = EntityFactoryQosPolicyMarshaler.CopyIn(
                 from.EntityFactory, ref to.entityFactory);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = SchedulingQosPolicyMarshaler.CopyIn(
                 from.WatchdogScheduling, ref to.watchdogScheduling);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DomainParticipantQos attribute may not be a null pointer.");
     }
     return(result);
 }
 /**
  * Copy and cleanup functions.
  **/
 internal override DDS.ReturnCode CopyIn(PublisherQos from, ref v_publisherQos to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to._parent      = new v_qos();
         to._parent.kind = V_QOSKIND.V_PUBLISHER_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);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "PublisherQos attribute may not be a null pointer.");
     }
     return(result);
 }