VR-Forces 4.0.4 Class Documentation
include/bhaveMsgs/ifSpawnList.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2012 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00006 #pragma once
00007 
00008 #include <vrfExtProtocol/ifaceCont.h>
00009 #include "bhaveMsgs/bhaveMsgsDefines.h"
00010 #include <vector>
00011 #include <vrfmsgs/rwSpawnDataList.h>
00012 //#include <vrfmsgs/rwSpawnData.h>
00013 
00014 namespace BHAVE
00015 {
00016    struct SpawnTemplateListEntry
00017    {
00018       DtString       myName;
00019       DtString       myDescription;
00020       unsigned int   mySpawnPtsCount;
00021       unsigned int   mySinkPtsCount;
00022 
00023       bool operator==(const SpawnTemplateListEntry& rhs) const
00024       {
00025          return ((myName == rhs.myName) && (myDescription == rhs.myDescription) &&
00026             (mySpawnPtsCount == rhs.mySpawnPtsCount) && (mySinkPtsCount == rhs.mySinkPtsCount));
00027       }
00028 
00029       bool operator!=(const SpawnTemplateListEntry& rhs) const
00030       {
00031          return !(*this == rhs);
00032       }
00033    };
00034 
00036    typedef std::vector<SpawnTemplateListEntry> SpawnTemplateDescriptionList;
00037 
00041    class DT_DLL_bhaveMsgs DtIfSpawnList : public DtSimInterfaceContent
00042    {
00043 
00044    public:
00045 
00047       DtIfSpawnList();
00048 
00050       DtIfSpawnList(const DtIfSpawnList & orig);
00051 
00053       const DtIfSpawnList & operator=(const DtIfSpawnList & orig);
00054 
00056       virtual ~DtIfSpawnList();
00057 
00059       virtual int type() const;
00060 
00062       virtual DtSimInterfaceContent * clone() const;
00063 
00066       const SpawnTemplateDescriptionList& spawnTemplateAndDescriptionList()
00067          const;
00069 
00072       virtual void addTemplateEntry(DtRwSpawnData * spawnTemplate,unsigned int spawnPointCount);
00073 
00074       virtual int netRepSize() const;
00075 
00076       virtual bool setFromNet(const char* contentBuffer, unsigned contentSize);
00077 
00078       virtual bool setToNet();
00079 
00080       virtual void printDataToString(DtString& str);
00081 
00082       static DtSimInterfaceContent* creator();
00083 
00084    protected:
00085 
00086       SpawnTemplateDescriptionList mySpawnTemplateList;
00087    };
00088 
00089 } 
00090 

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)