VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
powerRangeDeterminantList.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <readerWriter/rwList.h>
13 
16 
19 {
20 public:
21 
24 
28  parentRegistry = NULL);
30  parentRegistry = NULL);
32 
35  DtPowerRangeDeterminantList(const DtString& name, const
37  parentRegistry = NULL);
40  parentRegistry = NULL);
42 
44  virtual bool removePower(const DtString&);
45 
47  virtual bool hasPower(const DtString&) const;
48 
50  bool operator==(const DtPowerRangeDeterminantList& rhs) const;
51  bool operator!=(const DtPowerRangeDeterminantList& rhs) const
52  {
53  return !(*this == rhs);
54  }
55 
57  virtual ~DtPowerRangeDeterminantList();
58 
59  virtual DtPowerRangeDeterminantList* clone(const DtString& surface,
60  DtReaderWriterRegistry* parentRegistry = NULL) const;
61  virtual DtPowerRangeDeterminantList* clone(const DtSymbolString& surface,
62  DtReaderWriterRegistry* parentRegistry = NULL) const;
63 
65  virtual DtPowerRangeDeterminant* addDetonationPower(const DtPowerRangeDeterminant& power);
66 
68  virtual const DtPowerRangeDeterminant* findDetonationPower(const DtString& powerType) const;
69 
72  virtual double detonationPower(const DtString& powerType, double rangeFromShooter, double rangeFromImpact) const;
73 
76  virtual double rangeFromShooterForPower(const DtString& powerType, double power) const;
77 
80  virtual double rangeFromImpactForPower(const DtString& powerType, double power) const;
81 
83  virtual double maximumRangeFromShooter(const DtString& powerType) const;
84 
86  virtual double maximumRangeFromImpact(const DtString& powerType) const;
87 
89  static void setFactory(DtPowerRangeDeterminantFactory* factory);
90 
94 
95 protected:
96 
98  virtual DtPowerRangeDeterminant* createDeterminant(const DtString& determinantType);
99 
102  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
103  const DtVariableBindingsList& variableBindings);
104 
105  virtual void emptyList();
106  virtual void copyList(const DtPowerRangeDeterminantList & orig);
107  virtual void addDetonationPower(DtPowerRangeDeterminant* power);
108 
109 protected:
110 
113 };
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
A Readable, Writable version of DtList. This class cannot be used directly, but must be inherited to ...
Definition: rwList.h:26
#define DT_DLL_vrfobjparam
This file is used to determine how to build.
Definition: vrfobjparamDefines.h:28
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)=0
This method must be overridden by a subclass. Within this method, new instances of the DtReaderWriter...
Definition: readerWriterRegistry.h:39
A readable/writable object that indicates the power of a detonation of a given type, potentially at different ranges from the point of impact.
Definition: powerRangeDeterminant.h:17
static DtReaderWriterFactory * factory()
Factory for creating power range determinants.
Definition: powerRangeDeterminant.h:117
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
A readable/writable list of detonation powers listed by type.
Definition: powerRangeDeterminantList.h:18
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
bool operator==(const DtRwList &rhs) const
Iterates over all items and calls the factory to compare.
const DtRwList & operator=(const DtRwList &orig)
Calls down to DtReaderWriter::operator=(). List elements are not copied.
static DtPowerRangeDeterminantFactory * theFactory
Static pointer to the factory for for power determinants.
Definition: powerRangeDeterminantList.h:112
bool operator!=(const DtPowerRangeDeterminantList &rhs) const
Definition: powerRangeDeterminantList.h:51

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)