From e01e50c271c97425b89ea48122018d0348898952 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 12 Jun 2007 15:32:04 +0000 Subject: [PATCH] Moved the className, libraryName and isSameAs into public. --- include/osg/GraphicsContext | 9 ++++++--- include/osgViewer/GraphicsWindow | 7 +++++++ include/osgViewer/api/Carbon/GraphicsWindowCarbon | 4 ++++ include/osgViewer/api/Win32/GraphicsWindowWin32 | 4 ++++ include/osgViewer/api/X11/GraphicsWindowX11 | 4 ++++ 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/include/osg/GraphicsContext b/include/osg/GraphicsContext index 565d3eb95..483cfd9b8 100644 --- a/include/osg/GraphicsContext +++ b/include/osg/GraphicsContext @@ -358,6 +358,12 @@ class OSG_EXPORT GraphicsContext : public Object /** Get the the const list of cameras associated with this graphics context.*/ const Cameras& getCameras() const { return _cameras; } + public: + + virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } + virtual const char* libraryName() const { return "osg"; } + virtual const char* className() const { return "GraphicsContext"; } + protected: GraphicsContext(); @@ -367,9 +373,6 @@ class OSG_EXPORT GraphicsContext : public Object virtual Object* cloneType() const { return 0; } virtual Object* clone(const CopyOp&) const { return 0; } - virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "GraphicsContext"; } void addCamera(osg::Camera* camera); void removeCamera(osg::Camera* camera); diff --git a/include/osgViewer/GraphicsWindow b/include/osgViewer/GraphicsWindow index e2c0c7e83..bee62e7e9 100644 --- a/include/osgViewer/GraphicsWindow +++ b/include/osgViewer/GraphicsWindow @@ -41,6 +41,9 @@ class OSGVIEWER_EXPORT GraphicsWindow : public osg::GraphicsContext, public osgG GraphicsWindow() { _eventQueue = new osgGA::EventQueue; } + virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } + virtual const char* libraryName() const { return "osgViewer"; } + virtual const char* className() const { return "GraphicsWindow"; } void setEventQueue(osgGA::EventQueue* eventQueue) { _eventQueue = eventQueue; } osgGA::EventQueue* getEventQueue() { return _eventQueue.get(); } @@ -197,6 +200,10 @@ class GraphicsWindowEmbedded : public GraphicsWindow init(); } + virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } + virtual const char* libraryName() const { return "osgViewer"; } + virtual const char* className() const { return "GraphicsWindowEmbedded"; } + void init() { if (valid()) diff --git a/include/osgViewer/api/Carbon/GraphicsWindowCarbon b/include/osgViewer/api/Carbon/GraphicsWindowCarbon index 83551ec4a..7b5cd3eed 100644 --- a/include/osgViewer/api/Carbon/GraphicsWindowCarbon +++ b/include/osgViewer/api/Carbon/GraphicsWindowCarbon @@ -58,6 +58,10 @@ class GraphicsWindowCarbon : public osgViewer::GraphicsWindow } } + virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } + virtual const char* libraryName() const { return "osgViewer"; } + virtual const char* className() const { return "GraphicsWindowCarbon"; } + virtual bool valid() const { return _valid; } /** Realise the GraphicsContext.*/ diff --git a/include/osgViewer/api/Win32/GraphicsWindowWin32 b/include/osgViewer/api/Win32/GraphicsWindowWin32 index ee96e1444..d66d222d0 100644 --- a/include/osgViewer/api/Win32/GraphicsWindowWin32 +++ b/include/osgViewer/api/Win32/GraphicsWindowWin32 @@ -37,6 +37,10 @@ class GraphicsWindowWin32 : public osgViewer::GraphicsWindow ~GraphicsWindowWin32(); + virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } + virtual const char* libraryName() const { return "osgViewer"; } + virtual const char* className() const { return "GraphicsWindowWin32"; } + virtual bool valid() const { return _valid; } /** Realize the GraphicsContext.*/ diff --git a/include/osgViewer/api/X11/GraphicsWindowX11 b/include/osgViewer/api/X11/GraphicsWindowX11 index f863ac0ea..03f4bdf49 100644 --- a/include/osgViewer/api/X11/GraphicsWindowX11 +++ b/include/osgViewer/api/X11/GraphicsWindowX11 @@ -68,6 +68,10 @@ class GraphicsWindowX11 : public osgViewer::GraphicsWindow } } + virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } + virtual const char* libraryName() const { return "osgViewer"; } + virtual const char* className() const { return "GraphicsWindowX11"; } + virtual bool valid() const { return _valid; } /** Realise the GraphicsContext.*/