function(codec)
	{
		if (codec != null)
		{
			var name = codec.getName();
			mxCodecRegistry.codecs[name] = codec;
			
			var classname = mxUtils.getFunctionName(codec.template.constructor);

			if (classname != name)
			{
				mxCodecRegistry.addAlias(classname, name);
			}
		}

		return codec;
	}
function(codec)
	{
		if (codec != null)
		{
			var name = codec.getName();
			mxCodecRegistry.codecs[name] = codec;
			
			var classname = mxUtils.getFunctionName(codec.template.constructor);

			if (classname != name)
			{
				mxCodecRegistry.addAlias(classname, name);
			}
		}

		return codec;
	}
function ( codec ) { if ( codec != null ) { var name = codec . getName ( ) ; mxCodecRegistry . codecs [ name ] = codec ; var classname = mxUtils . getFunctionName ( codec . template . constructor ) ; if ( classname != name ) { mxCodecRegistry . addAlias ( classname , name ) ; } } return codec ; }
Function: register

Registers a new codec and associates the name of the template
constructor in the codec with the codec object.

Parameters:

codec - <mxObjectCodec> to be registered.
Function : register
Registers a codec