internal static void CopyOut(v_sharePolicyI_s from, ref ShareQosPolicy to)
 {
     if (to == null)
     {
         to = new ShareQosPolicy();
     }
     to.Name   = BaseMarshaler.ReadString(from.v.name);
     to.Enable = from.v.enable;
 }
예제 #2
0
        internal static int countErrors(ShareQosPolicy o)
        {
            int errorCount = 0;

            if (o.Enable && o.Name == null)
            {
                errorCount++;
            }
            return(errorCount);
        }
 internal static DDS.ReturnCode CopyIn(ShareQosPolicy from, ref v_sharePolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null && (from.Enable == false || from.Name != null))
     {
         BaseMarshaler.WriteString(ref to.v.name, from.Name);
         to.v.enable = from.Enable;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "ShareQosPolicy attribute may not contain a null pointer.");
     }
     return(result);
 }
예제 #4
0
 internal static void CopyOut(IntPtr from, ref ShareQosPolicy to, int offset)
 {
     IntPtr ptr = new IntPtr((long)from + offset + offset_name);
     if (to == null) to = new ShareQosPolicy();
     to.Name = Marshal.PtrToStringAnsi(ptr);
     if (to.Name == null) to.Name = String.Empty;
     to.Enable = BaseMarshaler.ReadBoolean(from, offset + offset_enable);
 }
예제 #5
0
 internal void CopyOut(ref ShareQosPolicy to)
 {
     CopyOut(GapiPtr, ref to, 0);
 }
예제 #6
0
 internal static DDS.ReturnCode CopyIn(ShareQosPolicy from, IntPtr to, int offset)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null && from.Name != null) {
         IntPtr stringPtr = OpenSplice.Gapi.GenericAllocRelease.string_dup(from.Name);
         BaseMarshaler.Write(to, offset + offset_name, stringPtr);
         BaseMarshaler.Write(to, offset + offset_enable, from.Enable);
     } else {
         result = DDS.ReturnCode.BadParameter;
         DDS.OpenSplice.OS.Report(
                 DDS.OpenSplice.ReportType.OS_ERROR,
                 "DDS.OpenSplice.CustomMarshalers.ShareQosPolicyMarshaler.CopyIn",
                 "DDS/OpenSplice/CustomMarshalers/QosContainedMarshalers.cs",
                 DDS.ErrorCode.InvalidValue,
                 "ShareQosPolicy attribute may not contain a null pointer.");
     }
     return result; 
 }
예제 #7
0
 internal DDS.ReturnCode CopyIn(ShareQosPolicy from)
 {
     cleanupRequired = true;
     return CopyIn(from, GapiPtr, 0);
 }