CopyOp
Go to the documentation of this file.
/* -*-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 OSG_COPYOP
#define OSG_COPYOP 1
#include <osg/Export>
namespace osg {
class Referenced;
class Object;
class Image;
class Texture;
class StateSet;
class StateAttribute;
class StateAttributeCallback;
class Uniform;
class UniformCallback;
class Node;
class Drawable;
class Array;
class PrimitiveSet;
class Shape;
class Callback;
class OSG_EXPORT CopyOp
{
public:
enum Options
{
SHALLOW_COPY = 0,
DEEP_COPY_OBJECTS = 1<<0,
DEEP_COPY_NODES = 1<<1,
DEEP_COPY_DRAWABLES = 1<<2,
DEEP_COPY_STATESETS = 1<<3,
DEEP_COPY_STATEATTRIBUTES = 1<<4,
DEEP_COPY_TEXTURES = 1<<5,
DEEP_COPY_IMAGES = 1<<6,
DEEP_COPY_ARRAYS = 1<<7,
DEEP_COPY_PRIMITIVES = 1<<8,
DEEP_COPY_SHAPES = 1<<9,
DEEP_COPY_UNIFORMS = 1<<10,
DEEP_COPY_CALLBACKS = 1<<11,
DEEP_COPY_USERDATA = 1<<12,
DEEP_COPY_ALL = 0x7FFFFFFF
};
typedef unsigned int CopyFlags;
inline CopyOp(CopyFlags flags=SHALLOW_COPY):_flags(flags) {}
virtual ~CopyOp() {}
void setCopyFlags(CopyFlags flags) { _flags = flags; }
CopyFlags getCopyFlags() const { return _flags; }
virtual Referenced* operator() (const Referenced* ref) const;
virtual Object* operator() (const Object* obj) const;
virtual Node* operator() (const Node* node) const;
virtual Drawable* operator() (const Drawable* drawable) const;
virtual StateSet* operator() (const StateSet* stateset) const;
virtual StateAttribute* operator() (const StateAttribute* attr) const;
virtual Texture* operator() (const Texture* text) const;
virtual Image* operator() (const Image* image) const;
virtual Array* operator() (const Array* array) const;
virtual PrimitiveSet* operator() (const PrimitiveSet* primitives) const;
virtual Shape* operator() (const Shape* shape) const;
virtual Uniform* operator() (const Uniform* shape) const;
virtual Callback* operator() (const Callback* nodecallback) const;
virtual StateAttributeCallback* operator() (const StateAttributeCallback* stateattributecallback) const;
virtual UniformCallback* operator() (const UniformCallback* uniformcallback) const;
protected:
CopyFlags _flags;
};
}
#endif
osg::Array
Definition Array:61
osg::Callback
Definition Callback:34
osg::CopyOp::~CopyOp
virtual ~CopyOp()
Definition CopyOp:67
osg::CopyOp::Options
Options
Definition CopyOp:46
osg::CopyOp::DEEP_COPY_TEXTURES
@ DEEP_COPY_TEXTURES
Definition CopyOp:53
osg::CopyOp::DEEP_COPY_STATESETS
@ DEEP_COPY_STATESETS
Definition CopyOp:51
osg::CopyOp::DEEP_COPY_CALLBACKS
@ DEEP_COPY_CALLBACKS
Definition CopyOp:59
osg::CopyOp::DEEP_COPY_NODES
@ DEEP_COPY_NODES
Definition CopyOp:49
osg::CopyOp::DEEP_COPY_SHAPES
@ DEEP_COPY_SHAPES
Definition CopyOp:57
osg::CopyOp::DEEP_COPY_UNIFORMS
@ DEEP_COPY_UNIFORMS
Definition CopyOp:58
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::CopyOp::DEEP_COPY_ARRAYS
@ DEEP_COPY_ARRAYS
Definition CopyOp:55
osg::CopyOp::DEEP_COPY_IMAGES
@ DEEP_COPY_IMAGES
Definition CopyOp:54
osg::CopyOp::DEEP_COPY_ALL
@ DEEP_COPY_ALL
Definition CopyOp:61
osg::CopyOp::DEEP_COPY_DRAWABLES
@ DEEP_COPY_DRAWABLES
Definition CopyOp:50
osg::CopyOp::DEEP_COPY_USERDATA
@ DEEP_COPY_USERDATA
Definition CopyOp:60
osg::CopyOp::DEEP_COPY_OBJECTS
@ DEEP_COPY_OBJECTS
Definition CopyOp:48
osg::CopyOp::DEEP_COPY_STATEATTRIBUTES
@ DEEP_COPY_STATEATTRIBUTES
Definition CopyOp:52
osg::CopyOp::DEEP_COPY_PRIMITIVES
@ DEEP_COPY_PRIMITIVES
Definition CopyOp:56
osg::CopyOp::_flags
CopyFlags _flags
Definition CopyOp:90
osg::CopyOp::getCopyFlags
CopyFlags getCopyFlags() const
Definition CopyOp:70
osg::CopyOp::CopyOp
CopyOp(CopyFlags flags=SHALLOW_COPY)
Definition CopyOp:66
osg::CopyOp::setCopyFlags
void setCopyFlags(CopyFlags flags)
Definition CopyOp:69
osg::CopyOp::CopyFlags
unsigned int CopyFlags
Definition CopyOp:64
osg::Drawable
Definition Drawable:89
osg::Image
Definition Image:179
osg::Node
Definition Node:72
osg::Object
Definition Object:61
osg::PrimitiveSet
Definition PrimitiveSet:125
osg::Referenced
Definition Referenced:44
osg::Shape
Definition Shape:49
osg::StateAttributeCallback
Definition Callback:246
osg::StateAttribute
Definition StateAttribute:77
osg::StateSet
Definition StateSet:46
osg::Texture
Definition Texture:422
osg::UniformCallback
Definition Callback:271
osg::Uniform
Definition Uniform:414
osg
Definition AlphaFunc:19
Export
OSG_EXPORT
#define OSG_EXPORT
Definition osg/Export:39