Static class that acts as a global registry for codecs. See mxCodec for an example of using this class.
More...
|
static mxObjectCodec | Register (mxObjectCodec codec) |
| Registers a new codec and associates the name of the template constructor in the codec with the codec object. Automatically creates an alias if the codename and the classname are not equal. More...
|
|
static void | AddAlias (string classname, string codecname) |
| Adds an alias for mapping a classname to a codecname. More...
|
|
static mxObjectCodec | GetCodec (String name) |
| Returns a codec that handles the given object, which can be an object instance or an XML node. More...
|
|
static void | AddNamespace (String ns) |
| Adds the given namespace to the list of known namespaces. More...
|
|
static Object | GetInstanceForName (String name) |
| Creates and returns a new instance for the given class name. More...
|
|
static Type | GetTypeForName (String name) |
| Returns a class that corresponds to the given name. More...
|
|
static String | GetName (Object instance) |
| Returns the name that identifies the codec associated with the given instance. The I/O system uses unqualified classnames, eg. for a com.mxgraph.model.mxCell this returns mxCell. More...
|
|
|
static Dictionary< string,
mxObjectCodec > | codecs = new Dictionary<string, mxObjectCodec>() |
| Maps from constructor names to codecs. More...
|
|
static Dictionary< string, string > | aliases = new Dictionary<string, string>() |
| Maps from classnames to codecnames. More...
|
|
static List< string > | namespaces = new List<string>() |
| Holds the list of known namespaces. Packages are used to prefix short class names (eg. mxCell) in XML markup. More...
|
|
Static class that acts as a global registry for codecs. See mxCodec for an example of using this class.
static void com.mxgraph.mxCodecRegistry.AddAlias |
( |
string |
classname, |
|
|
string |
codecname |
|
) |
| |
|
inlinestatic |
Adds an alias for mapping a classname to a codecname.
static void com.mxgraph.mxCodecRegistry.AddNamespace |
( |
String |
ns | ) |
|
|
inlinestatic |
Adds the given namespace to the list of known namespaces.
- Parameters
-
ns | Name of the namespace to be added. |
static mxObjectCodec com.mxgraph.mxCodecRegistry.GetCodec |
( |
String |
name | ) |
|
|
inlinestatic |
Returns a codec that handles the given object, which can be an object instance or an XML node.
- Parameters
-
- Returns
static Object com.mxgraph.mxCodecRegistry.GetInstanceForName |
( |
String |
name | ) |
|
|
inlinestatic |
Creates and returns a new instance for the given class name.
- Parameters
-
name | Name of the class to be instantiated. |
- Returns
- Returns a new instance of the given class.
static String com.mxgraph.mxCodecRegistry.GetName |
( |
Object |
instance | ) |
|
|
inlinestatic |
Returns the name that identifies the codec associated with the given instance. The I/O system uses unqualified classnames, eg. for a com.mxgraph.model.mxCell this returns mxCell.
- Parameters
-
instance | Instance whose node name should be returned. |
- Returns
- Returns a string that identifies the codec.
static Type com.mxgraph.mxCodecRegistry.GetTypeForName |
( |
String |
name | ) |
|
|
inlinestatic |
Returns a class that corresponds to the given name.
- Parameters
-
- Returns
Registers a new codec and associates the name of the template constructor in the codec with the codec object. Automatically creates an alias if the codename and the classname are not equal.
References com.mxgraph.mxObjectCodec.Template.
Dictionary<string, string> com.mxgraph.mxCodecRegistry.aliases = new Dictionary<string, string>() |
|
staticprotected |
Maps from classnames to codecnames.
Maps from constructor names to codecs.
List<string> com.mxgraph.mxCodecRegistry.namespaces = new List<string>() |
|
staticprotected |
Holds the list of known namespaces. Packages are used to prefix short class names (eg. mxCell) in XML markup.
The documentation for this class was generated from the following file:
- src/io/mxCodecRegistry.cs