Namespaces unified (sal+fi -> fail), Code cleanups (-> coding-style.txt), Doxygen-comments fixed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1319 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-06-07 17:47:19 +00:00
parent cdd5379e19
commit b7d904140e
136 changed files with 1487 additions and 1554 deletions

View File

@ -1,17 +1,17 @@
/**
* \brief The representation of a minion.
*
* \author Richard Hellwig
*
*/
#ifndef __MINION_HPP__
#define __MINION_HPP__
#include <string>
#include "controller/ExperimentData.hpp"
namespace fi
{
namespace fail {
/**
* \class Minion
*
@ -20,26 +20,32 @@ namespace fi
class Minion
{
private:
string hostname;
std::string hostname;
bool isWorking;
ExperimentData* currentExperimentData;
int sockfd;
public:
Minion() : isWorking(false), currentExperimentData(0), sockfd(-1) { }
/**
* Sets the socket descriptor.
* @param sock the new socket descriptor (used internal)
*/
void setSocketDescriptor(int sock) { sockfd = sock; }
/**
* Retrives the socket descriptor.
* @return the socket descriptor
*/
int getSocketDescriptor() const { return (sockfd); }
/**
* Returns the hostname of the minion.
* @return the hostname
*/
string getHostname() { return (hostname); }
const std::string& getHostname() { return (hostname); }
/**
* Sets the hostname of the minion.
* @param host the hostname
*/
void setHostname(string host) { hostname = host; }
void setHostname(const std::string& host) { hostname = host; }
/**
* Returns the current ExperimentData which the minion is working with.
* @return a pointer of the current ExperimentData
@ -62,6 +68,6 @@ class Minion
void setBusy(bool state) { isWorking = state; }
};
};
} // end-of-namespace: fail
#endif /* __MINION_HPP__ */
#endif // __MINION_HPP__