Public Member Functions | Public Attributes | Private Member Functions | Friends

chomp::multiwork::mwWorkerData Class Reference

A helper class for storing data on a single worker. More...

#include <mwcoord.h>

List of all members.

Public Member Functions

 mwWorkerData ()
 The default constructor.
 ~mwWorkerData ()
 The destructor.

Public Attributes

mwData data
 The data which was sent do the worker and is being processed.
int fd
 The file descriptor number of the socket for the communication with the given worker.
std::string name
 The computer name of the worker.
int port
 The port number at which the worker is going to listen next time.
int status
 The status of the worker: 0 = ok, -1 = failed, 1 = data acquired from a working one or data sent to a waiting one.

Private Member Functions

 mwWorkerData (const mwWorkerData &)
 The copy constructor is not allowed.
mwWorkerDataoperator= (const mwWorkerData &)
 The assignment operator is not allowed.

Friends

void swap (mwWorkerData &data1, mwWorkerData &data2)
 Swaps data between two objects of this type.

Detailed Description

A helper class for storing data on a single worker.

This data structure is used internally by the coordinator.

Definition at line 59 of file mwcoord.h.


Constructor & Destructor Documentation

chomp::multiwork::mwWorkerData::mwWorkerData (  )  [inline]

The default constructor.

Definition at line 98 of file mwcoord.h.

                                  :
        fd (-1), name (""), port (0), status (0)
{
        return;
} /* mwWorkerData::mwWorkerData */

chomp::multiwork::mwWorkerData::~mwWorkerData (  )  [inline]

The destructor.

Definition at line 104 of file mwcoord.h.

{
        return;
} /* mwWorkerData::~mwWorkerData */

chomp::multiwork::mwWorkerData::mwWorkerData ( const mwWorkerData  )  [inline, private]

The copy constructor is not allowed.

Definition at line 91 of file mwcoord.h.

{return;};


Member Function Documentation

mwWorkerData& chomp::multiwork::mwWorkerData::operator= ( const mwWorkerData  )  [inline, private]

The assignment operator is not allowed.

Definition at line 94 of file mwcoord.h.

{return *this;};


Friends And Related Function Documentation

void swap ( mwWorkerData data1,
mwWorkerData data2 
) [friend]

Swaps data between two objects of this type.

Definition at line 109 of file mwcoord.h.

{
        swap (data1. data, data2. data);
        std::swap (data1. fd, data2. fd);
        std::swap (data1. name, data2. name);
        std::swap (data1. port, data2. port);
        std::swap (data1. status, data2. status);
        return;
} /* swap */


Member Data Documentation

The data which was sent do the worker and is being processed.

Definition at line 69 of file mwcoord.h.

The file descriptor number of the socket for the communication with the given worker.

Negative if the worker is not connected.

Definition at line 74 of file mwcoord.h.

The computer name of the worker.

Definition at line 77 of file mwcoord.h.

The port number at which the worker is going to listen next time.

Definition at line 80 of file mwcoord.h.

The status of the worker: 0 = ok, -1 = failed, 1 = data acquired from a working one or data sent to a waiting one.

Definition at line 84 of file mwcoord.h.


The documentation for this class was generated from the following file: