Home > phiwave > @phido_99 > phido_99.m

phido_99

PURPOSE ^

class constructor for SPM99 phiwave design object

SYNOPSIS ^

function [o, others] = phido_99(params, others, phido_o)

DESCRIPTION ^

 class constructor for SPM99 phiwave design object
 FORMAT [o, others] = phido_99(params, others, phido_o)

 Inputs  
 params  -  one of:
            - string, specifying SPM99 design file, OR
            - structure, which can:
               contain SPM99/MarsBaR design or
               contain fields for mardo_99 object, which should include
               'des_struct', containing design structure
 others  - structure, containing extra fields for object (or parent)
 phido_o - (optional) phido object to inherit from

 Outputs
 o       - phido_99 object (unless disowned)
 others  - any unrecognized fields from params, others

 This object may be called from the phido object contructor with a mardo
 and phido object as input, or called directly.  The container makes no
 attempt to check if this is really an SPM99 design.

 $Id: phido_99.m,v 1.7 2004/11/18 18:57:14 matthewbrett Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [o, others] = phido_99(params, others, phido_o)
0002 % class constructor for SPM99 phiwave design object
0003 % FORMAT [o, others] = phido_99(params, others, phido_o)
0004 %
0005 % Inputs
0006 % params  -  one of:
0007 %            - string, specifying SPM99 design file, OR
0008 %            - structure, which can:
0009 %               contain SPM99/MarsBaR design or
0010 %               contain fields for mardo_99 object, which should include
0011 %               'des_struct', containing design structure
0012 % others  - structure, containing extra fields for object (or parent)
0013 % phido_o - (optional) phido object to inherit from
0014 %
0015 % Outputs
0016 % o       - phido_99 object (unless disowned)
0017 % others  - any unrecognized fields from params, others
0018 %
0019 % This object may be called from the phido object contructor with a mardo
0020 % and phido object as input, or called directly.  The container makes no
0021 % attempt to check if this is really an SPM99 design.
0022 %
0023 % $Id: phido_99.m,v 1.7 2004/11/18 18:57:14 matthewbrett Exp $
0024   
0025 myclass = 'phido_99';
0026 cvs_v   = mars_cvs_version(myclass);
0027 
0028 % Default object structure; see also paramfields.m
0029 defstruct = [];
0030 
0031 if nargin < 1
0032   defstruct.cvs_version = cvs_v;
0033   o = class(defstruct, myclass, phido, mardo_99);
0034   others = [];
0035   return
0036 end
0037 if nargin < 2
0038   others = [];
0039 end
0040 
0041 % Deal with passed objects of this (or child) class
0042 if isa(params, myclass)
0043   o = params;
0044   % Check for simple form of call
0045   if isempty(others), return, end
0046 
0047   % Otherwise, we are being asked to set fields of object
0048   % (Moot at the moment, as there are no fields specific for this object)
0049   [p others] = mars_struct('split', others, defstruct);
0050   return
0051 end
0052 
0053 if nargin < 3
0054   [phido_o params] = phido([], params, 0);
0055 end
0056 
0057 % send design to mardo_99
0058 [mardo_o others] = mardo_99(params, others);
0059 
0060 % fill params with defaults, parse into fields for this object, children
0061 [params, others] = mars_struct('ffillsplit', defstruct, others);
0062 
0063 % add cvs tag
0064 params.cvs_version = cvs_v;
0065 
0066 % set the phido_99 object
0067 o  = class(params, myclass, phido_o, mardo_o);
0068 
0069 return

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