view m-toolbox/classes/@data3D/fromStruct.m @ 26:ce4df2e95a55 database-connection-manager

Remove LTPDARepositoryManager initialization
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% FROMSTRUCT sets all properties which are defined in the data3D class from the structure to the input object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FUNCTION:    fromStruct
%
% DESCRIPTION: Sets all properties which are defined in the data3D 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.1 2010/12/20 20:41:39 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function obj = fromStruct(obj, obj_struct)
  
  % Call super-class
  obj = fromStruct@data2D(obj, obj_struct);
  
  % Set 'zunits' object
  if isfield(obj_struct, 'zunits')
    obj.zunits = utils.helper.getObjectFromStruct(obj_struct.zunits);
  end
  
  % Set 'z' object
  if isfield(obj_struct, 'z')
    obj.z = obj_struct.z;
  end
  
end