MineLink
 All Data Structures Functions Variables Pages
stock.h
1 #ifndef __STOCK_H__
2 #define __STOCK_H__
3 
4 #include <string>
5 #include "named.h"
6 #include "../../utils/dict.h"
7 
8 using std::string;
9 namespace delphos{
20 class Stock : public Named, public Dict {
21 private:
22  string _tname;
23 public:
36  Stock(const string & stock_name, const string & tname, const double & tonnage);
37 
43  Stock(const Stock & other);
44 
50  virtual ~Stock();
51 
58  const double Tonnage() const;
59 
65  const double GetTonnage() const;
66 
73  const string TonnageAttributeName() const;
74 
80  const string GetTonnageAttributeName() const;
81 
86  void SetTonnage(const double & tonnage_value);
87 
88 };
89 }
90 #endif
91 
const string GetTonnageAttributeName() const
Return the name of the tonnage atribute of the stock.
Definition: stock.cpp:23
const double GetTonnage() const
Return the (initial) tonnage in the stock.
Definition: stock.cpp:31
const string TonnageAttributeName() const
Return the name of the tonnage atribute of the stock.
Definition: stock.cpp:19
Abstact a dictionary to store and get attributes.
Definition: dict.h:13
virtual ~Stock()
Destructor.
Definition: stock.cpp:16
const double Tonnage() const
Return the (initial) tonnage in the stock.
Definition: stock.cpp:27
void SetTonnage(const double &tonnage_value)
Set the tonnage value of the stock.
Definition: stock.cpp:35
Stock(const string &stock_name, const string &tname, const double &tonnage)
Creates a new stock with given name and tonnage.
Definition: stock.cpp:3
Defines a pre-existing stock.
Definition: stock.h:20