Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization - 1.35] Unregistered Class Exception
From: Soumen (soumen78_at_[hidden])
Date: 2009-12-01 10:27:23


I'm revisiting the item - now I think I've fair idea of the problem but not
the solution.

My class structure is as described before:

> > FilterCondition <---+--- CompositeCondition
> > |
> > +--- ConcreteCondition

CompositeCondition is "composed of" FilterCondition. Class "Table" is
serializable and is "composed of" FilterCondition. FilterCondition is ABC.

Class FilterCondition is defined in FilterCondition.h
Class CompositeCondition is defined in CompositeCondition.h
Class ConcreteCondition is defined in ConcreteCondition.h
Class Table is defined in Table.h

Class Table1, Table2, Table3, ... are derived from class Table and are
serializable and all are defined in Table.h

All Table1, Table2, Table3, ... are exported in Export.h - this is done to
minimize compile time overhead as Table.h is included in many .cpp files.

Now, if I do export of ConcreteCondition and CompositeCondition in Export.h,
it causes "unregistered class" exception as the line in Table.h which does
serialization of FilterCondition is unaware of dynamic type of
FilterCondition member (as Export.h is not included in Table.h - otherwise I
may face the compilation run time problem again). And if I export
ConcreteCondition in ConcreteCondition.h and same for CompositeCondition, I
get compilation error due to conflict in expanded export instantiation.

Can someone suggest me how to solve this problem?

~ Soumen

View this message in context:
Sent from the Boost - Users mailing list archive at

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at