VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
powerRangeDeterminant.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 
12 #include <readerWriter/rwString.h>
14 
18 {
19 public:
20 
23  static const DtString DtRangeUnused;
25 
28 
32  parentRegistry = NULL);
34  parentRegistry = NULL);
36 
40  DtReaderWriterRegistry* parentRegistry = NULL);
42  DtReaderWriterRegistry* parentRegistry = NULL);
44 
46  virtual bool operator==(const DtPowerRangeDeterminant& rhs) const;
47  bool operator!=(const DtPowerRangeDeterminant& rhs) const
48  {
49  return !(*this == rhs);
50  }
51 
53  virtual ~DtPowerRangeDeterminant();
54 
55  virtual DtPowerRangeDeterminant* clone(const DtString& name,
56  DtReaderWriterRegistry* parentRegistry = NULL) const = 0;
57  virtual DtPowerRangeDeterminant* clone(const DtSymbolString& name,
58  DtReaderWriterRegistry* parentRegistry = NULL) const = 0;
59 
62  virtual void postGetSelf();
63 
67  virtual const DtString& rangeFrom() const;
68 
70  virtual void setRangeFrom(const DtString&);
71 
73  virtual DtString powerType() const;
74 
76  virtual double detonationPower(double rangeFromShooter, double rangeFromImpact) const = 0;
77 
79  virtual double rangeFromShooterForPower(double power) const = 0;
80 
82  virtual double rangeFromImpactForPower(double power) const = 0;
83 
85  virtual double maximumRangeFromShooter() const = 0;
86 
88  virtual double maximumRangeFromImpact() const = 0;
89 
90 protected:
91 
94  virtual void validateRangeFrom() = 0;
95 
98 
109 
111 
112 };
113 
114 typedef DtPowerRangeDeterminant* (*DtPowerRangeDeterminantCreatorFcn)();
115 
118 {
119 public:
122 
125 
127  virtual void addCreatorFcn(const DtString& type, DtPowerRangeDeterminantCreatorFcn fcn);
128 
129  virtual DtPowerRangeDeterminant* createPowerRangeDeterminant(const DtString& type);
130 
131 private:
136 
137 protected:
138  typedef std::map<DtString, DtPowerRangeDeterminantCreatorFcn> DtPowerRangeDeterminantCreatorMap;
140 
141 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)