Mercurial > hg > ltpda
view m-toolbox/classes/@data2D/fromStruct.m @ 51:9d5c88356247 database-connection-manager
Make unit tests database connection parameters configurable
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:37 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% FROMSTRUCT sets all properties which are defined in the data2D class from the structure to the input object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % FUNCTION: fromStruct % % DESCRIPTION: Sets all properties which are defined in the data2D class % from the structure to the input object. % % REMARK: Abstract classes handle only one input object and a % structure with the size 1. % % CALL: obj = fromStruct(obj, struct) % % VERSION: $Id: fromStruct.m,v 1.2 2011/02/14 19:25:14 ingo Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function obj = fromStruct(obj, obj_struct) % Call super-class obj = fromStruct@ltpda_data(obj, obj_struct); % Set 'xunits' object if isfield(obj_struct, 'xunits') obj.xunits = utils.helper.getObjectFromStruct(obj_struct.xunits); end % Set 'x' object if isfield(obj_struct, 'x') obj.x = obj_struct.x; end % Set 'dx' object if isfield(obj_struct, 'dx') obj.dx = obj_struct.dx; end end