VR-Forces 4.1.1 Class Documentation
intRsrc.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 intRsrc_H_
17 #define intRsrc_H_
18 
19 #include <vlutil/vlMachineTypes.h>
20 #include "vrfutil/rwInt.h"
21 #include "vrfutil/simRsrc.h"
22 
23 
24 
29 #include "vrfutil/vrfutilDefines.h"
31 {
32 
33 public:
34 
37 
43  parentRegistry = NULL);
44 
47  parentRegistry = 0);
48 
49 protected:
52 
53 public:
55  virtual ~DtIntegerResource();
56 
58  virtual void updateAmountFromChildren();
59 
62  virtual void updateFullAmountFromChildren();
63 
65  virtual DtSimResource * clone(DtReaderWriterRegistry* parentRegistry = 0)
66  const;
67 
69  virtual DtString type() const;
70 
72  virtual void distributeAmountToChildren();
73 
76  virtual void distributeFullAmountToChildren();
77 
80  virtual void setAmount(int amount);
81  virtual int amount() const;
82 
84  virtual void deplete(int amount = 1);
85 
88  virtual void replenish(int amount = 1);
89 
90  virtual void setFullAmount(int fullAmount);
91  virtual int fullAmount() const;
92 
93  virtual DtReal percentageFull() const;
94  virtual void setPercentageFull(DtReal percent);
95 
98  virtual int constrainAmount(int amount) const;
99 
100  static DtSimResource* creator();
101 
104  virtual bool isEqual(const DtSimResource& res) const;
105 
106 protected:
107 
110 
111 };
112 
113 #endif

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)