Registry 配准
A component (interface implementation) can be added to a registry. The component is typically registered along its implementation (see 接口实现 ).
A given component can be registered at a registry using the MAXON_COMPONENT_CLASS_REGISTER macro. It is used to add the component to the registry and to define its ID:
// This example implements the given interface, registers // the component and adds it to the given registry.// implementation
// register component class and add it to registry "ColorClasses" MAXON_COMPONENT_CLASS_REGISTER (ColorRedImpl, ColorClasses, "net.maxonexample.class.colors.red" )