code: function(ctor)
  	{
  		var codec = null;
  		
  		if (ctor != null)
  		{
  			var name = mxUtils.getFunctionName(ctor);
  			var tmp = mxCodecRegistry.aliases[name];
  			
  			if (tmp != null)
  			{
  				name = tmp;
  			}
  			
  			codec = mxCodecRegistry.codecs[name];
  			
  			// Registers a new default codec for the given constructor
  			// if no codec has been previously defined.
  			if (codec == null)
  			{
  				try
  				{
  					codec = new mxObjectCodec(new ctor());
  					mxCodecRegistry.register(codec);
  				}
  				catch (e)
  				{
  					// ignore
  				}
  			}
  		}
  		
  		return codec;
  	}
docs: Function: getCodec
  
  Returns a codec that handles objects that are constructed
  using the given constructor.
  
  Parameters:
  
  ctor - JavaScript constructor function.