Howto talk:Hacking Inkscape to add Canvas support

Revision as of 19:09, 5 January 2018 by Hooray (Talk | contribs) (CRUDable interface: new section)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Revision as of 19:09, 5 January 2018 by Hooray (Talk | contribs) (CRUDable interface: new section)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CRUDable interface

from abc import ABC, abstractmethod
 
class AbstractCRUDClass(ABC):
 
    def __init__(self, value):
        self.value = value
        super().__init__()
    
    @abstractmethod
    def create(self):
        pass


    @abstractmethod
    def update(self):
        pass


    @abstractmethod
    def delete(self):
        pass

class MFDPage(AbstractCRUDClass):
    def create(self):
        return 
    def update(self):
        return 
    def delete(self):
        return 


class MFDPageElement(AbstractCRUDClass):
    def create(self):
        return 
    def update(self):
        return 
    def delete(self):
        return
Return to "Hacking Inkscape to add Canvas support" page.