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
14
ObjectsDecoder::ObjectsDecoder
(
const
Factories
& f)
15
: m_factories(f) {
16
}
17
18
ObjectsDecoder::~ObjectsDecoder
() =
default
;
19
20
void
ObjectsDecoder::messageArrived
(Atlas::Message::MapType o) {
21
objectArrived
(m_factories.createObject(std::move(o)));
22
}
23
24
}
25
}
// namespace Atlas::Objects
Atlas::Objects::ObjectsDecoder::messageArrived
void messageArrived(Atlas::Message::MapType) override
Overridden by to retrieve the message from DecoderBase.
Definition:
Decoder.cpp:20
Atlas::Objects::ObjectsDecoder::ObjectsDecoder
ObjectsDecoder(const Factories &f)
Constructor.
Definition:
Decoder.cpp:14
Atlas::Objects::ObjectsDecoder::~ObjectsDecoder
~ObjectsDecoder() override
Default destructor.
Atlas::Objects::ObjectsDecoder::objectArrived
virtual void objectArrived(Root obj)=0
call right object*Arrived method
Atlas::Objects::Factories
Definition:
Factories.h:76
Atlas
Definition:
Bridge.h:20
src
Atlas
Objects
Decoder.cpp
Generated by
1.8.18