w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRw11VirtFactory.cpp
Go to the documentation of this file.
1// $Id: RtclRw11VirtFactory.cpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2017-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2018-12-02 1076 2.0 use unique_ptr
8// 2017-03-11 589 1.0 Initial version
9// ---------------------------------------------------------------------------
10
17
20
22
23using namespace std;
24
25// all method definitions in namespace Retro (avoid using in includes...)
26namespace Retro {
27
28//------------------------------------------+-----------------------------------
30
31std::unique_ptr<RtclRw11Virt> RtclRw11VirtFactory(Rw11Virt* pobj)
32{
33 // 'factory section', create concrete RtclRw11Virt objects
34 typedef std::unique_ptr<RtclRw11Virt> virt_uptr_t;
35
36 Rw11VirtDiskOver* pdiskover = dynamic_cast<Rw11VirtDiskOver*>(pobj);
37 if (pdiskover) {
38 return virt_uptr_t(new RtclRw11VirtDiskOver(pdiskover));
39 }
40 Rw11VirtDiskRam* pdiskram = dynamic_cast<Rw11VirtDiskRam*>(pobj);
41 if (pdiskram) {
42 return virt_uptr_t(new RtclRw11VirtDiskRam(pdiskram));
43 }
44
45 return virt_uptr_t();
46}
47
48} // end namespace Retro
FIXME_docs.
Definition: Rw11Virt.hpp:34
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47
std::unique_ptr< RtclRw11Virt > RtclRw11VirtFactory(Rw11Virt *pobj)
FIXME_docs.