MipResources::CommNode Class Reference
[Communication module]

Represents the sender or the recipient of a packet. More...

#include <CommModule.h>

List of all members.

Public Member Functions

 CommNode ()
 Default constructor.
 CommNode (int id)
 Id constructor.
 CommNode (int id, int task)
 Id-task constructor.
 CommNode (int id, string taskname)
 Id-task constructor.
 CommNode (const CommNode &n)
 Copy constructor.
CommNodeoperator= (const CommNode &n)
 Assigment operator =.
bool addId (const int id)
 Push back a recipient id.
bool addTask (const int task)
 Push back a recipient task.
bool addTaskName (const string taskname)
 Push back a recipient task.
bool deleteId (const int id)
 Delete an Id from the recipient.
bool deleteTask (const int task)
 Delete a task from the recipient.
bool deleteTaskName (const string taskname)
 Delete a task from the recipient.
vector< int > ids ()
 Get the vector of ids.
vector< int > tasks ()
 Get the vector of task numbers.
vector< string > taskNames ()
 Get the vector of task names.
int getId (int i)
 Get the i-th id of the ids vector.
int getIdsSize ()
 Get the size of the ids vector.
int getTask (int i)
 Get the i-th task number.
int getTasksSize ()
 Get the size of the task vector.
string getTaskNames (int i)
 Get the i-th task name.
int getTaskNamesSize ()
 Get the size of the taskNames vector.
string print ()
 Print function.

Friends

class boost::serialization::access


Detailed Description

Represents the sender or the recipient of a packet.

Author:
Fabrizio Ramundo
Examples:

exampleCommModule.cpp.


Constructor & Destructor Documentation

MipResources::CommNode::CommNode (  ) 

Default constructor.

This constructor doesn't do anything.

MipResources::CommNode::CommNode ( int  id  ) 

Id constructor.

This constructor allows to specify the id of the commNode.

Parameters:
id Integer that is added to the vector of ids of the CommNode.

MipResources::CommNode::CommNode ( int  id,
int  task 
)

Id-task constructor.

This constructor allows to specify the id and the task of the commNode.

Parameters:
id Integer that is added to the vector of ids of the CommNode.
task Integer that is added to the vector of tasks of the CommNode.

MipResources::CommNode::CommNode ( int  id,
string  taskname 
)

Id-task constructor.

This constructor allows to specify the id and the task of the commNode.

Parameters:
id Integer that is added to the vector of ids of the CommNode.
task Integer that is added to the vector of tasks of the CommNode.

MipResources::CommNode::CommNode ( const CommNode n  ) 

Copy constructor.

This constructor copyes a CommNode in a new one.

Parameters:
n CommNode that is copied.


Member Function Documentation

CommNode & MipResources::CommNode::operator= ( const CommNode n  ) 

Assigment operator =.

bool MipResources::CommNode::addId ( const int  id  )  [inline]

Push back a recipient id.

This function adds the specified id at the end of the vector of ids of the CommNode.

Returns:
true if succesfully added, false otherwise.
Parameters:
id recipient task to add
Examples:
exampleCommModule.cpp.

bool MipResources::CommNode::addTask ( const int  task  )  [inline]

Push back a recipient task.

This function adds the specified task number at the end of the vector of ids of the CommNode.

Returns:
true if succesfully added, false otherwise.
Parameters:
task recipient task to add
Examples:
exampleCommModule.cpp.

bool MipResources::CommNode::addTaskName ( const string  taskname  )  [inline]

Push back a recipient task.

This function adds the specified task number at the end of the vector of ids of the CommNode.

Returns:
true if succesfully added, false otherwise.
Parameters:
task recipient task to add

bool MipResources::CommNode::deleteId ( const int  id  ) 

Delete an Id from the recipient.

Parameters:
[in] id the id of the recipient to delete
Returns:

bool MipResources::CommNode::deleteTask ( const int  task  ) 

Delete a task from the recipient.

Returns:
true if succesfully deleted, false otherwise.
Parameters:
task Recipient task to delete.

bool MipResources::CommNode::deleteTaskName ( const string  taskname  ) 

Delete a task from the recipient.

Returns:
true if succesfully deleted, false otherwise.
Parameters:
task Recipient task to delete.

vector< int > MipResources::CommNode::ids (  ) 

Get the vector of ids.

Returns:
The vector of ids.

vector< int > MipResources::CommNode::tasks (  ) 

Get the vector of task numbers.

Returns:
The vector of task numbers.

vector< string > MipResources::CommNode::taskNames (  ) 

Get the vector of task names.

Returns:
The vector of task names.

int MipResources::CommNode::getId ( int  i  ) 

Get the i-th id of the ids vector.

Returns:
The i-th id.
Parameters:
i index of the requested id.
Examples:
exampleCommModule.cpp.

int MipResources::CommNode::getIdsSize (  ) 

Get the size of the ids vector.

Returns:
The size of the ids vector.
Examples:
exampleCommModule.cpp.

int MipResources::CommNode::getTask ( int  i  ) 

Get the i-th task number.

Returns:
The i-th task number.
Parameters:
i index of the requested task number.

int MipResources::CommNode::getTasksSize (  ) 

Get the size of the task vector.

Returns:
The size of the task numbers vector.

string MipResources::CommNode::getTaskNames ( int  i  ) 

Get the i-th task name.

Returns:
The i-th task number.
Parameters:
i index of the requested task name.

int MipResources::CommNode::getTaskNamesSize (  ) 

Get the size of the taskNames vector.

Returns:
The size of the task names vector.

string MipResources::CommNode::print (  ) 

Print function.

This function returns a string that can be printed, with all the informations contained in the class.

Returns:
The string that can be printed.


Friends And Related Function Documentation

friend class boost::serialization::access [friend]


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

Generated on Mon Feb 20 07:01:12 2017 for MIP by  doxygen 1.5.6