summaryrefslogtreecommitdiff
path: root/src/search/Save.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-26 01:13:33 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-26 01:13:33 (GMT)
commit9e1be78bc21d1fb76a19ce12ef36193aea6e2b93 (patch)
tree081b67d551bb44fecbf6deb99b6c44ea9789614c /src/search/Save.h
parentb2d3257ae944a3ea3b57dc8ee4171b1b2f85483e (diff)
downloadpowder-9e1be78bc21d1fb76a19ce12ef36193aea6e2b93.zip
powder-9e1be78bc21d1fb76a19ce12ef36193aea6e2b93.tar.gz
I've got to a point where I can no longer be bothered to think of a proper commit comment
Diffstat (limited to 'src/search/Save.h')
-rw-r--r--src/search/Save.h59
1 files changed, 24 insertions, 35 deletions
diff --git a/src/search/Save.h b/src/search/Save.h
index 0a011ab..3186e2a 100644
--- a/src/search/Save.h
+++ b/src/search/Save.h
@@ -2,6 +2,9 @@
#define SAVE_H
#include <string>
+#include <stdlib.h>
+#include <iostream>
+#include <string.h>
using namespace std;
@@ -9,57 +12,43 @@ class Save
{
private:
int id;
+ int date;
int votesUp, votesDown;
unsigned char * data;
+ int dataLength;
public:
- Save(int _id, int _votesUp, int _votesDown, string _userName, string _name):
- id(_id),
- votesUp(_votesUp),
- votesDown(_votesDown),
- userName(_userName),
- name(_name),
- Description("No description provided"),
- Date("0/0/0"),
- Published(true)
- {
- }
-
- Save(int _id, int _votesUp, int _votesDown, string _userName, string _name, string description_, string date_, bool published_):
- id(_id),
- votesUp(_votesUp),
- votesDown(_votesDown),
- userName(_userName),
- name(_name),
- Description(description_),
- Date(date_),
- Published(published_)
- {
- }
+ Save(Save & save);
+
+ Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name);
+
+ Save(int _id, int date_, int _votesUp, int _votesDown, string _userName, string _name, string description_, bool published_);
string userName;
string name;
string Description;
- string Date;
bool Published;
- void SetName(string name){ this->name = name; }
- string GetName(){ return name; }
+ void SetName(string name);
+ string GetName();
+
+ void SetUserName(string userName);
+ string GetUserName();
- void SetUserName(string userName){ this->userName = userName; }
- string GetUserName(){ return userName; }
+ void SetID(int id);
+ int GetID();
- void SetID(int id){ this->id = id; }
- int GetID(){ return id; }
+ void SetVotesUp(int votesUp);
+ int GetVotesUp();
- void SetVotesUp(int votesUp){ this->votesUp = votesUp; }
- int GetVotesUp(){ return votesUp; }
+ void SetVotesDown(int votesDown);
+ int GetVotesDown();
- void SetVotesDown(int votesDown){ this->votesDown = votesDown; }
- int GetVotesDown(){ return votesDown; }
+ unsigned char * GetData();
+ void SetData(unsigned char * data_);
- unsigned char * GetData() { return data; }
+ int GetDataLength();
};
#endif // SAVE_H