Zserio C++17 runtime library  0.5.0
Built for Zserio 2.17.0
String.h
Go to the documentation of this file.
1 #ifndef ZSERIO_STRING_H_INC
2 #define ZSERIO_STRING_H_INC
3 
4 #include <string>
5 #include <string_view>
6 
7 #include "zserio/BitSize.h"
8 #include "zserio/Traits.h"
9 
10 namespace zserio
11 {
12 
16 template <typename ALLOC>
17 using BasicString = std::basic_string<char, std::char_traits<char>, ALLOC>;
18 
23 
24 template <typename ALLOC>
25 struct view_type<BasicString<ALLOC>>
26 {
27  using type = std::string_view;
28 };
29 
30 namespace detail
31 {
32 
33 void validate(std::string_view stringValue, std::string_view fieldName);
34 
35 BitSize bitSizeOf(std::string_view stringValue, BitSize = 0);
36 
37 BitSize initializeOffsets(std::string_view stringValue, BitSize bitPosition);
38 
39 } // namespace detail
40 
41 } // namespace zserio
42 
43 #endif // ZSERIO_STRING_H_INC
unsigned int BitSize
Definition: BitSize.h:8
std::basic_string< char, std::char_traits< char >, ALLOC > BasicString
Definition: String.h:17
BasicString< std::allocator< char > > String
Definition: String.h:22