VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
integerResource.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: intRsrc.h,v $ $Revision: 1.10 $ $State: Exp $
7 *******************************************************************************/
8 
12 
15 
16 #ifndef integerResource_H_
17 #define integerResource_H_
18 
19 #include <vlutil/vlMachineTypes.h>
20 #include "vrfutil/rwInt.h"
21 #include "vrfutil/simResource.h"
22 
23 
24 
29 #include "vrfutil/vrfutilDefines.h"
31 {
32 
33 public:
34 
37 
43  parentRegistry = NULL);
44 
47  parentRegistry = 0);
48 
51 
52 public:
54  virtual ~DtIntegerResource();
55 
57  virtual void updateAmountFromChildren();
58 
61  virtual void updateFullAmountFromChildren();
62 
64  virtual DtSimResource * clone(DtReaderWriterRegistry* parentRegistry = 0)
65  const;
66 
68  virtual DtString type() const;
69 
71  virtual void distributeAmountToChildren();
72 
75  virtual void distributeFullAmountToChildren();
76 
79  virtual void setAmount(int amount);
80  virtual int amount() const;
81 
83  virtual void deplete(int amount = 1);
84 
87  virtual void replenish(int amount = 1);
88 
89  virtual void setFullAmount(int fullAmount);
90  virtual int fullAmount() const;
91 
92  virtual DtReal percentageFull() const;
93  virtual void setPercentageFull(DtReal percent);
94 
97  virtual int constrainAmount(int amount) const;
98 
99  static DtSimResource* creator();
100 
103  virtual bool isEqual(const DtSimResource& res) const;
104 
105 protected:
106 
109 
110 };
111 
112 #endif

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)