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
Atlas::Bridge
Atlas stream bridge.
Definition: Bridge.h:36
Atlas::EncoderBase::m_b
Atlas::Bridge & m_b
The bridge that requests are forwarded to.
Definition: EncoderBase.h:64
Atlas::Objects::SmartPtr
Definition: Decoder.h:15
Atlas::Objects::ObjectsEncoder::ObjectsEncoder
ObjectsEncoder(Atlas::Bridge &b)
The default constructor.
Definition: Encoder.h:31
Atlas::Objects::ObjectsEncoder::streamObjectsMessage
void streamObjectsMessage(const Atlas::Objects::SmartPtr< ObjectData > &o)
Send an object to the bridge.
Definition: Encoder.h:38
Atlas::Bridge::mapEnd
virtual void mapEnd()=0
Ends the currently streamed map.
Atlas::Objects::ObjectsEncoder::~ObjectsEncoder
~ObjectsEncoder()
The default destructor.
Atlas::Objects::ObjectsEncoder
Objects hierarchy encoder.
Definition: Encoder.h:27
Atlas
The Atlas namespace.
Definition: Bridge.h:20
Atlas::Bridge::streamMessage
virtual void streamMessage()=0
Start a message in an Atlas stream.
Atlas::EncoderBase
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.