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

Last change on this file since 51 was 32, checked in by Torben Dannhauer, 15 years ago

Adding first version of osgVisual!!

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
21#include <dataIO_executer.h>
22#include <dataIO_slot.h>
23
24#include <vector>
25
26namespace osgVisual {
27
28class dataIO_transportContainer : public osg::Object
29{
30public:
31        META_Object(osgVisual,dataIO_transportContainer);       // Required for serializer
32        dataIO_transportContainer(const osgVisual::dataIO_transportContainer& tC_, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):        // Required for serializer
33                        Object(tC_,copyop),
34                        frameID(tC_.frameID),
35                        viewMatrix(tC_.viewMatrix),
36                        executer(tC_.executer),
37                        ioSlots(tC_.ioSlots){}
38        dataIO_transportContainer(){}
39        virtual ~dataIO_transportContainer(){}
40
41
42
43
44        typedef std::vector<osg::ref_ptr<dataIO_executer> > executerList;
45        typedef std::vector<osg::ref_ptr<dataIO_slot> > slotList;
46
47private:
48        int frameID;
49        osg::Matrixd viewMatrix;
50        executerList executer;
51        slotList ioSlots;
52
53// Access functions for Serializer
54public:
55        int getFrameID() const {return frameID;}
56        void setFrameID(int frameID_ ){frameID=frameID_;}
57
58        void setViewMatrix(const osg::Matrixd& viewMatrix_){viewMatrix=viewMatrix_;}
59        const osg::Matrixd& getViewMatrix() const {return viewMatrix;}
60
61        void setExecuter(const executerList& executer_) {executer=executer_;}
62        const executerList& getExecuter() const {return executer;}
63
64        void setIOSlots(const slotList& ioSlots_) {ioSlots=ioSlots_;}
65        const slotList& getIOSlots() const {return ioSlots;}
66
67
68
69        // Usage functions
70        void addExecuter( osg::ref_ptr<dataIO_executer> executerToAdd_ ) {executer.push_back(executerToAdd_);}
71        void removeAllExecuter() { executer.clear();}
72
73        void addSlot( osg::ref_ptr<dataIO_slot> slotToAdd_ ) {ioSlots.push_back(slotToAdd_);}
74        void removeAllSlots() {ioSlots.clear();}
75
76};
77
78} // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.