# Path: pyfusion/devices/base.py
# class Device(object):
#     """Represent a laboratory device.  
# 
#     In general, a customised subclass of Device will be used.
#     
#     Usage: Device(device_name, **kwargs)
# 
#     Arguments:
#     device_name -- name of device as listed in configuration file, 
#        i.e.: [Device:device_name]
#     
#     Keyword arguments:
#     Any setting in the [Device:device_name] section of the
#     configuration file can be overridden by supplying a keyword
#     argument to here, e.g.: Device(device_name)
# 
#     """
#     
#     def __init__(self, config_name, **kwargs):
#         if pyfusion.config.pf_has_section('Device', config_name):
#             self.__dict__.update(get_config_as_dict('Device', config_name))
#         self.__dict__.update(kwargs)
#         self.name = config_name
# 
#         #### attach acquisition
#         if hasattr(self, 'acq_name'):
#             acq_class_str = pyfusion.config.pf_get('Acquisition',
#                                           self.acq_name, 'acq_class')
#             self.acquisition = import_from_str(acq_class_str)(self.acq_name)
#             # shortcut
#             self.acq = self.acquisition
#         else:
#             pyfusion.logging.warning(
#                 "No acquisition class specified for device")
# 
# Path: pyfusion/orm/utils.py
# def orm_register():
#     def reg_item(orm_func):
#         pyfusion.orm_manager.add_reg_func(orm_func)
#         return orm_func
#     return reg_item


from pyfusion.devices.base import Device
from pyfusion.orm.utils import orm_register
    from sqlalchemy import Table, Column, Integer, ForeignKey
    from sqlalchemy.orm import mapper

class H1(Device):
    pass

@orm_register()
def orm_load_h1device(man):
    man.h1device_table = Table('h1device', man.metadata, 
                            Column('basedevice_id', Integer, ForeignKey('devices.id'), primary_key=True))

# Path: pyfusion/devices/base.py
# class Device(object):
#     """Represent a laboratory device.  
# 
#     In general, a customised subclass of Device will be used.
#     
#     Usage: Device(device_name, **kwargs)
# 
#     Arguments:
#     device_name -- name of device as listed in configuration file, 
#        i.e.: [Device:device_name]
#     
#     Keyword arguments:
#     Any setting in the [Device:device_name] section of the
#     configuration file can be overridden by supplying a keyword
#     argument to here, e.g.: Device(device_name)
# 
#     """
#     
#     def __init__(self, config_name, **kwargs):
#         if pyfusion.config.pf_has_section('Device', config_name):
#             self.__dict__.update(get_config_as_dict('Device', config_name))
#         self.__dict__.update(kwargs)
#         self.name = config_name
# 
#         #### attach acquisition
#         if hasattr(self, 'acq_name'):
#             acq_class_str = pyfusion.config.pf_get('Acquisition',
#                                           self.acq_name, 'acq_class')
#             self.acquisition = import_from_str(acq_class_str)(self.acq_name)
#             # shortcut
#             self.acq = self.acquisition
#         else:
#             pyfusion.logging.warning(
#                 "No acquisition class specified for device")
# 
# Path: pyfusion/orm/utils.py
# def orm_register():
#     def reg_item(orm_func):
#         pyfusion.orm_manager.add_reg_func(orm_func)
#         return orm_func
#     return reg_item


# Path: pyfusion/devices/H1/device.py
from pyfusion.devices.base import Device
from pyfusion.orm.utils import orm_register
    from sqlalchemy import Table, Column, Integer, ForeignKey
    from sqlalchemy.orm import mapper


class H1(Device):
    pass

@orm_register()
def orm_load_h1device(man):
    man.h1device_table = Table('h1device', man.metadata, 
                            Column('basedevice_id', Integer, ForeignKey('devices.id'), primary_key=True))

    mapper(H1, man.h1device_table, inherits=Device, polymorphic_identity='h1')