Open Lighting Architecture  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HeaderSet.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Library General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15  *
16  * HeaderSet.h
17  * Interface for the HeaderSet class
18  * HeaderSet is passed down the parsing stack and contains a collection of PDU
19  * headers
20  * Copyright (C) 2007-2009 Simon Newton
21  */
22 
23 #ifndef PLUGINS_E131_E131_HEADERSET_H_
24 #define PLUGINS_E131_E131_HEADERSET_H_
25 
26 #include "plugins/e131/e131/DMPHeader.h"
27 #include "plugins/e131/e131/E131Header.h"
28 #include "plugins/e131/e131/E133Header.h"
29 #include "plugins/e131/e131/RootHeader.h"
30 #include "plugins/e131/e131/TransportHeader.h"
31 
32 namespace ola {
33 namespace plugin {
34 namespace e131 {
35 
36 class HeaderSet {
37  public:
38  HeaderSet() {}
39  ~HeaderSet() {}
40 
41  const TransportHeader &GetTransportHeader() const {
42  return m_transport_header;
43  }
44  void SetTransportHeader(const TransportHeader &header) {
45  m_transport_header = header;
46  }
47 
48  const RootHeader &GetRootHeader() const { return m_root_header; }
49  void SetRootHeader(const RootHeader &header) { m_root_header = header; }
50 
51  const E131Header &GetE131Header() const { return m_e131_header; }
52  void SetE131Header(const E131Header &header) { m_e131_header = header; }
53 
54  const E133Header &GetE133Header() const { return m_e133_header; }
55  void SetE133Header(const E133Header &header) { m_e133_header = header; }
56 
57  const DMPHeader &GetDMPHeader() const { return m_dmp_header; }
58  void SetDMPHeader(const DMPHeader &header) { m_dmp_header = header; }
59 
60  bool operator==(const HeaderSet &other) const {
61  return (
62  m_transport_header == other.m_transport_header &&
63  m_root_header == other.m_root_header &&
64  m_e131_header == other.m_e131_header &&
65  m_e133_header == other.m_e133_header &&
66  m_dmp_header == other.m_dmp_header);
67  }
68 
69  private:
70  TransportHeader m_transport_header;
71  RootHeader m_root_header;
72  E131Header m_e131_header;
73  E133Header m_e133_header;
74  DMPHeader m_dmp_header;
75 };
76 } // namespace e131
77 } // namespace plugin
78 } // namespace ola
79 #endif // PLUGINS_E131_E131_HEADERSET_H_