added ModInfoDescription class
This commit is contained in:
parent
58df3fe249
commit
c67a856284
38
ModInfoDescription.cpp
Normal file
38
ModInfoDescription.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
#include "ModInfoDescription.h"
|
||||
using namespace mmm;
|
||||
|
||||
ModInfoDescription::ModInfoDescription() {
|
||||
_name = "";
|
||||
_server = "";
|
||||
_path = "";
|
||||
}
|
||||
|
||||
ModInfoDescription::ModInfoDescription(std::string name, std::string server, std::string path) {
|
||||
_name = name;
|
||||
_server = server;
|
||||
_path = path;
|
||||
}
|
||||
|
||||
std::string ModInfoDescription::getName() {
|
||||
return _name;
|
||||
}
|
||||
|
||||
std::string ModInfoDescription::getServer() {
|
||||
return _server;
|
||||
}
|
||||
|
||||
std::string ModInfoDescription::getPath() {
|
||||
return _path;
|
||||
}
|
||||
|
||||
void ModInfoDescription::setName(std::string name) {
|
||||
_name = name;
|
||||
}
|
||||
|
||||
void ModInfoDescription::setServer(std::string server) {
|
||||
_server = server;
|
||||
}
|
||||
|
||||
void ModInfoDescription::setPath(std::string path) {
|
||||
_path = path;
|
||||
}
|
39
ModInfoDescription.h
Normal file
39
ModInfoDescription.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef _MODINFODESCRIPTION_H
|
||||
#define _MODINFODESCRIPTION_H
|
||||
#include <string>
|
||||
/// \file ModInfoDescription.h
|
||||
/// \brief A class describing a modinfo file.
|
||||
/// \author Phitherek_
|
||||
/// \date 2013
|
||||
/// \version 0.1-pre
|
||||
|
||||
/// \namespace mmm
|
||||
/// \brief A global namespace for 3m
|
||||
namespace mmm {
|
||||
/// \class ModInfoDescription
|
||||
/// \brief A class describing a modinfo file.
|
||||
class ModInfoDescription {
|
||||
private:
|
||||
std::string _name;
|
||||
std::string _server;
|
||||
std::string _path;
|
||||
public:
|
||||
ModInfoDescription(); ///< A constructor.
|
||||
ModInfoDescription(std::string name, std::string server, std::string path); ///< \brief A constructor with parameters.
|
||||
///< \param name Modinfo name.
|
||||
///< \param server Server with modinfo.
|
||||
///< \param path Modinfo path on server.
|
||||
std::string getName(); ///< \brief A function returning modinfo name.
|
||||
///< \return Modinfo name.
|
||||
std::string getServer(); ///< \brief A function returning server with modinfo.
|
||||
///< \return A server with modinfo.
|
||||
std::string getPath(); ///< \brief A function returning modinfo path on server.
|
||||
///< \return Modinfo path on server.
|
||||
void setName(std::string name); ///< \brief A function setting modinfo name.
|
||||
///< \param name Modinfo name.
|
||||
void setServer(std::string server); ///< \brief A function setting server with modinfo.
|
||||
///< \param server Server with modinfo.
|
||||
void setPath(std::string path); ///< \brief A function setting modinfo path on server.
|
||||
///< \param path Modinfo path on server.
|
||||
}
|
||||
}
|
5
OBJECTS
5
OBJECTS
@ -1,8 +1,9 @@
|
||||
ModDescription: name, description, release, deps, repotype, repoaddr
|
||||
ModList: ModListDescription, vector<ModDescription>
|
||||
ModList: ModListDescription, vector<ModInfoDescription>
|
||||
LocalModDescription: ModDescription + remoteModlist (inheritance)
|
||||
LocalModList: vector<LocalModDescription>
|
||||
RepositoryModDescription: ModDescription + path (inheritance)
|
||||
RepositoryInfo: vector<RepositoryModDescription>
|
||||
ModListDescription: name, server, modlistPath
|
||||
ModInfoDescription: name, server, modinfoPath
|
||||
ModInfoDescription: name, server, modinfoPath
|
||||
ModInfo: ModInfoDescription, vector<ModDescription>
|
Loading…
x
Reference in New Issue
Block a user