INET Framework for OMNeT++/OMNEST
inet::httptools::rdObject Class Referenceabstract

Base random object. More...

#include <HttpRandom.h>

Inheritance diagram for inet::httptools::rdObject:
inet::httptools::rdConstant inet::httptools::rdExponential inet::httptools::rdHistogram inet::httptools::rdNormal inet::httptools::rdUniform inet::httptools::rdZipf

Public Member Functions

virtual ~rdObject ()
 
DISTR_TYPE getType ()
 
std::string typeStr ()
 
virtual std::string toString ()
 
virtual double draw ()=0
 

Protected Member Functions

bool _hasKey (cXMLAttributeMap attributes, std::string key)
 

Protected Attributes

DISTR_TYPE m_type = dt_normal
 

Detailed Description

Base random object.

Should not be instantiated directly.

Constructor & Destructor Documentation

virtual inet::httptools::rdObject::~rdObject ( )
inlinevirtual
55 {}

Member Function Documentation

bool inet::httptools::rdObject::_hasKey ( cXMLAttributeMap  attributes,
std::string  key 
)
inlineprotected
DISTR_TYPE inet::httptools::rdObject::getType ( )
inline

Referenced by inet::httptools::HttpController::initialize().

56 { return m_type; }
DISTR_TYPE m_type
Definition: HttpRandom.h:49
virtual std::string inet::httptools::rdObject::toString ( )
inlinevirtual

Reimplemented in inet::httptools::rdZipf.

Referenced by inet::httptools::HttpController::initialize().

58 { return typeStr(); }
std::string typeStr()
Definition: HttpRandom.cc:24
std::string inet::httptools::rdObject::typeStr ( )

Referenced by inet::httptools::HttpController::initialize().

25 {
26  switch (m_type) {
27  case dt_normal:
28  return DISTR_NORMAL_STR;
29 
30  case dt_uniform:
31  return DISTR_UNIFORM_STR;
32 
33  case dt_exponential:
34  return DISTR_EXPONENTIAL_STR;
35 
36  case dt_histogram:
37  return DISTR_HISTOGRAM_STR;
38 
39  default:
40  return "UNKNOWN";
41  }
42 }
Definition: HttpRandom.h:33
Definition: HttpRandom.h:33
#define DISTR_UNIFORM_STR
Definition: HttpRandom.h:37
Definition: HttpRandom.h:33
#define DISTR_HISTOGRAM_STR
Definition: HttpRandom.h:39
#define DISTR_NORMAL_STR
Definition: HttpRandom.h:36
DISTR_TYPE m_type
Definition: HttpRandom.h:49
Definition: HttpRandom.h:33
#define DISTR_EXPONENTIAL_STR
Definition: HttpRandom.h:38

Member Data Documentation


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