- Timestamp:
- Nov 14, 2010, 5:13:41 PM (14 years ago)
- Location:
- osgVisual
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/bin/osgVisualConfig.xml
r156 r157 28 28 --> 29 29 <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> 32 32 </module> 33 33 -
osgVisual/include/dataIO/visual_dataIO.h
r144 r157 22 22 #include <osgViewer/Viewer> 23 23 24 // Cluster einbinden24 // Cluster 25 25 #ifdef USE_CLUSTER_ASIO_TCP_IOSTREAM 26 26 #include <dataIO_clusterAsioTcpIostream.h> … … 34 34 35 35 36 //ExtLink einbinden36 //ExtLink 37 37 #ifdef USE_EXTLINK_DUMMY 38 38 #include <dataIO_extLinkDummy.h> … … 43 43 44 44 45 // slot and transportContainer definitions45 // Slot and transportContainer definitions 46 46 #include <dataIO_slot.h> 47 47 #include <dataIO_transportContainer.h> 48 48 49 // XML Parser 50 #include <stdio.h> 51 #include <libxml/parser.h> 52 #include <libxml/tree.h> 53 54 // C++ stl libraries 49 55 #include <vector> 50 56 … … 108 114 osg::ref_ptr<dataIO_finalDrawCallback> finalDrawCallback; 109 115 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 */ 111 120 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 */ 113 127 visual_dataIO(const visual_dataIO& cc); 114 128 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 */ 115 141 osg::Matrixd calcViewMatrix(); 142 143 /** 144 * Pointer to the base class of the extLink implementation. 145 */ 116 146 osg::ref_ptr<dataIO_extLink> extLink; 147 148 /** 149 * Pointer to the base class of the cluster implementation. 150 */ 117 151 osg::ref_ptr<dataIO_cluster> cluster; 118 152 119 153 /** 120 * Referenced Pointer to the applications viewer.154 * Referenced pointer to the applications viewer. 121 155 */ 122 156 osg::ref_ptr<osgViewer::Viewer> viewer; 123 157 158 /** 159 * Referenced pointer transport contained user to transport the set of all slots to all rendering machines. 160 */ 124 161 osg::ref_ptr<osgVisual::dataIO_transportContainer> slotContainer; 125 162 … … 129 166 std::vector<dataIO_slot*> dataSlots; 130 167 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 */ 131 176 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 */ 132 181 friend class dataIO_finalDrawCallback; 133 182 134 183 public: 135 // Public destructor to allow singleton cleanup from extern 184 /** 185 * \brief Public destructor to allow singleton cleanup from extern 186 * 187 */ 136 188 ~visual_dataIO(); 137 189 … … 161 213 162 214 osgVisual::dataIO_cluster::clustermode clusterMode; 163 164 bool initialized;165 215 }; 166 216 -
osgVisual/include/distortion/visual_distortion.h
r151 r157 80 80 * @return : True if parsing was successful. 81 81 */ 82 82 bool processXMLConfiguration(); 83 83 84 84 /** -
osgVisual/src/dataIO/visual_dataIO.cpp
r144 r157 24 24 25 25 initialized = false; 26 clusterMode = osgVisual::dataIO_cluster::STANDALONE; 27 // Create Transport-Container: 28 slotContainer = new osgVisual::dataIO_transportContainer(); 26 29 } 27 30 … … 51 54 viewer = viewer_; 52 55 56 // Process XML configuration 57 if(!processXMLConfiguration()) 58 OSG_FATAL << "ERROR: visual_dataIO::init() - Failed to initialize dataIO!"; 59 53 60 // Parse operating Mode 54 61 if (arguments_.read("-m")) … … 56 63 OSG_NOTIFY( osg::ALWAYS ) << "Configure osgVisual as MASTER" << std::endl; 57 64 clusterMode = osgVisual::dataIO_cluster::MASTER; 58 // Create Container:59 slotContainer = new osgVisual::dataIO_transportContainer();60 65 } 61 66 else if (arguments_.read("-s")) … … 63 68 OSG_NOTIFY( osg::ALWAYS ) << "Configure osgVisual as SLAVE" << std::endl; 64 69 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). 66 71 } 67 72 else … … 69 74 OSG_NOTIFY( osg::ALWAYS ) << "Configure osgVisual as STANDALONE" << std::endl; 70 75 clusterMode = osgVisual::dataIO_cluster::STANDALONE; 71 // Create Container:72 slotContainer = new osgVisual::dataIO_transportContainer();73 76 } 74 77 … … 110 113 } 111 114 115 bool visual_dataIO::processXMLConfiguration() 116 { 117 118 return true; 119 } 120 112 121 void visual_dataIO::shutdown() 113 122 {
Note: See TracChangeset
for help on using the changeset viewer.