VR-Forces 4.0.4 Class Documentation
include/vrfmsgs/ifHostilityMatrix.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: ifHostilityMatrix.h,v $ $Revision: 1.2 $ $State: Exp $
00007 ** Created: 7/16/04, MEM Updated:
00008 *******************************************************************************/
00009 
00012 
00013 
00019 
00020 
00021 #ifndef ifHostilityMatrix_H_
00022 #define ifHostilityMatrix_H_
00023 
00024 #include <vrfExtProtocol/ifaceCont.h>
00025 #include <vlutil/vlString.h>
00026 #include <vlutil/vlNetTypes.h>
00027 #include <vl/hostStructs.h>
00028 
00029 #include <vector>
00030 
00031 struct DtNetIfHostityMatrix
00032 {
00033    DtNetU8 myNumForces;  //Number of Forces in matrix (n x n matrix)
00034    //list of force settings as chars
00035 };
00036 
00037 
00038 //forward defs
00039 typedef std::vector<bool> DtHostilityVector;
00040 typedef std::vector<DtHostilityVector> DtHostilityMatrix;
00041 typedef std::vector<DtString> DtNameVector;
00042 
00047 #include "vrfmsgs/vrfmsgsDefines.h"
00048 class DT_DLL_vrfmsgs DtIfHostilityMatrix : public DtSimInterfaceContent
00049 {
00050 
00051 public:      
00053    DtIfHostilityMatrix();
00054 
00056    DtIfHostilityMatrix(const DtIfHostilityMatrix & orig);
00057 
00059    const DtIfHostilityMatrix& operator=(const DtIfHostilityMatrix& orig);
00060 
00061    virtual ~DtIfHostilityMatrix();
00062 
00063    virtual int type() const;
00064 
00065    virtual DtSimInterfaceContent* clone() const;
00066 
00068    virtual int numberOfForces() const;
00069    virtual void setNumberOfForces(int num);
00070 
00071    //get the hostility list for the given force
00072    virtual const DtHostilityVector& hostilityVector(int force) const;
00073    virtual DtHostilityVector& hostilityVector(int force);
00074 
00075    //get the hostility list for the given force
00076    virtual const DtNameVector& nameVector() const;
00077    virtual DtNameVector& nameVector();
00078 
00079 
00080    virtual int netRepSize() const;
00081 
00082    virtual bool setFromNet(const char* contentBuffer, unsigned contentSize);
00083 
00084    virtual bool setToNet();
00085 
00087    virtual void printDataToString(DtString& str);
00088 
00089    static DtSimInterfaceContent* creator();
00090 
00091 protected:
00092   DtHostilityMatrix myHostilityMatrix;
00093   DtNameVector myNameVector;
00094 };
00095 
00096 #endif

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)