Atlas-C++
MEncoder.h
1 // This file may be redistributed and modified only under the terms of
2 // the GNU Lesser General Public License (See COPYING for details).
3 // Copyright (C) 2000 Stefanus Du Toit
4 
5 // $Id$
6 
7 #ifndef ATLAS_MESSAGE_ENCODER_H
8 #define ATLAS_MESSAGE_ENCODER_H
9 
10 #include <Atlas/EncoderBase.h>
11 
12 #include <map>
13 #include <vector>
14 #include <string>
15 
16 namespace Atlas { namespace Message {
17 
18 class Element;
19 
20 typedef std::map<std::string, Element> MapType;
21 typedef std::vector<Element> ListType;
22 
34 {
35 public:
36  explicit Encoder(Atlas::Bridge &);
37 
38  ~Encoder();
39 
41  void streamMessageElement(const MapType & obj);
43  void mapElementItem(const std::string&, const Element&);
44  void mapElementMapItem(const std::string&, const MapType&);
45  void mapElementListItem(const std::string&, const ListType&);
47  void listElementItem(const Element&);
48  void listElementMapItem(const MapType&);
49  void listElementListItem(const ListType&);
50 };
51 
52 } } // namespace Atlas::Message
53 
54 #endif
Atlas stream bridge.
Definition: Bridge.h:35
Multi-type container.
Definition: Element.h:60
The Atlas namespace.
Definition: Bridge.h:20
Encoder that transmits Atlas::Message::Element.
Definition: MEncoder.h:33
Base class forwarding to Atlas::Bridge as skeleton for other encoders.
Definition: EncoderBase.h:30
void mapElementItem(const std::string &, const Element &)
Send an object as a map item.
void listElementItem(const Element &)
Send an object as a list item.
void streamMessageElement(const MapType &obj)
Send a message (must be a map!) in stream state.

Copyright 2000-2004 the respective authors.

This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.