added ModListDescription class

master
Phitherek 2013-03-23 19:20:38 +01:00
parent 3d27da5e08
commit 6bd3ed3f12
3 changed files with 71 additions and 2 deletions

View File

@ -35,5 +35,5 @@ public:
///< \param server Server with modinfo.
void setPath(std::string path); ///< \brief A function setting modinfo path on server.
///< \param path Modinfo path on server.
}
};
}

38
ModListDescription.cpp Normal file
View File

@ -0,0 +1,38 @@
#include "ModListDescription.h"
using namespace mmm;
ModListDescription::ModListDescription() {
_name = "";
_server = "";
_path = "";
}
ModListDescription::ModListDescription(std::string name, std::string server, std::string path) {
_name = name;
_server = server;
_path = path;
}
std::string ModListDescription::getName() {
return _name;
}
std::string ModListDescription::getServer() {
return _server;
}
std::string ModListDescription::getPath() {
return _path;
}
void ModListDescription::setName(std::string name) {
_name = name;
}
void ModListDescription::setServer(std::string server) {
_server = server;
}
void ModListDescription::setPath(std::string path) {
_path = path;
}

View File

@ -1,10 +1,41 @@
#ifndef _MODLISTDESCRIPTION_H
#define _MODLISTDESCRIPTION_H
#include <string>
/// \file ModListDescription.h
/// \brief A class describing a remote modlist.
/// \author Phitherek_
/// \date 2013
/// \version 0.1-pre
/// \namespace mmm
/// \brief A global namespace for 3m.
namespace mmm {
/// \class ModListDescription
/// \brief A class describing a remote modlist.
class ModListDescription {
private:
std::string _name;
std::string _server;
std::string _path;
public:
ModListDescription(); ///< A constructor.
ModListDescription(std::string name, std::string server, std::string path); ///< \brief A constructor with parameters.
///< \param name Remote modlist name.
///< \param server Server with remote modlist.
///< \param path Remote modlist path on server.
~ModListDescription(); ///< A destructor.
std::string getName(); ///< \brief A function returning remote modlist name.
///< \return Remote modlist name.
std::string getServer(); ///< \brief A function returning server with remote modlist.
///< \return A server with remote modlist.
std::string getPath(); ///< \brief A function returning remote modlist path on server.
///< \return Remote modlist path on server.
void setName(std::string name); ///< \brief A function setting remote modlist name.
///< \param name Remote modlist name.
void setServer(std::string server); ///< \brief A function setting server with remote modlist.
///< \param server Server with remote modlist.
void setPath(std::string path); ///< \brief A function setting remote modlist path on server.
///< \param path Remote modlist path on server.
};
}
#endif