VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weaponListResponseAdmin.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrftasks/adminContent.h"
14 #include <list>
15 
18 {
25 };
26 
28  {
31  std::list<DtString> myResources;
32  bool operator==(const WeaponSystem& rhs) const
33  {
34  return ((myWeaponName == rhs.myWeaponName) && (myWeaponType == rhs.myWeaponType) && (myResources == rhs.myResources) );
35  }
36 
37  bool operator!=(const WeaponSystem& rhs) const
38  {
39  return !(*this == rhs);
40  }
41  };
42 
43 typedef std::list<WeaponSystem> DtWeaponList;
44 
48 {
49 public:
50 
53 
56 
60 
62  virtual ~DtWeaponListResponseAdmin();
63 
65  static DtAdminContent* create();
66 
68  virtual bool init();
69 
71  virtual const DtAdminContentMessageType& type() const;
72 
74 
75  virtual const DtWeaponList& weaponSystems() const;
76  virtual DtWeaponList& weaponSystems();
78 
81  virtual void addWeaponSystem(const DtString& modeName,DtWeaponSystemType systemType,std::list<DtString>& resourceList);
83  virtual void clearWeaponSystems();
84 
87  virtual DtAdminContent* clone() const;
88 
90  virtual DtString stringRep() const;
91 
93  virtual int netRepSize() const;
94 
96  virtual bool setFromNet(const char* contentBuffer,
97  unsigned contentSize);
98 
100  virtual bool setToNet();
101 
102 protected:
105 };
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets the contents of this set request based on the network buffer. Base class does nothing and return...
bool operator!=(const WeaponSystem &rhs) const
Definition: weaponListResponseAdmin.h:37
Definition: weaponListResponseAdmin.h:22
Admin content which contains the list of weapon systems on an entity. This is the response to the DtR...
Definition: weaponListResponseAdmin.h:47
virtual int netRepSize() const
bool operator==(const WeaponSystem &rhs) const
Definition: weaponListResponseAdmin.h:32
Definition: weaponListResponseAdmin.h:23
virtual DtAdminContent * clone() const =0
Make a copy of this content. Returns a pointer to a newly created copy of this class. Derived classes must override this function to create and return an instance of the derived type.
DtString myWeaponName
Definition: weaponListResponseAdmin.h:29
Definition: vrfObjectMessageTypeTemplate.h:24
DtWeaponSystemType
This now allows us to query the backend for specific types of weapons.
Definition: weaponListResponseAdmin.h:17
const DtAdminContent & operator=(const DtAdminContent &orig)
assignment operator; same as copy costructor.
Definition: weaponListResponseAdmin.h:20
std::list< DtString > myResources
Definition: weaponListResponseAdmin.h:31
Definition: weaponListResponseAdmin.h:21
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
std::list< WeaponSystem > DtWeaponList
Definition: weaponListResponseAdmin.h:43
virtual bool init()
Base class init does nothing, but this will be called by create, in case any other deriving class nee...
DtAdminContent.
Definition: adminContent.h:23
virtual const DtAdminContentMessageType & type() const =0
Definition: weaponListResponseAdmin.h:24
DtWeaponList myWeaponSystems
The list of weapon system names.
Definition: weaponListResponseAdmin.h:104
Definition: weaponListResponseAdmin.h:27
virtual bool setToNet()
Sets netRep buffer to the contents of this set request. Base class does nothing and returns true...
virtual DtString stringRep() const =0
Get a readable string representation of this content. Derived classes must implement this function...
DtWeaponSystemType myWeaponType
Definition: weaponListResponseAdmin.h:30
Definition: weaponListResponseAdmin.h:19

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)