Open Lighting Architecture  Latest Git
StringMessageBuilder.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  * StringMessageBuilder.h
17  * The interface for the class which builds Message objects from a vector of
18  * strings.
19  * Copyright (C) 2011 Simon Newton
20  */
21 
22 #ifndef INCLUDE_OLA_MESSAGING_STRINGMESSAGEBUILDER_H_
23 #define INCLUDE_OLA_MESSAGING_STRINGMESSAGEBUILDER_H_
24 
25 #include <ola/messaging/DescriptorVisitor.h>
26 #include <string>
27 #include <vector>
28 
29 namespace ola {
30 namespace messaging {
31 
32 
37  public:
38  explicit StringMessageBuilder(const std::vector<std::string> &input)
39  : m_input(input) {
40  }
42 
43  void Visit(const BoolFieldDescriptor*);
44  void Visit(const IPV4FieldDescriptor*);
45  void Visit(const MACFieldDescriptor*);
46  void Visit(const UIDFieldDescriptor*);
47  void Visit(const StringFieldDescriptor*);
48  void Visit(const IntegerFieldDescriptor<uint8_t>*);
49  void Visit(const IntegerFieldDescriptor<uint16_t>*);
50  void Visit(const IntegerFieldDescriptor<uint32_t>*);
51  void Visit(const IntegerFieldDescriptor<int8_t>*);
52  void Visit(const IntegerFieldDescriptor<int16_t>*);
53  void Visit(const IntegerFieldDescriptor<int32_t>*);
54  void Visit(const FieldDescriptorGroup*);
55  void PostVisit(const FieldDescriptorGroup*);
56 
57  private:
58  std::vector<std::string> m_input;
59 };
60 } // namespace messaging
61 } // namespace ola
62 #endif // INCLUDE_OLA_MESSAGING_STRINGMESSAGEBUILDER_H_
Definition: Descriptor.h:84
Definition: DescriptorVisitor.h:43
Definition: StringMessageBuilder.h:36
Definition: Descriptor.h:122
Definition: Descriptor.h:324
Definition: Descriptor.h:141
Definition: Descriptor.h:103
Definition: Descriptor.h:160
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: Descriptor.h:190