[Avida-cvs] [avida-svn] r943 - development/source/main
goingssh at myxo.css.msu.edu
goingssh at myxo.css.msu.edu
Mon Sep 11 14:30:22 PDT 2006
Author: goingssh
Date: 2006-09-11 17:30:22 -0400 (Mon, 11 Sep 2006)
New Revision: 943
Added:
development/source/main/cSaleItem.h
Log:
Market Economy forgot to add cSaleItem.h to repository, adding now.
Added: development/source/main/cSaleItem.h
===================================================================
--- development/source/main/cSaleItem.h 2006-09-11 21:27:27 UTC (rev 942)
+++ development/source/main/cSaleItem.h 2006-09-11 21:30:22 UTC (rev 943)
@@ -0,0 +1,50 @@
+#ifndef cSaleItem_h
+#define cSaleItem_h
+
+#ifndef cOrganism_H
+#include "cOrganism.h"
+#endif
+
+class cSaleItem
+ {
+ private:
+ int m_data;
+ int m_label;
+ int m_price;
+ int m_org_id;
+ int m_cell_id;
+ tListNode<tListNode<cSaleItem> >* m_nodeptr;
+
+ public:
+ cSaleItem() : m_data(0), m_label(0), m_price(0), m_org_id(0), m_cell_id(0) { ; }
+ cSaleItem(const int in_data, const int in_label, const int in_price,
+ const int in_org_id, const int in_cell_id) :
+ m_data(in_data),
+ m_label(in_label),
+ m_price(in_price),
+ m_org_id(in_org_id),
+ m_cell_id(in_cell_id)
+ {}
+
+ ~cSaleItem()
+ {
+ }
+ int GetData() { return m_data; }
+ void SetData(const int in_data) { m_data = in_data; }
+ int GetLabel() { return m_label; }
+ void SetLabel(const int in_label) { m_label = in_label; }
+ int GetPrice() { return m_price; }
+ void SetPrice(const int in_price) { m_price = in_price; }
+ int GetOrgID() { return m_org_id; }
+ int GetCellID() { return m_cell_id; }
+ void SetNodePtr(tListNode<tListNode<cSaleItem> >* in_nodeptr) {
+ m_nodeptr = in_nodeptr; }
+ tListNode<tListNode<cSaleItem> >* GetNodePtr() { return m_nodeptr; }
+ bool operator == (cSaleItem &rhs)
+ {
+ return ( (m_data == rhs.GetData()) && (m_label == rhs.GetLabel()) &&
+ (m_org_id == rhs.GetOrgID()) && (m_price == rhs.GetPrice()) &&
+ (m_cell_id == rhs.GetCellID()));
+ }
+ };
+#endif
More information about the Avida-cvs
mailing list