LCOV - code coverage report
Current view: top level - eq - nodeFactory.cpp (source / functions) Hit Total Coverage
Test: Equalizer Lines: 36 51 70.6 %
Date: 2017-12-16 05:07:20 Functions: 15 22 68.2 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2009-2010, 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 "nodeFactory.h"
      19             : 
      20             : #include "canvas.h"
      21             : #include "channel.h"
      22             : #include "client.h"
      23             : #include "config.h"
      24             : #include "layout.h"
      25             : #include "node.h"
      26             : #include "observer.h"
      27             : #include "pipe.h"
      28             : #include "segment.h"
      29             : #include "server.h"
      30             : #include "view.h"
      31             : #include "window.h"
      32             : 
      33             : namespace eq
      34             : {
      35           0 : Config* NodeFactory::createConfig(ServerPtr parent)
      36             : {
      37           0 :     return new Config(parent);
      38             : }
      39           0 : void NodeFactory::releaseConfig(Config* config)
      40             : {
      41           0 :     delete config;
      42           0 : }
      43             : 
      44           0 : Node* NodeFactory::createNode(Config* parent)
      45             : {
      46           0 :     return new Node(parent);
      47             : }
      48           1 : void NodeFactory::releaseNode(Node* node)
      49             : {
      50           1 :     delete node;
      51           1 : }
      52             : 
      53           1 : Observer* NodeFactory::createObserver(Config* parent)
      54             : {
      55           1 :     return new Observer(parent);
      56             : }
      57           1 : void NodeFactory::releaseObserver(Observer* observer)
      58             : {
      59           1 :     delete observer;
      60           1 : }
      61             : 
      62           7 : Layout* NodeFactory::createLayout(Config* parent)
      63             : {
      64           7 :     return new Layout(parent);
      65             : }
      66           7 : void NodeFactory::releaseLayout(Layout* layout)
      67             : {
      68           7 :     delete layout;
      69           7 : }
      70             : 
      71           0 : View* NodeFactory::createView(Layout* parent)
      72             : {
      73           0 :     return new View(parent);
      74             : }
      75           8 : void NodeFactory::releaseView(View* view)
      76             : {
      77           8 :     delete view;
      78           8 : }
      79             : 
      80           1 : Canvas* NodeFactory::createCanvas(Config* parent)
      81             : {
      82           1 :     return new Canvas(parent);
      83             : }
      84           1 : void NodeFactory::releaseCanvas(Canvas* canvas)
      85             : {
      86           1 :     delete canvas;
      87           1 : }
      88             : 
      89           1 : Segment* NodeFactory::createSegment(Canvas* parent)
      90             : {
      91           1 :     return new Segment(parent);
      92             : }
      93           1 : void NodeFactory::releaseSegment(Segment* segment)
      94             : {
      95           1 :     delete segment;
      96           1 : }
      97             : 
      98           0 : Pipe* NodeFactory::createPipe(Node* parent)
      99             : {
     100           0 :     return new Pipe(parent);
     101             : }
     102           2 : void NodeFactory::releasePipe(Pipe* pipe)
     103             : {
     104           2 :     delete pipe;
     105           2 : }
     106             : 
     107           0 : Window* NodeFactory::createWindow(Pipe* parent)
     108             : {
     109           0 :     return new Window(parent);
     110             : }
     111           2 : void NodeFactory::releaseWindow(Window* window)
     112             : {
     113           2 :     delete window;
     114           2 : }
     115             : 
     116           0 : Channel* NodeFactory::createChannel(Window* parent)
     117             : {
     118           0 :     return new Channel(parent);
     119             : }
     120             : 
     121           2 : void NodeFactory::releaseChannel(Channel* channel)
     122             : {
     123           2 :     delete channel;
     124           2 : }
     125          30 : }

Generated by: LCOV version 1.11