import grok
import zope.i18nmessageid
from waeup.sirp.interfaces import ISIRPObject
from zope.annotation.attribute import AttributeAnnotations
from zope.annotation.interfaces import IAnnotations

MessageFactory = zope.i18nmessageid.MessageFactory('waeup.sirp')

class SIRPAttributeAnnotations(AttributeAnnotations, grok.Adapter):
    """An adapter to IAnnotations for any SIRPObject.

    Providing this adapter, each SIRP object becomes (attribute)
    annotatable.
    """
    grok.provides(IAnnotations)
    grok.context(ISIRPObject)
