1 # vim: tabstop=4 shiftwidth=4 softtabstop=4
2 # -*- coding: utf-8 -*-
5 from ftg.flowobject import FlowObject
8 class FlowEntry(FlowObject):
11 def __init__(self, match_exp, instructions=[], counter="", label="", type=DEFAULT_TYPE, metadata={}):
12 self.match_exp = match_exp
13 self.instructions = instructions
14 self.counter = counter
17 self.metadata = metadata
19 def set_match_exp(self, match_exp):
20 self.match_exp = match_exp
22 def get_match_exp(self):
25 def set_instructions(self, instructions):
26 self.instructions = instructions
28 def get_instructions(self):
29 return self.instructions
31 def set_counter(self, counter):
32 self.counter = counter
34 def get_counter(self):
38 return "\"" + self.match_exp + "\",\"" + ",".join(self.instructions) + "\""