Changeset 1032 for branches/Carsten_PtrWork2/Source/System/Cluster/Window/Base/OSGClusterWindowBase.cpp
- Timestamp:
- 12/12/07 18:00:42 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/Cluster/Window/Base/OSGClusterWindowBase.cpp
r1020 r1032 136 136 */ 137 137 138 138 139 139 void ClusterWindowBase::classDescInserter(TypeObject &oType) 140 140 { 141 141 FieldDescriptionBase *pDesc = NULL; 142 143 142 144 143 pDesc = new MFString::Description( … … 146 145 "servers", 147 146 "List of all symbolic server names\n", 148 ServersFieldId, ServersFieldMask, 147 ServersFieldId, 148 ServersFieldMask, 149 149 false, 150 150 Field::MFDefaultFlags, 151 151 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleServers), 152 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServers)); 153 154 oType.addInitialDesc(pDesc); 155 152 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServers ) ); 153 154 oType.addInitialDesc(pDesc); 155 156 156 157 pDesc = new SFString::Description( 157 158 SFString::getClassType(), 158 159 "connectionType", 159 160 "How to connect to the servers\n", 160 ConnectionTypeFieldId, ConnectionTypeFieldMask, 161 ConnectionTypeFieldId, 162 ConnectionTypeFieldMask, 161 163 false, 162 164 Field::SFDefaultFlags, 163 165 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleConnectionType), 164 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionType)); 165 166 oType.addInitialDesc(pDesc); 167 166 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionType ) ); 167 168 oType.addInitialDesc(pDesc); 169 170 168 171 pDesc = new SFString::Description( 169 172 SFString::getClassType(), 170 173 "connectionInterface", 171 174 "Which network interface to use for communication\n", 172 ConnectionInterfaceFieldId, ConnectionInterfaceFieldMask, 175 ConnectionInterfaceFieldId, 176 ConnectionInterfaceFieldMask, 173 177 false, 174 178 Field::SFDefaultFlags, 175 179 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleConnectionInterface), 176 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionInterface)); 177 178 oType.addInitialDesc(pDesc); 179 180 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionInterface ) ); 181 182 oType.addInitialDesc(pDesc); 183 184 180 185 pDesc = new SFString::Description( 181 186 SFString::getClassType(), 182 187 "connectionDestination", 183 188 "Multicast address for multicast connections\n", 184 ConnectionDestinationFieldId, ConnectionDestinationFieldMask, 189 ConnectionDestinationFieldId, 190 ConnectionDestinationFieldMask, 185 191 false, 186 192 Field::SFDefaultFlags, 187 193 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleConnectionDestination), 188 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionDestination)); 189 190 oType.addInitialDesc(pDesc); 191 194 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionDestination ) ); 195 196 oType.addInitialDesc(pDesc); 197 198 192 199 pDesc = new SFString::Description( 193 200 SFString::getClassType(), 194 201 "connectionParams", 195 202 "Optional parameters e.g. \"TTL=2\"\n", 196 ConnectionParamsFieldId, ConnectionParamsFieldMask, 203 ConnectionParamsFieldId, 204 ConnectionParamsFieldMask, 197 205 false, 198 206 Field::SFDefaultFlags, 199 207 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleConnectionParams), 200 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionParams)); 201 202 oType.addInitialDesc(pDesc); 203 208 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleConnectionParams ) ); 209 210 oType.addInitialDesc(pDesc); 211 212 204 213 pDesc = new SFUInt32::Description( 205 214 SFUInt32::getClassType(), 206 215 "servicePort", 207 216 "Broadcastport used for server search\n", 208 ServicePortFieldId, ServicePortFieldMask, 217 ServicePortFieldId, 218 ServicePortFieldMask, 209 219 false, 210 220 Field::SFDefaultFlags, 211 221 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleServicePort), 212 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServicePort)); 213 214 oType.addInitialDesc(pDesc); 215 222 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServicePort ) ); 223 224 oType.addInitialDesc(pDesc); 225 226 216 227 pDesc = new SFString::Description( 217 228 SFString::getClassType(), 218 229 "serviceAddress", 219 230 "Broadcast or Multicast address used for server search\n", 220 ServiceAddressFieldId, ServiceAddressFieldMask, 231 ServiceAddressFieldId, 232 ServiceAddressFieldMask, 221 233 false, 222 234 Field::SFDefaultFlags, 223 235 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleServiceAddress), 224 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServiceAddress)); 225 226 oType.addInitialDesc(pDesc); 227 236 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServiceAddress ) ); 237 238 oType.addInitialDesc(pDesc); 239 240 228 241 pDesc = new SFString::Description( 229 242 SFString::getClassType(), 230 243 "serviceInterface", 231 244 "Ethernet interface to be used for server search\n", 232 ServiceInterfaceFieldId, ServiceInterfaceFieldMask, 245 ServiceInterfaceFieldId, 246 ServiceInterfaceFieldMask, 233 247 false, 234 248 Field::SFDefaultFlags, 235 249 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleServiceInterface), 236 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServiceInterface)); 237 238 oType.addInitialDesc(pDesc); 239 250 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleServiceInterface ) ); 251 252 oType.addInitialDesc(pDesc); 253 254 240 255 pDesc = new SFWindowInternalPtr::Description( 241 256 SFWindowInternalPtr::getClassType(), 242 257 "clientWindow", 243 258 "Window for client rendering\n", 244 ClientWindowFieldId, ClientWindowFieldMask, 259 ClientWindowFieldId, 260 ClientWindowFieldMask, 245 261 false, 246 262 Field::SFDefaultFlags, 247 263 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleClientWindow), 248 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleClientWindow)); 249 250 oType.addInitialDesc(pDesc); 251 264 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleClientWindow ) ); 265 266 oType.addInitialDesc(pDesc); 267 268 252 269 pDesc = new SFUInt32::Description( 253 270 SFUInt32::getClassType(), 254 271 "interleave", 255 272 "", 256 InterleaveFieldId, InterleaveFieldMask, 273 InterleaveFieldId, 274 InterleaveFieldMask, 257 275 false, 258 276 Field::SFDefaultFlags, 259 277 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleInterleave), 260 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleInterleave)); 261 262 oType.addInitialDesc(pDesc); 263 278 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleInterleave ) ); 279 280 oType.addInitialDesc(pDesc); 281 282 264 283 pDesc = new SFUInt32::Description( 265 284 SFUInt32::getClassType(), 266 285 "frameCount", 267 286 "", 268 FrameCountFieldId, FrameCountFieldMask, 287 FrameCountFieldId, 288 FrameCountFieldMask, 269 289 false, 270 290 Field::SFDefaultFlags, 271 291 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleFrameCount), 272 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleFrameCount)); 273 274 oType.addInitialDesc(pDesc); 275 292 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleFrameCount ) ); 293 294 oType.addInitialDesc(pDesc); 295 296 276 297 pDesc = new SFImageComposerInternalPtr::Description( 277 298 SFImageComposerInternalPtr::getClassType(), 278 299 "composer", 279 300 "", 280 ComposerFieldId, ComposerFieldMask, 301 ComposerFieldId, 302 ComposerFieldMask, 281 303 false, 282 304 Field::SFDefaultFlags, 283 305 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleComposer), 284 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleComposer)); 285 286 oType.addInitialDesc(pDesc); 287 306 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleComposer ) ); 307 308 oType.addInitialDesc(pDesc); 309 310 288 311 pDesc = new MFString::Description( 289 312 MFString::getClassType(), 290 313 "autostart", 291 314 "", 292 AutostartFieldId, AutostartFieldMask, 315 AutostartFieldId, 316 AutostartFieldMask, 293 317 false, 294 318 Field::MFDefaultFlags, 295 319 static_cast<FieldEditMethodSig>(&ClusterWindowBase::editHandleAutostart), 296 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleAutostart)); 297 298 oType.addInitialDesc(pDesc); 299 } 300 320 static_cast<FieldGetMethodSig >(&ClusterWindowBase::getHandleAutostart ) ); 321 322 oType.addInitialDesc(pDesc); 323 324 325 } 301 326 302 327 ClusterWindowBase::TypeObject ClusterWindowBase::_type( … … 483 508 "The base class for all windows.\n" 484 509 ); 485 510 486 511 /*------------------------------ get -----------------------------------*/ 487 512 … … 691 716 692 717 //! create a new instance of the class 693 ClusterWindowPtr ClusterWindowBase::create(void) 694 { 695 ClusterWindowPtr fc; 718 ClusterWindowBase::ObjRefPtr 719 ClusterWindowBase::create(void) 720 { 721 ObjRefPtr pFC; 696 722 697 723 if(getClassType().getPrototype() != NullFC) 698 724 { 699 fc = dynamic_cast<ClusterWindow::ObjPtr>(700 getClassType().getPrototype()-> shallowCopy());701 } 702 703 return fc;725 pFC = boost::dynamic_pointer_cast<ClusterWindow>( 726 getClassType().getPrototype()->shallowCopy()); 727 } 728 729 return pFC; 704 730 } 705 731 … … 714 740 } 715 741 716 FieldContainerPtr ClusterWindowBase::shallowCopy(void) const 717 { 718 ClusterWindowPtr returnValue; 742 FieldContainerRefPtr 743 ClusterWindowBase::shallowCopy(void) const 744 { 745 ObjPtr returnValue; 719 746 720 747 newPtr(returnValue, dynamic_cast<const ClusterWindow *>(this)); 721 748 722 return returnValue;749 return FieldContainerRefPtr(returnValue); 723 750 } 724 751 … … 777 804 { 778 805 this->setClientWindow(source->getClientWindow()); 806 779 807 this->setComposer(source->getComposer()); 808 780 809 } 781 810 } … … 974 1003 this->getType().getFieldDesc(ClientWindowFieldId))); 975 1004 976 // returnValue->setSetMethod(boost::bind(&ClusterWindow::setClientWindow, 977 // static_cast<ClusterWindow *>(this), _1)); 1005 returnValue->setSetFunc( 1006 boost::bind( 1007 &ClusterWindow::setClientWindow, 1008 static_cast<ClusterWindow *>(this), _1)); 978 1009 979 1010 editSField(ClientWindowFieldMask); … … 1043 1074 this->getType().getFieldDesc(ComposerFieldId))); 1044 1075 1045 // returnValue->setSetMethod(boost::bind(&ClusterWindow::setComposer, 1046 // static_cast<ClusterWindow *>(this), _1)); 1076 returnValue->setSetFunc( 1077 boost::bind( 1078 &ClusterWindow::setComposer, 1079 static_cast<ClusterWindow *>(this), _1)); 1047 1080 1048 1081 editSField(ComposerFieldMask);
