VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrfutil
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
"
30
class
DT_DLL_vrfutil
DtIntegerResource
:
public
DtSimResource
31
{
32
33
public
:
34
36
DtIntegerResource
();
37
42
DtIntegerResource
(
const
DtString
& resourceName,
DtReaderWriterRegistry
*
43
parentRegistry = NULL);
44
46
DtIntegerResource
(
const
DtIntegerResource
& orig,
DtReaderWriterRegistry
*
47
parentRegistry = 0);
48
50
DtIntegerResource
&
operator=
(
const
DtIntegerResource
& orig);
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
107
DtRwInt
myAmount
;
108
DtRwInt
myFullAmount
;
109
110
};
111
112
#endif
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)