Home > phiwave > phiw_arm.m

phiw_arm

PURPOSE ^

wrapper function for Phiwave marmoire object

SYNOPSIS ^

function varargout = phiw_arm(action, varargin)

DESCRIPTION ^

 wrapper function for Phiwave marmoire object
 FORMAT varargout = phiw_arm(action, varargin)
 
 This only to make the phiwave.m code prettier
 See the help for the marmoire object for details
 
 $Id: phiw_arm.m,v 1.3 2005/06/05 04:42:22 matthewbrett Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varargout = phiw_arm(action, varargin)
0002 % wrapper function for Phiwave marmoire object
0003 % FORMAT varargout = phiw_arm(action, varargin)
0004 %
0005 % This only to make the phiwave.m code prettier
0006 % See the help for the marmoire object for details
0007 %
0008 % $Id: phiw_arm.m,v 1.3 2005/06/05 04:42:22 matthewbrett Exp $
0009 
0010 global PHI
0011 if ~isfield(PHI, 'ARMOIRE')
0012   error('Global structure does not contain marmoire object');
0013 end
0014 
0015 if nargin < 1
0016   error('Need action');
0017 end
0018 
0019 o = PHI.ARMOIRE;
0020 
0021 switch lower(action)
0022  case 'get'
0023   [varargout{1} o varargout{2}] = get_item_data(o, varargin{:});
0024  case 'set'
0025   [o varargout{1}] = set_item_data(o, varargin{:});
0026  case 'clear'
0027   [o varargout{1}] = clear_item_data(o, varargin{:});
0028  case 'set_ui'
0029   [o varargout{1}] = set_item_data_ui(o, varargin{:});  
0030  case 'update'
0031   [o varargout{1}] = update_item_data(o, varargin{:});
0032  case 'set_param'
0033   o = set_item_param(o, varargin{:});
0034  case 'save'
0035   [varargout{1} o] = save_item_data(o, varargin{:});
0036  case 'save_ui'
0037   [varargout{1} o] = save_item_data_ui(o, varargin{:});
0038  case 'isempty'
0039   varargout{1} = isempty_item_data(o, varargin{:});
0040  case 'item_exists'
0041   varargout{1} = item_exists(o, varargin{:});
0042  case 'show_summary'
0043   if nargin < 2, error('Need item name'); end
0044   item_name = varargin{1};
0045   if ~item_exists(o, item_name)
0046     error(['What is ' item_name '?']);
0047   end
0048   if phiw_arm('isempty', item_name)
0049     S = {'[Empty]'};
0050   else
0051     S  = summary(get_item_data(o, item_name));
0052     fn = get_item_param(o, item_name, 'file_name');
0053     if isempty(fn), fn = '[Not set]'; end
0054     S  = [{['Filename: ' fn]} S];
0055   end  
0056   mars_utils('graphic_text', S, get_item_param(o, item_name, 'title'));
0057  otherwise
0058   error(['Weird: ' action]);
0059 end
0060 
0061 PHI.ARMOIRE = o;

Generated on Wed 06-Jul-2005 18:07:21 by m2html © 2003