VR-Link API Documentation for HLA 1.3
burstDescriptor.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 #ifndef burstDescriptor_h_
00007 #define burstDescriptor_h_
00008 
00011 
00012 
00013 #include <vlutil/vlMachineTypes.h>
00014 #include "NetStructs.h"
00015 #include "disEnums.h"
00016 #include "entityType.h"
00017 
00018 class DT_DLL_VLPROTIND DtBurstDescriptor 
00019 {
00020   public:
00021     DtBurstDescriptor()
00022     {
00023       DtEntityType type;
00024       init(&type, DtWarheadOther, DtFuzeOther, 0, 0);
00025     }
00026 
00027     DtBurstDescriptor(const DtNetBurstDescriptor *netBurst)
00028     {
00029       DtEntityType type(netBurst->DtMunition);
00030       init(&type, 
00031          DtWarheadType((int)netBurst->DtWarhead),
00032          DtDetonatorFuze((int)netBurst->DtFuze),
00033          (int) netBurst->DtQuantity,
00034          (int) netBurst->DtRate);
00035     }
00036 
00037     DtBurstDescriptor(const DtEntityType *type, DtWarheadType warhead, 
00038        DtDetonatorFuze fuze, DtU16 quantity, DtU16 rate)
00039     {
00040       init(type, warhead, fuze, quantity, rate);
00041     }
00042     
00043     operator DtNetBurstDescriptor () const
00044     {
00045       DtNetBurstDescriptor b;
00046       b.DtMunition = DtMunition;
00047       b.DtWarhead = DtWarhead;
00048       b.DtFuze = DtFuze;
00049       b.DtQuantity = DtQuantity;
00050       b.DtRate = DtRate;
00051       return(b);
00052     }
00053 
00054     void init(const DtEntityType * type, DtWarheadType warhead, 
00055        DtDetonatorFuze fuze, int quantity, int rate)
00056     {
00057       DtMunition = *type;
00058       DtWarhead = warhead;
00059       DtFuze = fuze;
00060       DtQuantity = quantity;
00061       DtRate = rate;
00062     }
00063 
00064   public:
00065     DtEntityType    DtMunition;
00066     DtWarheadType   DtWarhead;
00067     DtDetonatorFuze DtFuze;
00068     int             DtQuantity;
00069     int             DtRate;
00070 };
00071 
00072 #endif
00073 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)