### Registration of Valuetype Factories for Event Sinks

Components with one or more event sink (consumer) ports will need to have a valuetype factory registered with the underlying ORB in order to correctly demarshal the state of eventtypes it receives over the wire.

For the common case (eventtypes that contain only one or more state members), the IDL compiler generates a concrete class with a name constructed from the valuetype name and an '_init' suffix, and the CIDL compiler generates a macro in the servant constructor that registers this factory with the container's ORB. However, an eventtype, like any valuetype, may also contain operation and/or factory declarations. In these cases things are not so simple. For example a factory declaration in an IDL valuetype or eventtype will generate a pure virtual function of the same name in the associated _init class, meaning that ORB factory registration for this type must be with a derived factory class written by the application developer. The table below shows all possible cases of IDL compiler factory generation.

| Has Operation | Has No Operation
Has Factory | ABSTRACT FACTORY | ABSTRACT FACTORY
Has No Factory | NO FACTORY | CONCRETE FACTORY

The CIAO CIDL compiler will generate a macro to register the factory with the container's ORB only in the case where a concrete factory is generated by the IDL compiler, and thus no subclassing is necessary. There is also a command line option for the CIDL compiler, `--suppress-register-factory`, that turns off generation of the macro in all cases.