LCOV - code coverage report
Current view: top level - eq/server - layout.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 1 1 100.0 %
Date: 2017-12-16 05:07:20 Functions: 1 1 100.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2009-2016, 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             : #ifndef EQSERVER_LAYOUT_H
      19             : #define EQSERVER_LAYOUT_H
      20             : 
      21             : #include "types.h"
      22             : #include "visitorResult.h" // enum
      23             : #include <eq/server/api.h>
      24             : 
      25             : #include <eq/fabric/layout.h> // base class
      26             : #include <string>
      27             : 
      28             : namespace eq
      29             : {
      30             : namespace fabric
      31             : {
      32             : template <class L, class V, class O>
      33             : class View;
      34             : }
      35             : namespace server
      36             : {
      37             : /** The layout. @sa eq::Layout */
      38             : class Layout : public fabric::Layout<Config, Layout, View>
      39             : {
      40             : public:
      41             :     /** Construct a new Layout. */
      42             :     EQSERVER_API explicit Layout(Config* parent);
      43             : 
      44             :     /** Destruct this layout. */
      45             :     virtual ~Layout();
      46             : 
      47             :     /** @name Data Access */
      48             :     //@{
      49             :     /** @return the Server of this layout. @version 1.0 */
      50             :     ServerPtr getServer();
      51             :     //@}
      52             : 
      53             :     /** @return true if this layout should be deleted. */
      54          28 :     bool needsDelete() const { return _state == STATE_DELETE; }
      55             :     /** @name Operations */
      56             :     //@{
      57             :     /**
      58             :      * Trigger a layout (de)activation
      59             :      *
      60             :      * @param canvas The canvas triggering the (de)activation.
      61             :      * @param active true to activate, false to deactivate.
      62             :      */
      63             :     void trigger(const Canvas* canvas, const bool active);
      64             : 
      65             :     /** Schedule deletion of this layout. */
      66             :     void postDelete();
      67             :     //@}
      68             : 
      69             :     /** Client-provided pixel viewport change. */
      70             :     void notifyViewportChanged() override;
      71             : 
      72             : private:
      73             :     enum State
      74             :     {
      75             :         STATE_ACTIVE = 0, // next: DELETE
      76             :         STATE_DELETE,     // next: destructor
      77             :     } _state;
      78             : };
      79             : 
      80             : std::ostream& operator<<(std::ostream& os, const Layout* layout);
      81             : }
      82             : }
      83             : #endif // EQSERVER_LAYOUT_H

Generated by: LCOV version 1.11