Added TemplateRegisterDotOsgWrapperProxy.

This commit is contained in:
Robert Osfield 2007-09-14 11:01:48 +00:00
parent cb1c916e25
commit 69de74aedf

View File

@ -544,6 +544,21 @@ class RegisterDotOsgWrapperProxy
osg::ref_ptr<DotOsgWrapper> _wrapper;
};
template<class T>
class TemplateRegisterDotOsgWrapperProxy : public RegisterDotOsgWrapperProxy, public T
{
public:
TemplateRegisterDotOsgWrapperProxy(osg::Object* proto,
const std::string& name,
const std::string& associates,
DotOsgWrapper::ReadFunc readFunc,
DotOsgWrapper::WriteFunc writeFunc,
DotOsgWrapper::ReadWriteMode readWriteMode=DotOsgWrapper::READ_AND_WRITE):
RegisterDotOsgWrapperProxy(proto, name, associates, readFunc, writeFunc, readWriteMode) {}
};
/** Proxy class for automatic registration of reader/writers with the Registry.*/
template<class T>
class RegisterReaderWriterProxy