Mercurial > hg > ltpda
comparison m-toolbox/classes/@minfo/getEncodedString.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 | |
2 function info = getEncodedString(obj) | |
3 | |
4 % Make some plausibility checks | |
5 if numel(obj) > 1 | |
6 error('### It is not possible to encode more than one minfo objects.'); | |
7 end | |
8 % if ~isempty(obj.children) | |
9 % error('### It is not possible to encode an minfo object with children.'); | |
10 % end | |
11 if ~isempty(obj.sets) | |
12 warning('LTPDA:ENCODE_MINFO', '!!! Can not encode the sets of the minfo object (mname: %s)', obj.mname); | |
13 end | |
14 if ~isempty(obj.plists) | |
15 warning('LTPDA:ENCODE_MINFO', '!!! Can not encode the plists of the minfo object (mname: %s)', obj.mname); | |
16 end | |
17 | |
18 sep = '#'; | |
19 info = ''; | |
20 | |
21 info = [info sep obj.mname]; | |
22 info = [info sep obj.mclass]; | |
23 info = [info sep obj.mcategory]; | |
24 info = [info sep utils.xml.prepareVersionString(obj.mversion)]; | |
25 | |
26 args = [obj.argsmin obj.argsmax obj.outmin obj.outmax]; | |
27 info = [info sep utils.xml.mat2str(args)]; | |
28 | |
29 if (obj.modifier) | |
30 info = [info sep 'true']; | |
31 else | |
32 info = [info sep 'false']; | |
33 end | |
34 info = [info sep 'dummy']; % version dummy. We have to keep it for backwards compatibility. | |
35 | |
36 info = [info sep obj.description]; | |
37 | |
38 end |