Hi Sukender,

 for your suggestion

>class TypedValueBase : public ValueBase
>{
>public:
>   typedef unsigned int ValueType;
>   ValueType getType() const { return _type; }
>protected:
>   ValueType _type;
>};

consider

template<typename T>
struct VarValue{
    VarValue(T _t) : m_T(_t){}
    typedef T value_type;
  T getType() const { return value_type
; }
    T m_T;
};

(typename might be needed maybe )


this is so called templated traits trick

as for virtual methods consider this article

http://aigamedev.com/open/highlights/optimize-virtual-functions/ and
mentioned *template method pattern*

many thanks for your efforts - but currently I'm finishing project, so my
replies are somewhat sparse and
maybe lack details and correctness. But it is what I can allow myself now.

Regards
Sergey
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to