"""
Implementation of an stateful OmniGraph node that counts up by an increment
"""


class OgnIntCounter:
    @staticmethod
    def compute(db):
        if db.inputs.reset:
            db.outputs.count = 0
        else:
            db.outputs.count = db.outputs.count + db.inputs.increment

        return True
