VR-Forces 4.0.4 Class Documentation
include/vrfExtProtocol/rangeItem.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2011 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: rangeItem.h,v $ $Revision: 1.16 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 #pragma once
00010 
00011 #include <vlpi/NetStructs.h>
00012 #include <vector>
00013 
00014 // class DtRangeItem:
00015 //
00016 // Item that will define a range object used in the system
00017 
00019 const int RangeItemUnknown = 0;
00020 const int RangeItemBallisticGun = 1;
00021 const int RangeItemIndirectFire = 2;
00022 const int RangeItemMissileSystem = 3;
00023 
00024 #include <vrfExtProtocol/vrfExtProtocolDefines.h>
00025 class DT_DLL_vrfExtProtocol DtRangeItem
00026 {
00027 public:
00028 
00029    // default constructor
00030    DtRangeItem();
00031 
00032    // destructor
00033    virtual ~DtRangeItem();
00034 
00035    // copy constructor
00036    DtRangeItem(const DtRangeItem& orig);
00037 
00038    // assignment operator
00039    DtRangeItem& operator=(const DtRangeItem& orig);
00040 
00041    virtual const char* setFromNet(const char* buffer);
00042    virtual char* setToNet(char* buffer) const;
00043 
00044    virtual int netRepSize() const;
00045 
00046    bool operator==(const DtRangeItem& rhs) const
00047    {
00048       return ((myRange == rhs.myRange) &&
00049               (myType == rhs.myType) &&
00050               (myName == rhs.myName) &&
00051               (myOffsetPosition[0] == rhs.myOffsetPosition[0]) &&
00052               (myOffsetPosition[1] == rhs.myOffsetPosition[1]) &&
00053               (myOffsetPosition[2] == rhs.myOffsetPosition[2]));
00054    }
00055 
00056    DtNetFloat32 myRange;
00057    DtNetInt32 myType;
00058    DtNet64Vector myOffsetPosition;
00059    DtString myName;
00060 };
00061 
00062 class DT_DLL_vrfExtProtocol DtRangeItems
00063 {
00064 public:
00065    virtual ~DtRangeItems();
00066 
00067    virtual int netRepSize() const;
00068    virtual char* setFromNet(const char* buffer);
00069    virtual char* setToNet(char* buffer) const;
00070  
00071    typedef std::vector<DtRangeItem> RangeItems;
00072 
00073    RangeItems myRangeItems;
00074 };

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)