boost::openmethod::missing_class
Missing class.
Synopsis
Declared in <boost/openmethod/preamble.hpp>
struct missing_class
: openmethod_error
Description
A class used as a virtual parameter in a method, an overrider or a method call was not registered.
Examples
|
The error goes to the registry's |
Missing registration of a class used as a virtual parameter in a method:
BOOST_OPENMETHOD_CLASSES(Dog); // Animal is missing
BOOST_OPENMETHOD(poke, (virtual_ptr<Animal>), void);
BOOST_OPENMETHOD_OVERRIDE(poke, (virtual_ptr<Dog>), void) {
// ...
}
// aborts with error message: unknown class Animal
initialize();
Missing registration of a class used as a virtual parameter in an overrider:
BOOST_OPENMETHOD_CLASSES(Animal); // Dog is missing
BOOST_OPENMETHOD(poke, (virtual_ptr<Animal>), void);
BOOST_OPENMETHOD_OVERRIDE(poke, (virtual_ptr<Dog>), void) {
// ...
}
// aborts with error message: unknown class Dog
initialize();
Missing registration of a class used as a virtual parameter in a call:
// Bulldog is missing
BOOST_OPENMETHOD_CLASSES(Animal, Dog);
BOOST_OPENMETHOD(poke, (virtual_ptr<Animal>), void);
BOOST_OPENMETHOD_OVERRIDE(poke, (virtual_ptr<Dog>), void) {
// ...
}
Bulldog hector;
// aborts with error message: unknown class Bulldog
poke(hector);
See Also
Created with MrDocs