Line data Source code
1 :
2 : /* Copyright (c) 2009-2015, Stefan Eilemann <eile@equalizergraphics.com>
3 : *
4 : * This library is free software; you can redistribute it and/or modify it under
5 : * the terms of the GNU Lesser General Public License version 2.1 as published
6 : * by the Free Software Foundation.
7 : *
8 : * This library is distributed in the hope that it will be useful, but WITHOUT
9 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 : * details.
12 : *
13 : * You should have received a copy of the GNU Lesser General Public License
14 : * along with this library; if not, write to the Free Software Foundation, Inc.,
15 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 : */
17 :
18 : #include "segment.h"
19 :
20 : #include "canvas.h"
21 : #include "channel.h"
22 : #include "config.h"
23 : #include "pipe.h"
24 : #include "server.h"
25 : #include "window.h"
26 :
27 : #pragma clang diagnostic ignored "-Wunused-private-field" // _impl is unused
28 :
29 : namespace eq
30 : {
31 : typedef fabric::Segment<Canvas, Segment, Channel> Super;
32 :
33 1 : Segment::Segment(Canvas* parent)
34 : : Super(parent)
35 1 : , _impl(0)
36 : {
37 1 : }
38 :
39 2 : Segment::~Segment()
40 : {
41 2 : }
42 :
43 0 : Config* Segment::getConfig()
44 : {
45 0 : LBASSERT(getCanvas());
46 0 : return getCanvas() ? getCanvas()->getConfig() : 0;
47 : }
48 :
49 0 : const Config* Segment::getConfig() const
50 : {
51 0 : LBASSERT(getCanvas());
52 0 : return getCanvas() ? getCanvas()->getConfig() : 0;
53 : }
54 :
55 0 : ServerPtr Segment::getServer()
56 : {
57 0 : Canvas* canvas = getCanvas();
58 0 : LBASSERT(canvas);
59 0 : return (canvas ? canvas->getServer() : 0);
60 : }
61 : }
62 :
63 : #include <eq/fabric/segment.ipp>
64 : template class eq::fabric::Segment<eq::Canvas, eq::Segment, eq::Channel>;
65 : /** @cond IGNORE */
66 : template EQFABRIC_API std::ostream& eq::fabric::operator<<(std::ostream&,
67 30 : const eq::Super&);
68 : /** @endcond */
|