LCOV - code coverage report
Current view: top level - servus - listener.h (source / functions) Hit Total Coverage
Test: Servus Lines: 2 2 100.0 %
Date: 2018-10-03 03:09:57 Functions: 2 3 66.7 %

          Line data    Source code
       1             : /* Copyright (c) 2015, Human Brain Project
       2             :  *                     Daniel.Nachbaur@epfl.ch
       3             :  *
       4             :  * This file is part of Servus <https://github.com/HBPVIS/Servus>
       5             :  *
       6             :  * This library is free software; you can redistribute it and/or modify it under
       7             :  * the terms of the GNU Lesser General Public License version 3.0 as published
       8             :  * by the Free Software Foundation.
       9             :  *
      10             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      11             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      12             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      13             :  * details.
      14             :  *
      15             :  * You should have received a copy of the GNU Lesser General Public License
      16             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      17             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      18             :  */
      19             : 
      20             : #ifndef SERVUS_LISTENER_H
      21             : #define SERVUS_LISTENER_H
      22             : 
      23             : namespace servus
      24             : {
      25             : /**
      26             :  * A listener interface which can be implemented to listen on changes of a
      27             :  * Servus instance.
      28             :  *
      29             :  * @version 1.2
      30             :  */
      31           4 : class Listener
      32             : {
      33             : public:
      34           4 :     virtual ~Listener() {}
      35             :     /**
      36             :      * Called after a new instance was added after being discovered.
      37             :      *
      38             :      * @param instance the name of the new instance
      39             :      * @version 1.2
      40             :      */
      41             :     virtual void instanceAdded(const std::string& instance) = 0;
      42             : 
      43             :     /**
      44             :      * Called after an instance was removed from the list of discovered
      45             :      * instances.
      46             :      *
      47             :      * @param instance the name of the instance that was removed.
      48             :      * @version 1.2
      49             :      */
      50             :     virtual void instanceRemoved(const std::string& instance) = 0;
      51             : };
      52             : }
      53             : 
      54             : #endif // SERVUS_LISTENER_H

Generated by: LCOV version 1.11