GreenCloud Simulator
powermodel.cc
Go to the documentation of this file.
1 /*
2  * powermodel.cc
3  *
4  * @date Sep 12, 2013
5  * @author Guzek:Mateusz
6  */
7 
8 #include "powermodel.h"
9 
10 
12 
13 }
14 
16 
17 }
18 
19 void PowerModel::setName(const char* name){
20  name_=name;
21 }
23  std::cout << "Abstract power model";
24 }
25 
26 int PowerModel::command(int argc, const char*const* argv)
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 }
39 
virtual void print()
Definition: powermodel.cc:22
virtual ~PowerModel()
Definition: powermodel.cc:15
void setName(const char *name)
Definition: powermodel.cc:19
std::string name_
Definition: powermodel.h:27
virtual int command(int argc, const char *const *argv)
Definition: powermodel.cc:26