Hi Saravanan,

The compiler is telling that you haven't implemented methods that you
must implement as they are defined by the abstract base class.  In
this istance you haven't implemented the clone methods that you need
to.  There is a convenience macro to help you out.  Please look at the
ShapeDrawable or Geometry headers to see how the macro is used.

Robert.

On Thu, May 6, 2010 at 6:57 AM, Saravanan Sivaprahasam
<saransivapraha...@rediffmail.com> wrote:
> Hi,
>     i derived a class from osg::Drawable. When ever i try to create an 
> instance, the compiler is giving me the following error
>
> error C2259: 'TDrawable' : cannot instantiate abstract class
> 1>        due to following members:
> 1>        'osg::Object *osg::Object::cloneType(void) const' : is abstract
> 1>        C:\Program Files\OpenSceneGraph\include\osg/Object(80) : see 
> declaration of 'osg::Object::cloneType'
> 1>        'osg::Object *osg::Object::clone(const osg::CopyOp &) const' : is 
> abstract
> 1>        C:\Program Files\OpenSceneGraph\include\osg/Object(84) : see 
> declaration of 'osg::Object::clone'
>
> Here is the actual code
>
>
> Code:
>
> class TDrawable : public osg::Drawable
> {
> public:
>        // Constructor
>        TDrawable() {}
>
>        // Destructor
>        ~TDrawable() {}
>
>        virtual void drawImplementation (osg::RenderInfo &renderInfo) const
>        {
>
>        }
>
> };
>
> int main()
> {
>       ..............
>
>        TDrawable TBarDraw;
>
>        ..................
>        ..................
>
> }
>
>
>
>
>
> Please help me to solve this problem
>
>
> Thank you!
>
> Cheers,
> saravanan[/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=27599#27599
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to