Atlas  0.7.0
Networking protocol for the Worldforge system.
Decoder.cpp
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 2000-2001 Stefanus Du Toit and Aloril.
4 // Copyright 2001-2005 Alistair Riddoch.
5 // Copyright 2019 Erik Ogenvik.
6 
7 #include <Atlas/Objects/Decoder.h>
8 
9 #include <Atlas/Objects/Factories.h>
10 
11 namespace Atlas {
12 namespace Objects {
13 
15  : m_factories(f) {
16 }
17 
19 
20 void ObjectsDecoder::messageArrived(Atlas::Message::MapType o) {
21  objectArrived(m_factories.createObject(std::move(o)));
22 }
23 
24 }
25 } // namespace Atlas::Objects
~ObjectsDecoder() override
Default destructor.
virtual void objectArrived(Root obj)=0
call right object*Arrived method
void messageArrived(Atlas::Message::MapType) override
Overridden by to retrieve the message from DecoderBase.
Definition: Decoder.cpp:20
ObjectsDecoder(const Factories &f)
Constructor.
Definition: Decoder.cpp:14
Definition: Bridge.h:20