activemq-cpp-3.8.2
PrimitiveTypesMarshaller.h
Go to the documentation of this file.
1 
18 #ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSHAL_PRIMITIVETYPESMARSHALLER_H_
19 #define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSHAL_PRIMITIVETYPESMARSHALLER_H_
20 
21 #include <cms/CMSException.h>
22 #include <activemq/util/Config.h>
28 #include <decaf/io/IOException.h>
29 #include <string>
30 
31 namespace activemq{
32 namespace wireformat{
33 namespace openwire{
34 namespace marshal{
35 
42  public:
43 
46 
57  static void marshal( const util::PrimitiveMap* map, std::vector<unsigned char>& buffer );
58 
69  static void unmarshal( util::PrimitiveMap* map, const std::vector<unsigned char>& buffer );
70 
81  static void marshal( const util::PrimitiveList* list, std::vector<unsigned char>& buffer );
82 
93  static void unmarshal( util::PrimitiveList* list, const std::vector<unsigned char>& buffer );
94 
95  public:
96 
107  static void marshalMap( const util::PrimitiveMap* map, decaf::io::DataOutputStream& dataOut );
108 
119  static util::PrimitiveMap* unmarshalMap( decaf::io::DataInputStream& dataIn );
120 
131  static void marshalList( const util::PrimitiveList* list, decaf::io::DataOutputStream& dataOut );
132 
143  static util::PrimitiveList* unmarshalList( decaf::io::DataInputStream& dataIn );
144 
145  protected:
146 
156  static void marshalPrimitiveMap(
159 
168  static void marshalPrimitiveList(
171 
179  static void marshalPrimitive( decaf::io::DataOutputStream& dataOut,
180  const util::PrimitiveValueNode& value );
181 
190  static void unmarshalPrimitiveMap(
192 
201  static void unmarshalPrimitiveList(
204 
213  static util::PrimitiveValueNode unmarshalPrimitive( decaf::io::DataInputStream& dataIn );
214 
215  };
216 
217 }}}}
218 
219 #endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSHAL_PRIMITIVETYPESMARSHALLER_H_*/
List of primitives.
Definition: PrimitiveList.h:36
#define AMQCPP_API
Definition: Config.h:30
Class that wraps around a single value of one of the many types.
Definition: PrimitiveValueNode.h:38
virtual ~PrimitiveTypesMarshaller()
Definition: PrimitiveTypesMarshaller.h:45
PrimitiveTypesMarshaller()
Definition: PrimitiveTypesMarshaller.h:44
A data output stream lets an application write primitive Java data types to an output stream in a por...
Definition: DataOutputStream.h:34
An object that maps keys to values.
Definition: Map.h:88
Map of named primitives.
Definition: PrimitiveMap.h:36
A data input stream lets an application read primitive Java data types from an underlying input strea...
Definition: DataInputStream.h:46
This class wraps the functionality needed to marshal a primitive map to the Openwire Format&#39;s expecta...
Definition: PrimitiveTypesMarshaller.h:41
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
An ordered collection (also known as a sequence).
Definition: List.h:47
A complete implementation of the List interface using a doubly linked list data structure.
Definition: LinkedList.h:55