Open Lighting Architecture 0.10.9
Loading...
Searching...
No Matches
MessageVisitor.h
1/*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2.1 of the License, or (at your option) any later version.
6 *
7 * This library 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 GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 *
16 * MessageVisitor.h
17 * The interface for the class which visits Message & MessageFields
18 * Copyright (C) 2011 Simon Newton
19 */
20
21#ifndef INCLUDE_OLA_MESSAGING_MESSAGEVISITOR_H_
22#define INCLUDE_OLA_MESSAGING_MESSAGEVISITOR_H_
23
24#include <stdint.h>
25
26namespace ola {
27namespace messaging {
28
29
30class BoolMessageField;
31class GroupMessageField;
32class IPV4MessageField;
33class MACMessageField;
34class StringMessageField;
35class UIDMessageField;
36
37template <typename type>
39
44 public:
45 virtual ~MessageVisitor() {}
46
47 virtual void Visit(const BoolMessageField*) = 0;
48 virtual void Visit(const IPV4MessageField*) = 0;
49 virtual void Visit(const MACMessageField*) = 0;
50 virtual void Visit(const UIDMessageField*) = 0;
51 virtual void Visit(const StringMessageField*) = 0;
52 virtual void Visit(const BasicMessageField<uint8_t>*) = 0;
53 virtual void Visit(const BasicMessageField<uint16_t>*) = 0;
54 virtual void Visit(const BasicMessageField<uint32_t>*) = 0;
55 virtual void Visit(const BasicMessageField<int8_t>*) = 0;
56 virtual void Visit(const BasicMessageField<int16_t>*) = 0;
57 virtual void Visit(const BasicMessageField<int32_t>*) = 0;
58 virtual void Visit(const GroupMessageField*) = 0;
59 virtual void PostVisit(const GroupMessageField*) = 0;
60};
61} // namespace messaging
62} // namespace ola
63#endif // INCLUDE_OLA_MESSAGING_MESSAGEVISITOR_H_
Definition MessageVisitor.h:38
Definition Message.h:73
Definition Message.h:242
Definition Message.h:99
Definition Message.h:131
Definition MessageVisitor.h:43
Definition Message.h:183
Definition Message.h:157
The namespace containing all OLA symbols.
Definition Credentials.cpp:44