summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-07 15:16:54 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-07 15:16:54 (GMT)
commit1dadb11fc218786a36cc46714a0478e229ca44a9 (patch)
tree8e0d2d011d90b15c2a7d96893e1107f0f8e7da1b /src/search
parent61ed6e0276d580515d0acf5ddb96b1db95b9b191 (diff)
downloadpowder-1dadb11fc218786a36cc46714a0478e229ca44a9.zip
powder-1dadb11fc218786a36cc46714a0478e229ca44a9.tar.gz
Remove unneeded files
Diffstat (limited to 'src/search')
-rw-r--r--src/search/Save.cpp115
-rw-r--r--src/search/Save.h69
2 files changed, 0 insertions, 184 deletions
diff --git a/src/search/Save.cpp b/src/search/Save.cpp
deleted file mode 100644
index 8b2f215..0000000
--- a/src/search/Save.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Save.cpp
- *
- * Created on: Jan 26, 2012
- * Author: Simon
- */
-
-#include "Save.h"
-#include "client/Client.h"
-
-Save::Save(Save & save) :
- userName(save.userName), name(save.name), Description(save.Description), date(
- save.date), Published(save.Published), id(save.id), votesUp(
- save.votesUp), votesDown(save.votesDown), data(NULL), vote(save.vote), tags(save.tags) {
- if (save.data) {
- data = (unsigned char *) malloc(save.dataLength);
- memcpy(data, save.data, save.dataLength);
- dataLength = save.dataLength;
- }
-}
-
-Save::Save(int _id, int _date, int _votesUp, int _votesDown, string _userName,
- string _name) :
- id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name(
- _name), Description("No description provided"), date(_date), Published(
- true), data(NULL), vote(0), tags() {
-}
-
-Save::Save(int _id, int date_, int _votesUp, int _votesDown, int _vote, string _userName,
- string _name, string description_, bool published_, vector<string> tags_) :
- id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name(
- _name), Description(description_), date(date_), Published(
- published_), data(NULL), vote(_vote), tags(tags_) {
-}
-
-Save::~Save()
-{
- if(data)
- {
- free(data);
- }
-}
-
-void Save::SetName(string name) {
- this->name = name;
-}
-string Save::GetName() {
- return name;
-}
-
-void Save::SetVote(int vote)
-{
- this->vote = vote;
-}
-int Save::GetVote()
-{
- return vote;
-}
-
-void Save::SetUserName(string userName) {
- this->userName = userName;
-}
-string Save::GetUserName() {
- return userName;
-}
-
-void Save::SetID(int id) {
- this->id = id;
-}
-int Save::GetID() {
- return id;
-}
-
-void Save::SetVotesUp(int votesUp) {
- this->votesUp = votesUp;
-}
-int Save::GetVotesUp() {
- return votesUp;
-}
-
-void Save::SetVotesDown(int votesDown) {
- this->votesDown = votesDown;
-}
-int Save::GetVotesDown() {
- return votesDown;
-}
-
-void Save::SetTags(vector<string> tags)
-{
- this->tags = tags;
-}
-vector<string> Save::GetTags()
-{
- return tags;
-}
-
-unsigned char * Save::GetData() {
- if (!data) {
- data = Client::Ref().GetSaveData(id, date, dataLength);
- }
- return data;
-}
-void Save::SetData(unsigned char * data_, int dataLength) {
- if(data)
- free(data);
- data = data_;
- this->dataLength = dataLength;
-}
-
-int Save::GetDataLength() {
- if (!data) {
- data = Client::Ref().GetSaveData(id, date, dataLength);
- }
- return dataLength;
-}
diff --git a/src/search/Save.h b/src/search/Save.h
deleted file mode 100644
index 0b213e2..0000000
--- a/src/search/Save.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef SAVE_H
-#define SAVE_H
-
-#include <vector>
-#include <string>
-#include <stdlib.h>
-#include <iostream>
-#include <string.h>
-
-using namespace std;
-
-class Save
-{
-private:
-public:
- int id;
- int date;
- int votesUp, votesDown;
- unsigned char * data;
- int dataLength;
- bool Favourite;
-
- 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, int _vote, string _userName, string _name, string description_, bool published_, vector<string> tags);
-
- ~Save();
-
- string userName;
- string name;
-
- string Description;
-
- vector<string> tags;
-
- int vote;
-
- bool Published;
-
- void SetName(string name);
- string GetName();
-
- void SetUserName(string userName);
- string GetUserName();
-
- void SetID(int id);
- int GetID();
-
- void SetVote(int vote);
- int GetVote();
-
- void SetVotesUp(int votesUp);
- int GetVotesUp();
-
- void SetVotesDown(int votesDown);
- int GetVotesDown();
-
- void SetTags(vector<string> tags);
- vector<string> GetTags();
-
- unsigned char * GetData();
- void SetData(unsigned char * data_, int dataLength);
-
- int GetDataLength();
-};
-
-#endif // SAVE_H