Changeset 157 for osgVisual


Ignore:
Timestamp:
Nov 14, 2010, 5:13:41 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
osgVisual
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/bin/osgVisualConfig.xml

    r156 r157  
    2828    -->
    2929    <dataio clusterrole="master"></dataio>
    30     <cluster_enet master_ip="10.10.10.10" port="1234" use_zlib_compressor="yes" ></cluster_enet>
    31     <extLink_vcl filename="osgVisual.xml"></extLink_vcl>
     30    <cluster implementation="enet" master_ip="10.10.10.10" port="1234" use_zlib_compressor="yes" ></cluster>
     31    <extLink implementation="vcl" filename="osgVisual.xml"></extLink>
    3232  </module>
    3333 
  • osgVisual/include/dataIO/visual_dataIO.h

    r144 r157  
    2222#include <osgViewer/Viewer>
    2323
    24 // Cluster einbinden
     24// Cluster
    2525#ifdef USE_CLUSTER_ASIO_TCP_IOSTREAM
    2626        #include <dataIO_clusterAsioTcpIostream.h>
     
    3434
    3535
    36 //ExtLink einbinden
     36//ExtLink
    3737#ifdef USE_EXTLINK_DUMMY
    3838        #include <dataIO_extLinkDummy.h>
     
    4343
    4444
    45 // slot and transportContainer definitions
     45// Slot and transportContainer definitions
    4646#include <dataIO_slot.h>
    4747#include <dataIO_transportContainer.h>
    4848
     49// XML Parser
     50#include <stdio.h>
     51#include <libxml/parser.h>
     52#include <libxml/tree.h>
     53
     54// C++ stl libraries
    4955#include <vector>
    5056
     
    108114        osg::ref_ptr<dataIO_finalDrawCallback> finalDrawCallback;
    109115
    110         // Make Constructor private to prevent creating instances via ptr* = new ..().
     116        /**
     117         * \brief Constructor: It is private to prevent creating instances via ptr* = new ..().
     118         *
     119         */
    111120        visual_dataIO();
    112         // Make Copy-Constructor private to prevent getting instances via copying dataIO instance.
     121
     122        /**
     123         * \brief Copy-Constuctor: It is private to prevent getting instances via copying dataIO instance.
     124         *
     125         * @param cc : Instance to copy from.
     126         */
    113127        visual_dataIO(const visual_dataIO& cc);
    114128
     129        /**
     130         * \brief This function parses the XML config file for dataIO relevant parameters.
     131         *
     132         * @return : True if parsing was successful.
     133         */
     134        bool processXMLConfiguration();
     135
     136        /**
     137         * \brief Todo: required?
     138         *
     139         * @return
     140         */
    115141        osg::Matrixd calcViewMatrix();
     142
     143        /**
     144         * Pointer to the base class of the extLink implementation.
     145         */
    116146        osg::ref_ptr<dataIO_extLink> extLink;
     147
     148        /**
     149         * Pointer to the base class of the cluster implementation.
     150         */
    117151        osg::ref_ptr<dataIO_cluster> cluster;
    118152
    119153        /**
    120          * Referenced Pointer to the applications viewer.
     154         * Referenced pointer to the applications viewer.
    121155         */
    122156        osg::ref_ptr<osgViewer::Viewer> viewer;
    123157
     158        /**
     159         * Referenced pointer transport contained user to transport the set of all slots to all rendering machines.
     160         */
    124161        osg::ref_ptr<osgVisual::dataIO_transportContainer> slotContainer;
    125162
     
    129166        std::vector<dataIO_slot*> dataSlots;
    130167
     168        /**
     169         * Flag to indicate if dataIO is initialized.
     170         */
     171        bool initialized;
     172
     173        /**
     174         * The eventCallback-class is friend to be able to work with all dataIO members without setters/getters.
     175         */
    131176        friend class dataIO_eventCallback;
     177
     178        /**
     179         *  The FinalDrawCallback-class is friend to be able to work with all dataIO members without setters/getters.
     180         */
    132181        friend class dataIO_finalDrawCallback;
    133182
    134183public:
    135         // Public destructor to allow singleton cleanup from extern
     184        /**
     185         * \brief Public destructor to allow singleton cleanup from extern
     186         *
     187         */
    136188        ~visual_dataIO();
    137189
     
    161213
    162214        osgVisual::dataIO_cluster::clustermode clusterMode;
    163 
    164         bool initialized;
    165215};
    166216
  • osgVisual/include/distortion/visual_distortion.h

    r151 r157  
    8080         * @return : True if parsing was successful.
    8181         */
    82                 bool processXMLConfiguration();
     82        bool processXMLConfiguration();
    8383
    8484        /**
  • osgVisual/src/dataIO/visual_dataIO.cpp

    r144 r157  
    2424
    2525        initialized = false;
     26        clusterMode = osgVisual::dataIO_cluster::STANDALONE;
     27        // Create Transport-Container:
     28        slotContainer = new osgVisual::dataIO_transportContainer();
    2629}
    2730
     
    5154        viewer = viewer_;
    5255
     56        // Process XML configuration
     57        if(!processXMLConfiguration())
     58                OSG_FATAL << "ERROR: visual_dataIO::init() - Failed to initialize dataIO!";
     59
    5360        // Parse operating Mode
    5461    if (arguments_.read("-m"))
     
    5663                OSG_NOTIFY( osg::ALWAYS ) << "Configure osgVisual as MASTER" << std::endl;
    5764                clusterMode = osgVisual::dataIO_cluster::MASTER;
    58                 // Create Container:
    59                 slotContainer = new osgVisual::dataIO_transportContainer();
    6065        }
    6166        else if (arguments_.read("-s"))
     
    6368                OSG_NOTIFY( osg::ALWAYS ) << "Configure osgVisual as SLAVE" << std::endl;
    6469                clusterMode = osgVisual::dataIO_cluster::SLAVE;
    65                 slotContainer = NULL;   // Slave only recieves container, therefor set this Pointer null.
     70                slotContainer = NULL;   // Slave only recieves container, therefor set this Pointer NULL (created instance will be deleted because it is an auto pointer).
    6671        }
    6772        else
     
    6974                OSG_NOTIFY( osg::ALWAYS ) << "Configure osgVisual as STANDALONE" << std::endl;
    7075                clusterMode = osgVisual::dataIO_cluster::STANDALONE;
    71                 // Create Container:
    72                 slotContainer = new osgVisual::dataIO_transportContainer();
    7376        }
    7477
     
    110113}
    111114
     115bool visual_dataIO::processXMLConfiguration()
     116{
     117
     118        return true;
     119}
     120
    112121void visual_dataIO::shutdown()
    113122{
Note: See TracChangeset for help on using the changeset viewer.