Atlas-C++
Encoder.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_OBJECTS_ENCODER_H
8 #define ATLAS_OBJECTS_ENCODER_H
9 
10 #include <Atlas/EncoderBase.h>
11 #include <Atlas/Objects/Root.h>
12 
13 namespace Atlas { namespace Objects {
14 
27 {
28 public:
31  explicit ObjectsEncoder(Atlas::Bridge & b) : EncoderBase(b) { }
34 
37  template <class ObjectData>
39  {
41  o->sendContents(m_b);
42  m_b.mapEnd();
43  }
44 };
45 
46 } } // namespace Atlas::Objects
47 
48 #endif
ObjectsEncoder(Atlas::Bridge &b)
The default constructor.
Definition: Encoder.h:31
virtual void streamMessage()=0
Start a message in an Atlas stream.
Objects hierarchy encoder.
Definition: Encoder.h:26
Atlas stream bridge.
Definition: Bridge.h:35
virtual void mapEnd()=0
Ends the currently streamed map.
void streamObjectsMessage(const Atlas::Objects::SmartPtr< ObjectData > &o)
Send an object to the bridge.
Definition: Encoder.h:38
The Atlas namespace.
Definition: Bridge.h:20
Atlas::Bridge & m_b
The bridge that requests are forwarded to.
Definition: EncoderBase.h:64
~ObjectsEncoder()
The default destructor.
Definition: Decoder.h:15
Base class forwarding to Atlas::Bridge as skeleton for other encoders.
Definition: EncoderBase.h:30

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.