# Path: ipet/concepts/Observer.py
# class Observable:
#     """
#     observables represent the client in the Observer pattern. They have the possibility to nofify their
#     observers and invoke an update every time they change their state
#     """
#     observermap = {}  # : map which has observables as keys, and observers as values
#     def addObserver(self, newobserver):
#         """
#         add an observer to the list of observers
#         """
#         theset = Observable.observermap.setdefault(self, set())
# 
#         theset.add(newobserver)
# 
#     def removeObserver(self, observer):
#         """
#         removes an observer from the list of observers
#         """
#         theset = Observable.observermap.get(self)
#         if theset is not None:
#             theset.remove(observer)
# 
#     def notify(self, *args):
#         """
#         notify all observers about changes in the state
#         """
#         theset = Observable.observermap.setdefault(self, set())
#         for observer in theset:
#             observer.update(*args)
# 
# Path: ipet/concepts/IPETMessageStream.py
# class Message:
#     """
#     class for representing state messages to the user
#     
#     a Message contains a string message and a type
#     """
#     MESSAGETYPE_WARNING = 1
#     MESSAGETYPE_ERROR = 2
#     MESSAGETYPE_INFO = 3
#     MESSAGETYPE_DEBUG = 4
#     messagetypes = {MESSAGETYPE_WARNING, MESSAGETYPE_INFO, MESSAGETYPE_ERROR, MESSAGETYPE_DEBUG}
# 
#     def __init__(self, stringmessage, messagetype):
#         """
#         """
#         self.stringmessage = stringmessage
#         if messagetype not in Message.messagetypes:
#             raise ValueError(Message("Error: wrong messagetype %s, must be in %s" % (repr(messagetype), str(Message.messagetypes)), Message.MESSAGETYPE_ERROR))
#         self.messagetype = messagetype
# 
#     def __str__(self):
#         return self.stringmessage
#     def __unicode__(self):
#         return str(self.stringmessage)
#     def __repr__(self):
#         return self.stringmessage


from .Observer import Observable
from .IPETMessageStream import Message
"""
The MIT License (MIT)

Copyright (c) 2018 Zuse Institute Berlin, www.zib.de

Permissions are granted as stated in the license file you have obtained
with this software. If you find the library useful for your purpose,
please refer to README.md for how to cite IPET.

@author: Gregor Hendel
"""

# Path: ipet/concepts/Observer.py
# class Observable:
#     """
#     observables represent the client in the Observer pattern. They have the possibility to nofify their
#     observers and invoke an update every time they change their state
#     """
#     observermap = {}  # : map which has observables as keys, and observers as values
#     def addObserver(self, newobserver):
#         """
#         add an observer to the list of observers
#         """
#         theset = Observable.observermap.setdefault(self, set())
# 
#         theset.add(newobserver)
# 
#     def removeObserver(self, observer):
#         """
#         removes an observer from the list of observers
#         """
#         theset = Observable.observermap.get(self)
#         if theset is not None:
#             theset.remove(observer)
# 
#     def notify(self, *args):
#         """
#         notify all observers about changes in the state
#         """
#         theset = Observable.observermap.setdefault(self, set())
#         for observer in theset:
#             observer.update(*args)
# 
# Path: ipet/concepts/IPETMessageStream.py
# class Message:
#     """
#     class for representing state messages to the user
#     
#     a Message contains a string message and a type
#     """
#     MESSAGETYPE_WARNING = 1
#     MESSAGETYPE_ERROR = 2
#     MESSAGETYPE_INFO = 3
#     MESSAGETYPE_DEBUG = 4
#     messagetypes = {MESSAGETYPE_WARNING, MESSAGETYPE_INFO, MESSAGETYPE_ERROR, MESSAGETYPE_DEBUG}
# 
#     def __init__(self, stringmessage, messagetype):
#         """
#         """
#         self.stringmessage = stringmessage
#         if messagetype not in Message.messagetypes:
#             raise ValueError(Message("Error: wrong messagetype %s, must be in %s" % (repr(messagetype), str(Message.messagetypes)), Message.MESSAGETYPE_ERROR))
#         self.messagetype = messagetype
# 
#     def __str__(self):
#         return self.stringmessage
#     def __unicode__(self):
#         return str(self.stringmessage)
#     def __repr__(self):
#         return self.stringmessage


# Path: ipet/concepts/Manager.py
from .Observer import Observable
from .IPETMessageStream import Message

"""
The MIT License (MIT)

Copyright (c) 2018 Zuse Institute Berlin, www.zib.de

Permissions are granted as stated in the license file you have obtained
with this software. If you find the library useful for your purpose,
please refer to README.md for how to cite IPET.

@author: Gregor Hendel
"""

class Manager(Observable):