16 lines
382 B
Python
16 lines
382 B
Python
from _Constants import ObjectTypes
|
|
|
|
from _PersonFrame import PersonFrame
|
|
|
|
from _FamilyFrame import FamilyFrame
|
|
|
|
|
|
class ObjectFrameFactory(object):
|
|
__frame_creators = {ObjectTypes.PERSON: PersonFrame,
|
|
ObjectTypes.FAMILY: FamilyFrame}
|
|
|
|
def get_frame(self,object_type,dbstate):
|
|
return self.__class__.__frame_creators[object_type](dbstate)
|
|
|
|
|