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

Last change on this file since 122 was 118, checked in by Torben Dannhauer, 14 years ago
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{
[88]37        #include <leakDetection.h>
[32]38public:
39        /**
40         * \brief Empty constructor
41         *
42         */ 
[118]43        dataIO_extLink(std::vector<osgVisual::dataIO_slot *>& dataSlots_) : dataSlots(dataSlots_){}
[32]44
45        /**
46         * \brief Empty destructor
47         *
48         * @return
49         */ 
50        virtual ~dataIO_extLink() {}
51
52        /**
53         * \brief Pure virtual function for initialization. Must be implemented in derived class.
54         *
55         */ 
56        virtual void init() = 0;
57
58        virtual void shutdown() = 0;
59
60        /**
61         * \brief Pure virtual function for reading TO_OBJ values form the external link. Must be implemented in derived class.
62         *
63         * @return : See derived class.
64         */ 
65        virtual bool readTO_OBJvalues() = 0;
66
67        /**
68         * \brief Pure virtual function for writing return values back to the external link. Must be implemented in derived class.
69         *
70         * @return : See derived class.
71         */ 
72        virtual bool writebackFROM_OBJvalues() = 0;
73
74protected:
75        /**
76         * Nested external link for more then one external source.
77         */ 
78        osg::ref_ptr<dataIO_extLink> extLink;
79
80        /**
81         * Flag to indicate if this class is initialized.
82         */ 
83        bool initialized;
84
85        /**
86         * Reference to dataIO's central managed dataSlots.
87         * This central dataSlot array is filled with available slots by this extLink class.
88         */ 
[118]89        std::vector<dataIO_slot *>& dataSlots;
[32]90 
91};
92
93}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.