User Manual, Developers Guide and API Documentation

rise::medium::Medium Class Reference
[Medium]

Creates and manages PhysicalResource

This class provides the physical resources (kind of a factory) and manages them in a list. It is a singleton, therefore providing the method getInstance(); deleteInstance() should be used to destroy the singleton at simulation shutdown.

#include <medium/Medium.hpp>

Collaboration diagram for rise::medium::Medium:

Collaboration graph
[legend]

List of all members.

Public Member Functions

PhysicalResourcegetPhysicalResource (double f, double b)
 Returns a PhysicalResource, with the specified frequency and bandwidth.
void reset ()
 Removes all PhysicalResources.

Static Public Member Functions

static void deleteInstance ()
 Delete this singleton.
static MediumgetInstance ()
 Singleton's getInstance.

Private Types

typedef std::list
< PhysicalResource * > 
PhysicalResourceContainer
typedef
PhysicalResourceContainer::iterator 
PhysicalResourceIterator

Private Member Functions

bool checkForOverlap (PhysicalResource *pr) const
 Medium (const Medium &)
 Disallow copy constructor.
 Medium ()
Mediumoperator= (const Medium &)
 Disallow assignment operator.
 ~Medium ()

Private Attributes

RISELogger log
PhysicalResourceContainer prs

Static Private Attributes

static Mediummyself = NULL


Detailed Description

Definition at line 47 of file Medium.hpp.


Member Typedef Documentation

Definition at line 48 of file Medium.hpp.

typedef PhysicalResourceContainer::iterator rise::medium::Medium::PhysicalResourceIterator [private]

Definition at line 49 of file Medium.hpp.


Constructor & Destructor Documentation

Medium::Medium (  )  [private]

Definition at line 97 of file Medium.cpp.

Medium::~Medium (  )  [private]

Definition at line 108 of file Medium.cpp.

rise::medium::Medium::Medium ( const Medium  )  [private]


Member Function Documentation

bool Medium::checkForOverlap ( PhysicalResource pr  )  const [private]

Definition at line 113 of file Medium.cpp.

void Medium::deleteInstance (  )  [static]

Definition at line 47 of file Medium.cpp.

Medium * Medium::getInstance (  )  [static]

Definition at line 39 of file Medium.cpp.

PhysicalResource * Medium::getPhysicalResource ( double  f,
double  b 
)

Todo:
(msg) Rename this method into allocatePhysicalResource and add a method freePhysicalResource. This way the PhysicalResources can be freed if they are not needed by anyone any longer.

Definition at line 70 of file Medium.cpp.

Medium& rise::medium::Medium::operator= ( const Medium  )  [private]

void Medium::reset (  ) 

Note:
This method is only for test purposes (will remove all PhysicalResources created by Medium)

Definition at line 53 of file Medium.cpp.


Member Data Documentation

Definition at line 85 of file Medium.hpp.

Medium * Medium::myself = NULL [static, private]

Definition at line 83 of file Medium.hpp.

Definition at line 84 of file Medium.hpp.


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

Generated on Sat May 26 03:32:38 2012 for openWNS by  doxygen 1.5.5