VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwIntelCollectionArea.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2013 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfutil/vrfutilDefines.h"
13 #include "vrfutil/vrfRwTypes.h"
14 
21 
23 {
24 public:
25 
28  {
29  }
30 
32  DtRwIntelCollectionArea(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
33  : DtRwTemplatedRealList(name, parentRegistry)
34  {
35  }
36 
39  {
40  }
41 
44  const DtRwIntelCollectionArea& orig,
45  DtReaderWriterRegistry* const parentRegistry = NULL)
46  : DtRwTemplatedRealList(name, orig, parentRegistry)
47  {
48  }
49 
52  {
54 
55  return *this;
56  }
57 
61  virtual const char* readerWriterType() const
62  {
64  }
65 
67  static const char* theXmlType()
68  {
70  }
71 
72  virtual const char* xmlType() const
73  {
74  return theXmlType();
75  }
76 
77  virtual double modifierForForce(int force)
78  {
79  DtIteratorBase<DtRwReal> iter(*this);
80  double baseModifier = 1.0;
81 
82  while (iter.current())
83  {
84  int modForce = atoi(iter.current()->name().c_str());
85 
86  if (modForce == -1)
87  {
88  baseModifier = *(iter.current());
89  }
90  else if (modForce == force)
91  {
92  return *(iter.current());
93  }
94  ++iter;
95  }
96 
97  return baseModifier;
98  }
99 };
virtual T * current()
Definition: iteratorBase.h:330
DtRwIntelCollectionArea(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
constructor
Definition: rwIntelCollectionArea.h:32
DtRwTemplatedListPtr & operator=(const DtRwTemplatedListPtr &orig)
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
Definition: rwIntelCollectionArea.h:61
Definition: rwTemplatedList.h:240
static const char * theXmlType()
The type that is used when archiving to an XML stream.
Definition: rwIntelCollectionArea.h:67
DtRwIntelCollectionArea(const DtString &name, const DtRwIntelCollectionArea &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwIntelCollectionArea.h:43
static const char * theXmlType()
Definition: rwTemplatedList.h:109
Definition: readerWriterRegistry.h:39
const char DtRwIntelCollectionAreaType[]
Definition: vrfRwTypes.h:88
Description: DtIteratorBase is the base class for iterators used to iterate over a DtList...
Definition: iteratorBase.h:32
const char * c_str() const
class DtRwIntelCollectionArea:
Definition: rwIntelCollectionArea.h:22
DtRwIntelCollectionArea()
default constructor
Definition: rwIntelCollectionArea.h:27
DtRwIntelCollectionArea & operator=(const DtRwIntelCollectionArea &orig)
assignment operator
Definition: rwIntelCollectionArea.h:51
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
virtual double modifierForForce(int force)
Definition: rwIntelCollectionArea.h:77
virtual ~DtRwIntelCollectionArea()
destructor
Definition: rwIntelCollectionArea.h:38
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: rwIntelCollectionArea.h:72
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.

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)