from PY_VTS.mgr.File_Types.DBC import *

class Mgr_Files:
    obj_count = 0
    files = {}

    def __init__(self):
        if Mgr_Files.obj_count != 0:
            raise Exception('File Mgr: there can be only one')
        Mgr_Files.obj_count += 1

    @classmethod
    def load_file(cls, key, location, type):
        if type == "DBC":
            cls.files[key] = DBC(location)

    @classmethod
    def remove_file(cls, key):
        del cls.files[key]
