Subversion Repositories HomeAutomation

Rev

Rev 1310 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*
  2.  * Header.cpp
  3.  *
  4.  *  Created on: Jul 23, 2009
  5.  *      Author: Mattias Runge
  6.  */
  7.  
  8. #include "Header.h"
  9.  
  10. namespace atom {
  11. namespace message {
  12.  
  13. Header::Header()
  14. {
  15.     // TODO Load variables from headerfile
  16. }
  17.  
  18. Header::~Header()
  19. {
  20. }
  21.  
  22. Variable & Header::getVariable(string name)
  23. {
  24.     return this->myVariables[name];
  25.  
  26.     // TODO Check if it does not exist, throw exception?
  27. }
  28.  
  29. void Header::readBits(BitBuffer & buffer)
  30. {
  31.     for (variableMap::iterator iter = this->myVariables.begin(); iter != this->myVariables.end(); iter++)
  32.     {
  33.         iter->second.readBits(buffer);
  34.     }
  35. }
  36.  
  37. }
  38. }
  39.