Atlas  0.7.0
Networking protocol for the Worldforge system.
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) { }
33  ~ObjectsEncoder() override = default;
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
virtual void mapEnd()=0
virtual void streamMessage()=0
Atlas::Bridge & m_b
The bridge that requests are forwarded to.
Definition: EncoderBase.h:64
void streamObjectsMessage(const Atlas::Objects::SmartPtr< ObjectData > &o)
Definition: Encoder.h:38
~ObjectsEncoder() override=default
The default destructor.
ObjectsEncoder(Atlas::Bridge &b)
Definition: Encoder.h:31
Definition: Bridge.h:20