Mercurial > hg > ltpda
annotate m-toolbox/classes/+utils/@helper/getObjectFromStruct.m @ 49:0bcdf74587d1 database-connection-manager
Cleanup
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:36 +0100 |
parents | f0afece42f48 |
children |
rev | line source |
---|---|
0 | 1 |
2 | |
3 function obj = getObjectFromStruct(obj_struct) | |
4 | |
5 if isa(obj_struct, 'ltpda_obj') | |
6 obj = obj_struct; | |
7 else | |
8 objCl = utils.helper.getClassFromStruct(obj_struct); | |
9 if ~isempty(objCl) | |
10 % Call constructor of the data class | |
11 obj = feval(objCl, obj_struct); | |
12 else | |
13 obj = obj_struct; | |
14 end | |
15 end | |
16 | |
17 end |