diff --git a/examples/osgpresentation/osgpresentation.cpp b/examples/osgpresentation/osgpresentation.cpp index 936a68a8a..f28e00363 100644 --- a/examples/osgpresentation/osgpresentation.cpp +++ b/examples/osgpresentation/osgpresentation.cpp @@ -27,33 +27,6 @@ #include #include -#include - -class PrintSupportedProperties : public osgPresentation::Action -{ -public: - PrintSupportedProperties() : - osgPresentation::Action(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {} - - void apply(osgPresentation::Group& group) - { - OSG_NOTICE<<"osgPresentation object : "<className()<<" : "<getName()<<", description = "<setProperty("width",std::string("103.2")); - PrintSupportedProperties psp; + osgPresentation::PrintSupportedProperties psp(std::cout); presentation->accept(psp); osgPresentation::LoadAction load; diff --git a/include/osgPresentation/Action b/include/osgPresentation/Action index 1c5c7c01e..7ec72abdf 100644 --- a/include/osgPresentation/Action +++ b/include/osgPresentation/Action @@ -83,6 +83,16 @@ struct OSGPRESENTATION_EXPORT PlayAction : public Action void apply(osgPresentation::Element& element); }; +struct PrintSupportedProperties : public osgPresentation::Action +{ + PrintSupportedProperties(std::ostream& output) : osgPresentation::Action(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), _output(output) {} + + void apply(osgPresentation::Group& group); + + std::ostream& _output; +}; + + } #endif diff --git a/src/osgPresentation/Action.cpp b/src/osgPresentation/Action.cpp index 861474632..b6dc84f88 100644 --- a/src/osgPresentation/Action.cpp +++ b/src/osgPresentation/Action.cpp @@ -34,6 +34,7 @@ using namespace osgPresentation; void Action::apply(osgPresentation::Group& group) { OSG_NOTICE<<"LoadAction::apply()"<className()<<" : "<getName()<<", description = "<