#
# <one line to give the library's name and an idea of what it does.>
# Copyright (C) 2014  <copyright holder> <email>
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 
#

import abc

class MergerInterface(object):
  """!
  Interface for any merger info grafon project.
  
  The genral idea of merginig base on merge two graphs into one using 
  different inidcators (the indicator is connected with the merger
  implementation and depends on the method to merging both graphs)
  """
  __metaclass__ = abc.ABCMeta

  def __init__(self, str_name, bg):
    """! Constructor - set string like repr and base graph ;)"""
    self.bg = bg
    self._str_name = str_name
  
  def __str__(self):
    return self._str_name

  @abc.abstractmethod
  def merge(self, g1, g2):
    """!
    Abstract function which must be implemented by a child.

    The idea of this method is to merge two graphs given as argument 
    into new one. The returned graph is new and contains nodes/edges
    and other informations from g1 nad g2 (what depend on the merger type)

    @param g1: networkx graph f.e. networkx.DiGraph()
    @param g1: networkx graph f.e. networkx.DiGraph()
    @return new instance of networkx graph
    """
    pass
