VR-Forces 4.6.1 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 
11 #include <vrfutil/readerWriter.h>
12 #include <vrfutil/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 
48  virtual ~DtPowerRangeDeterminant();
49 
50  virtual DtPowerRangeDeterminant* clone(const DtString& name,
51  DtReaderWriterRegistry* parentRegistry = NULL) const = 0;
52  virtual DtPowerRangeDeterminant* clone(const DtSymbolString& name,
53  DtReaderWriterRegistry* parentRegistry = NULL) const = 0;
54 
57  virtual void postGetSelf();
58 
62  virtual const DtString& rangeFrom() const;
63 
65  virtual DtString powerType() const;
66 
68  virtual double detonationPower(double rangeFromShooter, double rangeFromImpact) const = 0;
69 
71  virtual double rangeFromShooterForPower(double power) const = 0;
72 
74  virtual double rangeFromImpactForPower(double power) const = 0;
75 
77  virtual double maximumRangeFromShooter() const = 0;
78 
80  virtual double maximumRangeFromImpact() const = 0;
81 
82 protected:
83 
86  virtual void validateRangeFrom() = 0;
87 
90 
101 
103 
104 };
105 
106 typedef DtPowerRangeDeterminant* (*DtPowerRangeDeterminantCreatorFcn)();
107 
110 {
111 public:
114 
117 
119  virtual void addCreatorFcn(const DtString& type, DtPowerRangeDeterminantCreatorFcn fcn);
120 
121  virtual DtPowerRangeDeterminant* createPowerRangeDeterminant(const DtString& type);
122 
123 private:
128 
129 protected:
130  typedef std::map<DtString, DtPowerRangeDeterminantCreatorFcn> DtPowerRangeDeterminantCreatorMap;
132 
133 };

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)