TrueReality  v0.1.1912
trSG/NodeVisitor.h
Go to the documentation of this file.
1 /*
2 * True Reality Open Source Game and Simulation Engine
3 * Copyright © 2021 Acid Rain Studios LLC
4 *
5 * This library is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License as published by the Free
7 * Software Foundation; either version 3.0 of the License, or (at your option)
8 * any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * @author Maxim Serebrennik
20 */
21 #pragma once
22 
23 #include <trBase/Base.h>
24 #include <trBase/SmrtPtr.h>
25 #include <trUtil/RefStr.h>
26 
27 namespace osg
28 {
29  class NodeVisitor;
30 }
31 
32 namespace trSG
33 {
34  class NodeVisitor : public trBase::Base
35  {
36  public:
38 
39  const static trUtil::RefStr CLASS_TYPE;
40 
48  NodeVisitor(const std::string name = CLASS_TYPE);
49 
57  virtual const std::string& GetType() const override;
58 
66  virtual void SetName(const std::string& name);
67 
75  virtual osg::NodeVisitor* AsOSGVisitor();
76 
84  virtual const osg::NodeVisitor* AsOSGVisitor() const;
85 
86  protected:
87 
89 
95  ~NodeVisitor();
96  };
97 }
98 
A string wrapper that will make sure that all of the strings with the same value will point to the sa...
Definition: RefStr.h:50
This class is part of the internal garbage collection system.
Definition: SmrtClass.h:38
This is a Base class that carries the Class name and Unique ID of all the derived classes...
Definition: trBase/Base.h:36
Definition: trSG/Node.h:42
Definition: FrameStamp.h:37
static const trUtil::RefStr CLASS_TYPE
Adds an easy and swappable access to the base class.
trBase::SmrtPtr< osg::NodeVisitor > mNodeVisitor