activemq-cpp-3.8.2
PrimitiveValueConverter.h
Go to the documentation of this file.
1 
18 #ifndef _ACTIVEMQ_UTIL_PRIMITIVEVALUECONVERTER_H_
19 #define _ACTIVEMQ_UTIL_PRIMITIVEVALUECONVERTER_H_
20 
21 #include <activemq/util/Config.h>
22 
25 #include <string>
26 
27 namespace activemq {
28 namespace util {
29 
55  public:
56 
59 
60  template<typename TO>
61  TO convert(const PrimitiveValueNode& value) const {
62 
64  __FILE__, __LINE__, "Invalid Conversion");
65  }
66  };
67 
68  template<>
69  bool PrimitiveValueConverter::convert<bool>(const PrimitiveValueNode& value) const;
70  template<>
71  unsigned char PrimitiveValueConverter::convert<unsigned char>(const PrimitiveValueNode& value) const;
72  template<>
73  char PrimitiveValueConverter::convert<char>(const PrimitiveValueNode& value) const;
74  template<>
75  short PrimitiveValueConverter::convert<short>(const PrimitiveValueNode& value) const;
76  template<>
77  int PrimitiveValueConverter::convert<int>(const PrimitiveValueNode& value) const;
78  template<>
79  long long PrimitiveValueConverter::convert<long long>(const PrimitiveValueNode& value) const;
80  template<>
81  float PrimitiveValueConverter::convert<float>(const PrimitiveValueNode& value) const;
82  template<>
83  double PrimitiveValueConverter::convert<double>(const PrimitiveValueNode& value) const;
84  template<>
85  std::string PrimitiveValueConverter::convert<std::string>(const PrimitiveValueNode& value) const;
86  template<>
87  std::vector<unsigned char> PrimitiveValueConverter::convert<std::vector<unsigned char> >(const PrimitiveValueNode& value) const;
88 
89 }}
90 
91 #endif /* _ACTIVEMQ_UTIL_PRIMITIVEVALUECONVERTER_H_ */
#define AMQCPP_API
Definition: Config.h:30
Class that wraps around a single value of one of the many types.
Definition: PrimitiveValueNode.h:38
Definition: UnsupportedOperationException.h:32
PrimitiveValueConverter()
Definition: PrimitiveValueConverter.h:57
virtual ~PrimitiveValueConverter()
Definition: PrimitiveValueConverter.h:58
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
TO convert(const PrimitiveValueNode &value) const
Definition: PrimitiveValueConverter.h:61
Class controls the conversion of data contained in a PrimitiveValueNode from one type to another...
Definition: PrimitiveValueConverter.h:54