VR-Forces 4.7 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) 2018 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
6
#pragma once
7
8
#include <vlutil/vlMachineTypes.h>
9
#include <
readerWriter/rwInt.h
>
10
#include "
vrfutil/simResource.h
"
11
16
#include "
vrfutil/vrfutilDefines.h
"
17
class
DT_DLL_vrfutil
DtIntegerResource
:
public
DtSimResource
18
{
19
20
public
:
21
23
DtIntegerResource
();
24
29
DtIntegerResource
(
const
DtString
& resourceName,
DtReaderWriterRegistry
*
30
parentRegistry = NULL);
31
33
DtIntegerResource
(
const
DtIntegerResource
& orig,
DtReaderWriterRegistry
*
34
parentRegistry = 0);
35
37
DtIntegerResource
&
operator=
(
const
DtIntegerResource
& orig);
38
39
public
:
41
virtual
~
DtIntegerResource
();
42
44
virtual
void
updateAmountFromChildren
();
45
48
virtual
void
updateFullAmountFromChildren
();
49
51
virtual
DtSimResource
*
clone
(
DtReaderWriterRegistry
* parentRegistry = 0)
52
const
;
53
55
virtual
DtString
type
()
const
;
56
58
virtual
void
distributeAmountToChildren
();
59
62
virtual
void
distributeFullAmountToChildren
();
63
66
virtual
void
setAmount(
int
amount);
67
virtual
int
amount()
const
;
68
70
virtual
void
deplete(
int
amount = 1);
71
74
virtual
void
replenish(
int
amount = 1);
75
76
virtual
void
setFullAmount(
int
fullAmount);
77
virtual
int
fullAmount()
const
;
78
79
virtual
DtReal
percentageFull
()
const
;
80
virtual
void
setPercentageFull
(DtReal percent);
81
84
virtual
int
constrainAmount(
int
amount)
const
;
85
86
static
DtSimResource
* creator();
87
90
virtual
bool
isEqual
(
const
DtSimResource
& res)
const
;
91
94
virtual
void
merge
(
const
DtSimResource
*);
95
96
protected
:
97
98
DtRwInt
myAmount
;
99
DtRwInt
myFullAmount
;
100
101
};
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)