245 lines
12 KiB
C#
245 lines
12 KiB
C#
/*
|
|
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
|
*
|
|
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
|
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
|
* without the written permission of iTAC Software AG.
|
|
*/
|
|
// created 05.11.2018 14:52:23
|
|
// skip property BoardDIB, declared in BoardSide
|
|
// skip property FiducialList, property in exclude list
|
|
// skip property FiducialList, declared in BoardSide
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property Color, declared in BoardSide
|
|
// skip property CoordSys, declared in BoardSide
|
|
// skip property String, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property String, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
// skip property GerberData, declared in BoardSide
|
|
// skip property Boolean, property in exclude list
|
|
// skip property SupportPinList, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property String, property in exclude list
|
|
// skip property PositionCorrectionMethod, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property BoardSideProductionSequence, declared in BoardSide
|
|
// skip property BoardWeightClass, property in exclude list
|
|
// skip property Int32, property in exclude list
|
|
// skip property FiducialList, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property ArrayList, property in exclude list
|
|
// skip property String, property in exclude list
|
|
// skip property FiducialPlacement, declared in BoardSide
|
|
// skip property FiducialPlacement, declared in BoardSide
|
|
// skip property Boolean, property in exclude list
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using com.itac.oib.siplacepro.contracts.types;
|
|
|
|
namespace com.itac.oib.siplacepro.contracts.data
|
|
{
|
|
// source: assembly 5.1.0.84
|
|
// source: assembly ASM.AS.OIB.SIPLACEPro.Proxy
|
|
public class BoardSideMapper
|
|
{
|
|
// used for itac->asm: True
|
|
// used for asm->itac: True
|
|
|
|
// maps iTAC namespace conform type to ASM namespace type
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide get(BoardSide itacBoardSide)
|
|
{
|
|
if (itacBoardSide == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide asmBoardSide = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide();
|
|
mapItac2Asm(asmBoardSide, itacBoardSide);
|
|
return asmBoardSide;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide asmBoardSide, BoardSide itacBoardSide)
|
|
{
|
|
// skip property BoardDIB, declared in BoardSide
|
|
// skip readonly property ChildPanels
|
|
// skip property FiducialList, property in exclude list
|
|
// skip property FiducialList, declared in BoardSide
|
|
asmBoardSide.OffsetZeroPointX = itacBoardSide.OffsetZeroPointX;
|
|
asmBoardSide.OffsetZeroPointY = itacBoardSide.OffsetZeroPointY;
|
|
asmBoardSide.Omit = itacBoardSide.Omit;
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property Color, declared in BoardSide
|
|
// skip property CoordSys, declared in BoardSide
|
|
asmBoardSide.Standoff = itacBoardSide.Standoff;
|
|
asmBoardSide.PrintFrontLimit = itacBoardSide.PrintFrontLimit;
|
|
asmBoardSide.PrintRearLimit = itacBoardSide.PrintRearLimit;
|
|
// skip property String, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// complex property DefaultBoardOrientation, isArray:False, isGeneric:False
|
|
itacBoardSide.DefaultBoardOrientation = com.itac.oib.siplacepro.contracts.types.BoardOrientationMapper.get( asmBoardSide.DefaultBoardOrientation);
|
|
// skip property String, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
// skip property GerberData, declared in BoardSide
|
|
// skip property Boolean, property in exclude list
|
|
// skip property SupportPinList, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
asmBoardSide.BoardGrouping = itacBoardSide.BoardGrouping;
|
|
asmBoardSide.ProductGroupName = itacBoardSide.ProductGroupName;
|
|
// skip property String, property in exclude list
|
|
// skip property PositionCorrectionMethod, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property BoardSideProductionSequence, declared in BoardSide
|
|
asmBoardSide.CountAsAssembledPCB = itacBoardSide.CountAsAssembledPCB;
|
|
// skip property BoardWeightClass, property in exclude list
|
|
// skip property Int32, property in exclude list
|
|
asmBoardSide.BarcodeLocatedOnTheOtherSide = itacBoardSide.BarcodeLocatedOnTheOtherSide;
|
|
// skip property FiducialList, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
asmBoardSide.Mirrored = itacBoardSide.Mirrored;
|
|
// skip property ArrayList, property in exclude list
|
|
// skip property String, property in exclude list
|
|
// skip property FiducialPlacement, declared in BoardSide
|
|
// skip readonly property BoardSideType
|
|
// skip readonly property SubPanelCount
|
|
asmBoardSide.Name = itacBoardSide.Name;
|
|
// skip property FiducialPlacement, declared in BoardSide
|
|
// skip readonly property TotalPanelCount
|
|
// skip property Boolean, property in exclude list
|
|
// complex property PlacementList, isArray:False, isGeneric:False
|
|
itacBoardSide.PlacementList = com.itac.oib.siplacepro.contracts.data.PlacementListMapper.get( asmBoardSide.PlacementList);
|
|
asmBoardSide.IsBoardSideHeavy = itacBoardSide.IsBoardSideHeavy;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide[] get(BoardSide[] itacBoardSide)
|
|
{
|
|
if (itacBoardSide == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide[] asmBoardSide = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide[itacBoardSide.Length];
|
|
for (int i = 0; i < itacBoardSide.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmBoardSide[i] = BoardSideMapper.get(itacBoardSide[i]);
|
|
}
|
|
return asmBoardSide;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide> getList(BoardSide[] asmBoardSide)
|
|
{
|
|
if (asmBoardSide == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide> itacBoardSide = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide>();
|
|
for (int i = 0; i < asmBoardSide.Length; i++)
|
|
{
|
|
itacBoardSide.Add(BoardSideMapper.get(asmBoardSide[i]));
|
|
}
|
|
return itacBoardSide;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static BoardSide get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide asmBoardSide)
|
|
{
|
|
if (asmBoardSide == null) { return null; }
|
|
BoardSide itacBoardSide = new BoardSide();
|
|
mapAsm2Itac(asmBoardSide, itacBoardSide);
|
|
return itacBoardSide;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide asmBoardSide, BoardSide itacBoardSide)
|
|
{
|
|
// skip property BoardDIB, declared in BoardSide
|
|
// assign Dictionary(): maps ASM Dictionary 2 iTAC dictionary
|
|
itacBoardSide.ChildPanels = getChildPanelsDictionary( asmBoardSide.ChildPanels);
|
|
// skip property FiducialList, property in exclude list
|
|
// skip property FiducialList, declared in BoardSide
|
|
itacBoardSide.OffsetZeroPointX = asmBoardSide.OffsetZeroPointX;
|
|
itacBoardSide.OffsetZeroPointY = asmBoardSide.OffsetZeroPointY;
|
|
itacBoardSide.Omit = asmBoardSide.Omit;
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property Color, declared in BoardSide
|
|
// skip property CoordSys, declared in BoardSide
|
|
itacBoardSide.Standoff = asmBoardSide.Standoff;
|
|
itacBoardSide.PrintFrontLimit = asmBoardSide.PrintFrontLimit;
|
|
itacBoardSide.PrintRearLimit = asmBoardSide.PrintRearLimit;
|
|
// skip property String, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
itacBoardSide.DefaultBoardOrientation = com.itac.oib.siplacepro.contracts.types.BoardOrientationMapper.get(asmBoardSide.DefaultBoardOrientation);
|
|
// complex asm property DefaultBoardOrientation
|
|
// skip property String, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
// skip property GerberData, declared in BoardSide
|
|
// skip property Boolean, property in exclude list
|
|
// skip property SupportPinList, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property Double, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
itacBoardSide.BoardGrouping = asmBoardSide.BoardGrouping;
|
|
itacBoardSide.ProductGroupName = asmBoardSide.ProductGroupName;
|
|
// skip property String, property in exclude list
|
|
// skip property PositionCorrectionMethod, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
// skip property BoardSideProductionSequence, declared in BoardSide
|
|
itacBoardSide.CountAsAssembledPCB = asmBoardSide.CountAsAssembledPCB;
|
|
// skip property BoardWeightClass, property in exclude list
|
|
// skip property Int32, property in exclude list
|
|
itacBoardSide.BarcodeLocatedOnTheOtherSide = asmBoardSide.BarcodeLocatedOnTheOtherSide;
|
|
// skip property FiducialList, property in exclude list
|
|
// skip property Boolean, property in exclude list
|
|
// skip property ListProxy`1, property in exclude list
|
|
itacBoardSide.Mirrored = asmBoardSide.Mirrored;
|
|
// skip property ArrayList, property in exclude list
|
|
// skip property String, property in exclude list
|
|
// skip property FiducialPlacement, declared in BoardSide
|
|
itacBoardSide.BoardSideType = com.itac.oib.siplacepro.contracts.types.BoardSideMapper.get(asmBoardSide.BoardSideType);
|
|
// complex asm property BoardSideType
|
|
itacBoardSide.SubPanelCount = asmBoardSide.SubPanelCount;
|
|
itacBoardSide.Name = asmBoardSide.Name;
|
|
// skip property FiducialPlacement, declared in BoardSide
|
|
itacBoardSide.TotalPanelCount = asmBoardSide.TotalPanelCount;
|
|
// skip property Boolean, property in exclude list
|
|
itacBoardSide.PlacementList = com.itac.oib.siplacepro.contracts.data.PlacementListMapper.get(asmBoardSide.PlacementList);
|
|
// complex asm property PlacementList
|
|
itacBoardSide.IsBoardSideHeavy = asmBoardSide.IsBoardSideHeavy;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static BoardSide[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide> asmBoardSide)
|
|
{
|
|
if (asmBoardSide == null) { return null; }
|
|
BoardSide[] itacBoardSide = new BoardSide[asmBoardSide.Count];
|
|
for (int i = 0; i < asmBoardSide.Count; i++)
|
|
{
|
|
itacBoardSide[i] = BoardSideMapper.get(asmBoardSide[i]);
|
|
}
|
|
return itacBoardSide;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static BoardSide[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.BoardSide[] asmBoardSide)
|
|
{
|
|
if (asmBoardSide == null) { return null; }
|
|
BoardSide[] itacBoardSide = new BoardSide[asmBoardSide.Length];
|
|
for (int i = 0; i < asmBoardSide.Length; i++)
|
|
{
|
|
itacBoardSide[i] = BoardSideMapper.get(asmBoardSide[i]);
|
|
}
|
|
return itacBoardSide;
|
|
}
|
|
|
|
// original declaration: Asm.As.Oib.SiplacePro.Proxy.Architecture.Collections.DictionaryProxy`2[System.String,Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PanelMatrix]
|
|
// generate key / value array for dictionary
|
|
// generated dictionary mapper
|
|
private static Dictionary<String, PanelMatrix> getChildPanelsDictionary(IDictionary<String, Asm.As.Oib.SiplacePro.Proxy.Business.Objects.PanelMatrix> childPanels)
|
|
{
|
|
Dictionary <String, PanelMatrix> result = new Dictionary<String, PanelMatrix>();
|
|
foreach (String key in childPanels.Keys)
|
|
{
|
|
result.Add(key, com.itac.oib.siplacepro.contracts.data.PanelMatrixMapper.get(childPanels[key]));
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
}
|