Home > classes > @cdata > get.m

get

PURPOSE ^

GET get csdata properties.

SYNOPSIS ^

function val = get(c, propName)

DESCRIPTION ^

 GET get csdata properties.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: GET get csdata properties.

 CALL:        name    = get(c, 'name');
              created = get(c, 'created');
              version = get(c, 'version');
              y       = get(c, 'y');
              y       = get(c, 'vals');
              x       = get(c, 'x');
              x       = get(c, 'tags');
              xunit   = get(c, 'xunits');
              yunit   = get(c, 'yunits');

 VERSION:     $Id: get.html,v 1.14 2008/03/31 10:27:37 hewitson Exp $

 HISTORY:     30-01-07 M Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function val = get(c, propName)
0002 % GET get csdata properties.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: GET get csdata properties.
0007 %
0008 % CALL:        name    = get(c, 'name');
0009 %              created = get(c, 'created');
0010 %              version = get(c, 'version');
0011 %              y       = get(c, 'y');
0012 %              y       = get(c, 'vals');
0013 %              x       = get(c, 'x');
0014 %              x       = get(c, 'tags');
0015 %              xunit   = get(c, 'xunits');
0016 %              yunit   = get(c, 'yunits');
0017 %
0018 % VERSION:     $Id: get.html,v 1.14 2008/03/31 10:27:37 hewitson Exp $
0019 %
0020 % HISTORY:     30-01-07 M Hewitson
0021 %                 Creation
0022 %
0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0024 
0025 VERSION       = '$Id: get.html,v 1.14 2008/03/31 10:27:37 hewitson Exp $';
0026 CATEGORY      = 'Helper';
0027 DEFAULT_PLIST =  plist('property', '');
0028 
0029 %%% If prop_name is a plist then extrat the poperty name from the plist.
0030 if isa(propName, 'plist')
0031   propName = find(propName, 'property');
0032   if isempty(propName)
0033     error ('### The plist does not contain the ''key'' = ''property''');
0034   end
0035 end
0036 
0037 %%% Special case: If propName is equal to 'vals' then return the 'y' property
0038 if strcmp(propName, 'vals')
0039     val = c.y;
0040     return
0041 
0042 %%% Special case: If propName is equal to 'tags' then return the 'x' property
0043 elseif strcmp(propName, 'tags')
0044   val = c.x;
0045   return
0046 end
0047 
0048 val = generic_get(c, propName, DEFAULT_PLIST, VERSION, CATEGORY);
0049

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003