source: osgVisual/include/extLink/dataIO_extLinkVCL.h @ 125

Last change on this file since 125 was 121, checked in by Torben Dannhauer, 14 years ago
File size: 3.3 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 <dataIO_extLink.h>     // Base class
19#include <osg/Notify>
20#include <osgDB/FileUtils>
21
22// VCL
23#include <winsock2.h>
24
25// XML Parser
26#include <stdio.h>
27#include <libxml/parser.h>
28#include <libxml/tree.h>
29
30
31// VCL
32//// To keep the VS 2005 Solution file clean from VCL dependencies: Link dependencies here:
33#ifndef _DEBUG
34#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib/releasemtdll/libexpatMT.lib" )
35#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib/releasemtdll/expatpp.lib" )
36#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib.x64/releasemtdll/libexpatMT.lib" )
37#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib.x64/releasemtdll/expatpp.lib" )
38#pragma comment ( lib, "../VCL_1.0.3.4/source/lib/x86/VCL1_34.lib" )
39#pragma comment ( lib, "../VCL_1.0.3.4/source/lib/x64/VCL1_34.lib" )
40#endif
41#ifdef _DEBUG
42#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib/debugmtdll/libexpatMT_d.lib" )
43#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib/debugmtdll/expatpp_d.lib" )
44#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib.x64/debugmtdll/libexpatMT_d.lib" )
45#pragma comment ( lib, "../VCL_1.0.3.4/source/3rdParty/expatpp/lib.x64/debugmtdll/expatpp_d.lib" )
46#pragma comment ( lib, "../VCL_1.0.3.4/source/lib/x86/VCL1_34D.lib" )
47#pragma comment ( lib, "../VCL_1.0.3.4/source/lib/x64/VCL1_34D.lib" )
48#endif
49//// include VCL header
50#ifdef WIN32
51#include <wtypes.h>
52#endif
53#include "VCLDefinitions.h"
54#include "VCLIO.h"
55#include "VCLIOChannel.h"
56#include "VCLIOChannelEntry.h"
57#include "VCLVariable.h"
58#include "VCLSocketDefs.h"
59#include <conio.h>
60#include "stdlib.h"
61#include <iostream>
62
63
64namespace osgVisual
65{ 
66
67/**
68 * \brief This class is a VCL-based implementation of the externalLink.
69
70 *
71 * @author Torben Dannhauer
72 * @date  Nov 2009
73 */ 
74class dataIO_extLinkVCL :       public dataIO_extLink
75{
76#include <leakDetection.h>
77public:
78        dataIO_extLinkVCL(std::vector<dataIO_slot *>& dataSlots_);
79        virtual ~dataIO_extLinkVCL(void);
80
81        void init();
82        void shutdown();
83
84        bool readTO_OBJvalues();
85        bool writebackFROM_OBJvalues();
86
87
88private:
89        bool parseVCLConfig();
90        void checkXMLNode(xmlNode * a_node);
91        void addChannels(xmlNode * a_node, std::string channelName_, dataIO_slot::dataDirection direction_ );
92
93        std::string VCLConfigFilename;
94        std::vector< CVCLVariable<double>* > extLinkChannels;
95        std::vector< osgVisual::dataIO_slot* > extLinkSlots;
96        bool configFileValid;
97
98};
99
100}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.