source: osgVisual/include/dataIO/dataIO_transportContainer.h @ 81

Last change on this file since 81 was 75, checked in by Torben Dannhauer, 14 years ago
File size: 2.6 KB
Line 
1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16*/
17
18#include <osg/Object>
19#include <osg/Matrixd>
20#include <osg/Vec3d>
21
22#include <dataIO_executer.h>
23#include <dataIO_slot.h>
24
25#include <vector>
26
27namespace osgVisual {
28
29class dataIO_transportContainer : public osg::Object
30{
31public:
32        META_Object(osgVisual,dataIO_transportContainer);       // Required for serializer
33        dataIO_transportContainer(const osgVisual::dataIO_transportContainer& tC_, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):        // Required for serializer
34                        Object(tC_,copyop),
35                        frameID(tC_.frameID),
36                        viewMatrix(tC_.viewMatrix),
37                        executer(tC_.executer),
38                        ioSlots(tC_.ioSlots){}
39        dataIO_transportContainer(){}
40        virtual ~dataIO_transportContainer(){}
41
42
43        typedef std::vector<osg::ref_ptr<dataIO_executer> > executerList;
44        typedef std::vector<osg::ref_ptr<dataIO_slot> > slotList;
45
46private:
47        int frameID;
48        osg::Matrixd viewMatrix;
49        executerList executer;
50        slotList ioSlots;
51
52// Access functions for Serializer
53public:
54        int getFrameID() const {return frameID;}
55        void setFrameID(int frameID_ ){frameID=frameID_;}
56
57        void setViewMatrix(const osg::Matrixd& viewMatrix_){viewMatrix = viewMatrix_;}
58        const osg::Matrixd& getViewMatrix() const {return viewMatrix;}
59
60        void setExecuter(const executerList& executer_) {executer=executer_;}
61        const executerList& getExecuter() const {return executer;}
62
63        void setIOSlots(const slotList& ioSlots_) {ioSlots=ioSlots_;}
64        const slotList& getIOSlots() const {return ioSlots;}
65
66
67        // Usage functions
68        void addExecuter( osg::ref_ptr<dataIO_executer> executerToAdd_ ) {executer.push_back(executerToAdd_);}
69        void removeAllExecuter() { executer.clear();}
70
71        void addSlot( osg::ref_ptr<dataIO_slot> slotToAdd_ ) {ioSlots.push_back(slotToAdd_);}
72        void removeAllSlots() {ioSlots.clear();}
73
74};
75
76} // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.