source: osgVisual/include/extLink/dataIO_extLink.h @ 83

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

Adding first version of osgVisual!!

File size: 2.5 KB
RevLine 
[32]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/Referenced>
19#include <osg/Node>
20#include <dataIO_slot.h>
21
22
23namespace osgVisual
24{ 
25
26/**
27 * \brief This class is the interface definition class for valid externalLink (extLink) implementations.
28 *
29 * This class is an abstract class, thus cannot be instantiated. Derive this class for usage.
30 *
31 * @author Torben Dannhauer
32 * @date  Sep 2009
33 */ 
34
35class dataIO_extLink : public osg::Referenced
36{
37public:
38        /**
39         * \brief Empty constructor
40         *
41         */ 
42        dataIO_extLink(std::vector<osgVisual::dataIO_slot>& dataSlots_) : dataSlots(dataSlots_){}
43
44        /**
45         * \brief Empty destructor
46         *
47         * @return
48         */ 
49        virtual ~dataIO_extLink() {}
50
51        /**
52         * \brief Pure virtual function for initialization. Must be implemented in derived class.
53         *
54         */ 
55        virtual void init() = 0;
56
57        virtual void shutdown() = 0;
58
59        /**
60         * \brief Pure virtual function for reading TO_OBJ values form the external link. Must be implemented in derived class.
61         *
62         * @return : See derived class.
63         */ 
64        virtual bool readTO_OBJvalues() = 0;
65
66        /**
67         * \brief Pure virtual function for writing return values back to the external link. Must be implemented in derived class.
68         *
69         * @return : See derived class.
70         */ 
71        virtual bool writebackFROM_OBJvalues() = 0;
72
73protected:
74        /**
75         * Nested external link for more then one external source.
76         */ 
77        osg::ref_ptr<dataIO_extLink> extLink;
78
79        /**
80         * Flag to indicate if this class is initialized.
81         */ 
82        bool initialized;
83
84        /**
85         * Reference to dataIO's central managed dataSlots.
86         * This central dataSlot array is filled with available slots by this extLink class.
87         */ 
88        std::vector<dataIO_slot>& dataSlots;
89 
90};
91
92}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.