function [m,b]=gfMdState(a, varargin)
% gfMdState class pseudo-constructor
  this_class = 'gfMdState';
  if (nargin==0) error('cant create an empty mdstate reference'); end;
  if (isa(a,this_class)),
    m=a;
  else
    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
      cname = gf_workspace('class name',a);
      if (strcmp(cname, this_class))
	 m = a;
      else
	 m = gf_mdstate(a,varargin{:});
      end;
    else
      m = gf_mdstate(a,varargin{:});
    end;
    m.txt = '';
    m = class(m, this_class);
  end;
% autogenerated mfile;
