Pol  Revision:cb584c9
vital.h
Go to the documentation of this file.
1 
8 #ifndef VITAL_H
9 #define VITAL_H
10 
11 #include <string>
12 #include <vector>
13 
14 namespace Pol
15 {
16 namespace Clib
17 {
18 class ConfigElem;
19 }
20 namespace Plib
21 {
22 class Package;
23 }
24 namespace Core
25 {
26 class ExportedFunction;
27 
28 class Vital
29 {
30 public:
31  Vital( const Plib::Package* pkg, Clib::ConfigElem& elem );
32  ~Vital();
33  size_t estimateSize() const;
34 
36  std::string name;
37  std::vector<std::string> aliases; // aliases[0] is always name
38  unsigned vitalid;
40 
45 };
46 
47 Vital* FindVital( const std::string& vitalname );
48 Vital* FindVital( unsigned vitalid );
49 void clean_vitals();
50 
51 const int VITAL_LOWEST_REGENRATE = -30000;
52 const int VITAL_HIGHEST_REGENRATE = 30000;
53 
54 // const unsigned VITAL_MIN_VALUE = 0; // currently not needed
55 const unsigned VITAL_MAX_VALUE = 100000L;
56 
57 const unsigned int VITAL_MAX_HUNDREDTHS = 10000000L; // 10,000,000 hundredths = 100,000.00
58 
59 const unsigned int VITAL_LOWEST_MAX_HUNDREDTHS = 100L; // 100 hundredths = 1.00
60 const unsigned int VITAL_HIGHEST_MAX_HUNDREDTHS = 10000000L; // 10,000,000 hundredths = 100,000.00
61 }
62 }
63 #endif
const int VITAL_LOWEST_REGENRATE
Definition: vital.h:51
const unsigned int VITAL_LOWEST_MAX_HUNDREDTHS
Definition: vital.h:59
bool regen_while_dead
Definition: vital.h:44
Vital * FindVital(const std::string &str)
Definition: vital.cpp:83
std::string name
Definition: vital.h:36
void clean_vitals()
Definition: vital.cpp:71
ExportedFunction * get_maximum_func
Definition: vital.h:42
ExportedFunction * get_regenrate_func
Definition: vital.h:41
const int VITAL_HIGHEST_REGENRATE
Definition: vital.h:52
const Plib::Package * pkg
Definition: vital.h:35
std::vector< std::string > aliases
Definition: vital.h:37
ExportedFunction * underflow_func
Definition: vital.h:43
Vital * next
Definition: vital.h:39
unsigned vitalid
Definition: vital.h:38
Definition: berror.cpp:12
const unsigned VITAL_MAX_VALUE
Definition: vital.h:55
const unsigned int VITAL_HIGHEST_MAX_HUNDREDTHS
Definition: vital.h:60
const unsigned int VITAL_MAX_HUNDREDTHS
Definition: vital.h:57