From 81008c24dfaec637429b2b91ebac64f5c2c74906 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 15 Jan 2013 11:31:44 +0000 Subject: [PATCH] Added shell of Timeout class --- include/osgPresentation/Timeout | 43 ++++++++++++++++++++++++++++++ src/osgPresentation/CMakeLists.txt | 2 ++ src/osgPresentation/Timeout.cpp | 37 +++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 include/osgPresentation/Timeout create mode 100644 src/osgPresentation/Timeout.cpp diff --git a/include/osgPresentation/Timeout b/include/osgPresentation/Timeout new file mode 100644 index 000000000..56413ad79 --- /dev/null +++ b/include/osgPresentation/Timeout @@ -0,0 +1,43 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * OpenSceneGraph Public License for more details. +*/ + +#ifndef OSGPRESENTATION_TIMOUTOUT +#define OSGPRESENTATION_TIMOUTOUT 1 + +#include +#include + +namespace osgPresentation { + +class OSGPRESENTATION_EXPORT Timeout : public osg::Group +{ + public: + + Timeout(); + + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Timeout(const Timeout&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); + + META_Node(osgPresentation, Timeout); + + virtual void traverse(osg::NodeVisitor& nv); + + protected: + + virtual ~Timeout(); + +}; + +} + +#endif diff --git a/src/osgPresentation/CMakeLists.txt b/src/osgPresentation/CMakeLists.txt index cd677fb62..6dcda2dee 100644 --- a/src/osgPresentation/CMakeLists.txt +++ b/src/osgPresentation/CMakeLists.txt @@ -16,6 +16,7 @@ SET(TARGET_H ${HEADER_PATH}/KeyEventHandler ${HEADER_PATH}/SlideEventHandler ${HEADER_PATH}/SlideShowConstructor + ${HEADER_PATH}/Timeout ) # FIXME: For OS X, need flag for Framework or dylib @@ -27,6 +28,7 @@ SET(TARGET_SRC KeyEventHandler.cpp SlideEventHandler.cpp SlideShowConstructor.cpp + Timeout.cpp ${OPENSCENEGRAPH_VERSIONINFO_RC} ) diff --git a/src/osgPresentation/Timeout.cpp b/src/osgPresentation/Timeout.cpp new file mode 100644 index 000000000..687ca67dd --- /dev/null +++ b/src/osgPresentation/Timeout.cpp @@ -0,0 +1,37 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * OpenSceneGraph Public License for more details. +*/ + +#include + +using namespace osgPresentation; + +Timeout::Timeout() +{ +} + +/** Copy constructor using CopyOp to manage deep vs shallow copy.*/ +Timeout::Timeout(const Timeout& timeout,const osg::CopyOp& copyop): + osg::Group(timeout, copyop) +{ +} + +Timeout::~Timeout() +{ +} + + +void Timeout::traverse(osg::NodeVisitor& nv) +{ + OSG_NOTICE<<"Timeout::traverse"<