def from_module(module): from core.uvcdat.plot_pipeline_helper import PlotPipelineHelper var = Variable.from_module(module) readerParameters = PlotPipelineHelper.get_value_from_function_as_str(module, 'readerParameters') var.set_reader_parameters(readerParameters) return var
def to_module(self, controller): module = Variable.to_module(self, controller, identifier) functions = [] if self.vartype is not None: functions.append(("vartype", [self.vartype])) if self.readerParameters is not None: functions.append(("readerParameters", [self.readerParameters])) functions = controller.create_functions(module, functions) for f in functions: module.add_function(f) return module
def __init__(self, filename=None, name=None, vartype=None, readerParameters=None): Variable.__init__(self, filename, None, None, name, False) self.varname = name self.vartype = vartype self.readerParameters = readerParameters