source: osgVisual/trunk/include/cluster/dataIO_clusterENet.h @ 339

Last change on this file since 339 was 221, checked in by Torben Dannhauer, 14 years ago

Updated copyright NOTICE
(No code changes)

File size: 2.4 KB
RevLine 
[65]1#pragma once
[221]2/* -*-c++-*- osgVisual - Copyright (C) 2009-2011 Torben Dannhauer
[65]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
[89]18#include <osg/Notify>
[65]19#include <osg/ArgumentParser>
[69]20#include <osgDB/Registry>
21#include <osgDB/ReaderWriter>
22#include <iostream>
[75]23#include <cstdlib>      // Clearscrean console
[65]24
25#include <dataIO_cluster.h>
[66]26#include <dataIO_clusterENet_implementation.h>
[65]27
28namespace osgVisual
29{
30
31/**
32 * \brief This class is a ENet based cluster implementation class for osgVisuals cluster capabilities.
33 *
34 * All functions which are called always return true and send a debug string to stdout to announce that they were called.
35 *
36 * @author Torben Dannhauer
37 * @date  July 2010
38 */ 
39class dataIO_clusterENet :      public dataIO_cluster
40{
[88]41        #include <leakDetection.h>
[65]42public:
43        dataIO_clusterENet();
44        virtual ~dataIO_clusterENet(void);
45
[183]46        bool init(xmlNode* configurationNode, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool asAscii_);
47        bool processXMLConfiguration(xmlNode* clusterConfig_);
[65]48        void shutdown();
49
50        void init();
[81]51        bool sendTO_OBJvaluesToSlaves(osg::Matrixd viewMatrix_);
[65]52        bool readTO_OBJvaluesFromMaster();
53        void reportAsReadyToSwap();
54        bool waitForSwap();
55        bool waitForAllReadyToSwap();
56        bool sendSwapCommand();
[66]57
58private:
59        osg::ref_ptr<osgVisual::dataIO_clusterENet_implementation> enet_impl;
[67]60        std::string serverToConnect;
61        osgVisual::dataIO_cluster::clustermode clusterMode;
[69]62        std::string receivedTransportContainer;
63
64        osg::ref_ptr<osgDB::Options> readOptions;
65        osg::ref_ptr<osgDB::Options> writeOptions;
66        osg::ref_ptr<osgDB::ReaderWriter> rw;
[65]67};
68
69} //END NAMESPACE
Note: See TracBrowser for help on using the repository browser.