GreenCloud Simulator
Public Member Functions | Public Attributes | List of all members
PowerModel Class Referenceabstract

#include <powermodel.h>

Inheritance diagram for PowerModel:
Inheritance graph
[legend]
Collaboration diagram for PowerModel:
Collaboration graph
[legend]

Public Member Functions

 PowerModel ()
 
virtual ~PowerModel ()
 
virtual void print ()
 
virtual int command (int argc, const char *const *argv)
 
virtual double estimate (int size, double *predictors)=0
 
virtual double getMaxPower ()=0
 
virtual void addComponent (DcResource *component)=0
 
void setName (const char *name)
 

Public Attributes

std::string name_
 

Detailed Description

Definition at line 17 of file powermodel.h.

Constructor & Destructor Documentation

PowerModel::PowerModel ( )

Definition at line 11 of file powermodel.cc.

11  {
12 
13 }
PowerModel::~PowerModel ( )
virtual

Definition at line 15 of file powermodel.cc.

15  {
16 
17 }

Member Function Documentation

virtual void PowerModel::addComponent ( DcResource component)
pure virtual

Implemented in PerComponentModel, and LinearPModel.

int PowerModel::command ( int  argc,
const char *const *  argv 
)
virtual

Reimplemented in PerComponentModel, and LinearPModel.

Definition at line 26 of file powermodel.cc.

27 {
28 
29  if (argc == 2) {
30  if (strcmp(argv[1], "print") == 0) {
31 
32  /* print general info */
33  print();
34  return (TCL_OK);
35  }
36  }
37  return (PowerModel::command(argc, argv));
38 }
virtual void print()
Definition: powermodel.cc:22
virtual int command(int argc, const char *const *argv)
Definition: powermodel.cc:26
virtual double PowerModel::estimate ( int  size,
double *  predictors 
)
pure virtual

Implemented in PerComponentModel, and LinearPModel.

virtual double PowerModel::getMaxPower ( )
pure virtual

Implemented in PerComponentModel, and LinearPModel.

void PowerModel::print ( )
virtual

Reimplemented in LinearPModel, and PerComponentModel.

Definition at line 22 of file powermodel.cc.

22  {
23  std::cout << "Abstract power model";
24 }
void PowerModel::setName ( const char *  name)

Definition at line 19 of file powermodel.cc.

19  {
20  name_=name;
21 }
std::string name_
Definition: powermodel.h:27

Member Data Documentation

std::string PowerModel::name_

Definition at line 27 of file powermodel.h.


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