Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGMultiDisplayWindowBase.cpp

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *               Copyright (C) 2000-2002 by the OpenSG Forum                 *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 /*****************************************************************************\
00040  *****************************************************************************
00041  **                                                                         **
00042  **                  This file is automatically generated.                  **
00043  **                                                                         **
00044  **          Any changes made to this file WILL be lost when it is          **
00045  **           regenerated, which can become necessary at any time.          **
00046  **                                                                         **
00047  **     Do not change this file, changes should be done in the derived      **
00048  **     class MultiDisplayWindow!
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #define OSG_COMPILEMULTIDISPLAYWINDOWINST
00055 
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058 
00059 #include <OSGConfig.h>
00060 
00061 #include "OSGMultiDisplayWindowBase.h"
00062 #include "OSGMultiDisplayWindow.h"
00063 
00064 
00065 OSG_USING_NAMESPACE
00066 
00067 const OSG::BitVector  MultiDisplayWindowBase::HServersFieldMask = 
00068     (TypeTraits<BitVector>::One << MultiDisplayWindowBase::HServersFieldId);
00069 
00070 const OSG::BitVector  MultiDisplayWindowBase::VServersFieldMask = 
00071     (TypeTraits<BitVector>::One << MultiDisplayWindowBase::VServersFieldId);
00072 
00073 const OSG::BitVector  MultiDisplayWindowBase::ManageClientViewportsFieldMask = 
00074     (TypeTraits<BitVector>::One << MultiDisplayWindowBase::ManageClientViewportsFieldId);
00075 
00076 const OSG::BitVector  MultiDisplayWindowBase::XOverlapFieldMask = 
00077     (TypeTraits<BitVector>::One << MultiDisplayWindowBase::XOverlapFieldId);
00078 
00079 const OSG::BitVector  MultiDisplayWindowBase::YOverlapFieldMask = 
00080     (TypeTraits<BitVector>::One << MultiDisplayWindowBase::YOverlapFieldId);
00081 
00082 const OSG::BitVector MultiDisplayWindowBase::MTInfluenceMask = 
00083     (Inherited::MTInfluenceMask) | 
00084     (static_cast<BitVector>(0x0) << Inherited::NextFieldId); 
00085 
00086 
00087 // Field descriptions
00088 
00105 
00106 
00107 FieldDescription *MultiDisplayWindowBase::_desc[] = 
00108 {
00109     new FieldDescription(SFUInt32::getClassType(), 
00110                      "hServers", 
00111                      HServersFieldId, HServersFieldMask,
00112                      false,
00113                      (FieldAccessMethod) &MultiDisplayWindowBase::getSFHServers),
00114     new FieldDescription(SFUInt32::getClassType(), 
00115                      "vServers", 
00116                      VServersFieldId, VServersFieldMask,
00117                      false,
00118                      (FieldAccessMethod) &MultiDisplayWindowBase::getSFVServers),
00119     new FieldDescription(SFBool::getClassType(), 
00120                      "manageClientViewports", 
00121                      ManageClientViewportsFieldId, ManageClientViewportsFieldMask,
00122                      false,
00123                      (FieldAccessMethod) &MultiDisplayWindowBase::getSFManageClientViewports),
00124     new FieldDescription(SFInt32::getClassType(), 
00125                      "xOverlap", 
00126                      XOverlapFieldId, XOverlapFieldMask,
00127                      false,
00128                      (FieldAccessMethod) &MultiDisplayWindowBase::getSFXOverlap),
00129     new FieldDescription(SFInt32::getClassType(), 
00130                      "yOverlap", 
00131                      YOverlapFieldId, YOverlapFieldMask,
00132                      false,
00133                      (FieldAccessMethod) &MultiDisplayWindowBase::getSFYOverlap)
00134 };
00135 
00136 
00137 FieldContainerType MultiDisplayWindowBase::_type(
00138     "MultiDisplayWindow",
00139     "ClusterWindow",
00140     NULL,
00141     (PrototypeCreateF) &MultiDisplayWindowBase::createEmpty,
00142     MultiDisplayWindow::initMethod,
00143     _desc,
00144     sizeof(_desc));
00145 
00146 //OSG_FIELD_CONTAINER_DEF(MultiDisplayWindowBase, MultiDisplayWindowPtr)
00147 
00148 /*------------------------------ get -----------------------------------*/
00149 
00150 FieldContainerType &MultiDisplayWindowBase::getType(void) 
00151 {
00152     return _type; 
00153 } 
00154 
00155 const FieldContainerType &MultiDisplayWindowBase::getType(void) const 
00156 {
00157     return _type;
00158 } 
00159 
00160 
00161 FieldContainerPtr MultiDisplayWindowBase::shallowCopy(void) const 
00162 { 
00163     MultiDisplayWindowPtr returnValue; 
00164 
00165     newPtr(returnValue, dynamic_cast<const MultiDisplayWindow *>(this)); 
00166 
00167     return returnValue; 
00168 }
00169 
00170 UInt32 MultiDisplayWindowBase::getContainerSize(void) const 
00171 { 
00172     return sizeof(MultiDisplayWindow); 
00173 }
00174 
00175 
00176 #if !defined(OSG_FIXED_MFIELDSYNC)
00177 void MultiDisplayWindowBase::executeSync(      FieldContainer &other,
00178                                     const BitVector      &whichField)
00179 {
00180     this->executeSyncImpl((MultiDisplayWindowBase *) &other, whichField);
00181 }
00182 #else
00183 void MultiDisplayWindowBase::executeSync(      FieldContainer &other,
00184                                     const BitVector      &whichField,                                    const SyncInfo       &sInfo     )
00185 {
00186     this->executeSyncImpl((MultiDisplayWindowBase *) &other, whichField, sInfo);
00187 }
00188 void MultiDisplayWindowBase::execBeginEdit(const BitVector &whichField, 
00189                                             UInt32     uiAspect,
00190                                             UInt32     uiContainerSize) 
00191 {
00192     this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00193 }
00194 
00195 void MultiDisplayWindowBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00196 {
00197     Inherited::onDestroyAspect(uiId, uiAspect);
00198 
00199 }
00200 #endif
00201 
00202 /*------------------------- constructors ----------------------------------*/
00203 
00204 #ifdef OSG_WIN32_ICL
00205 #pragma warning (disable : 383)
00206 #endif
00207 
00208 MultiDisplayWindowBase::MultiDisplayWindowBase(void) :
00209     _sfHServers               (), 
00210     _sfVServers               (), 
00211     _sfManageClientViewports  (bool(true)), 
00212     _sfXOverlap               (Int32(0)), 
00213     _sfYOverlap               (Int32(0)), 
00214     Inherited() 
00215 {
00216 }
00217 
00218 #ifdef OSG_WIN32_ICL
00219 #pragma warning (default : 383)
00220 #endif
00221 
00222 MultiDisplayWindowBase::MultiDisplayWindowBase(const MultiDisplayWindowBase &source) :
00223     _sfHServers               (source._sfHServers               ), 
00224     _sfVServers               (source._sfVServers               ), 
00225     _sfManageClientViewports  (source._sfManageClientViewports  ), 
00226     _sfXOverlap               (source._sfXOverlap               ), 
00227     _sfYOverlap               (source._sfYOverlap               ), 
00228     Inherited                 (source)
00229 {
00230 }
00231 
00232 /*-------------------------- destructors ----------------------------------*/
00233 
00234 MultiDisplayWindowBase::~MultiDisplayWindowBase(void)
00235 {
00236 }
00237 
00238 /*------------------------------ access -----------------------------------*/
00239 
00240 UInt32 MultiDisplayWindowBase::getBinSize(const BitVector &whichField)
00241 {
00242     UInt32 returnValue = Inherited::getBinSize(whichField);
00243 
00244     if(FieldBits::NoField != (HServersFieldMask & whichField))
00245     {
00246         returnValue += _sfHServers.getBinSize();
00247     }
00248 
00249     if(FieldBits::NoField != (VServersFieldMask & whichField))
00250     {
00251         returnValue += _sfVServers.getBinSize();
00252     }
00253 
00254     if(FieldBits::NoField != (ManageClientViewportsFieldMask & whichField))
00255     {
00256         returnValue += _sfManageClientViewports.getBinSize();
00257     }
00258 
00259     if(FieldBits::NoField != (XOverlapFieldMask & whichField))
00260     {
00261         returnValue += _sfXOverlap.getBinSize();
00262     }
00263 
00264     if(FieldBits::NoField != (YOverlapFieldMask & whichField))
00265     {
00266         returnValue += _sfYOverlap.getBinSize();
00267     }
00268 
00269 
00270     return returnValue;
00271 }
00272 
00273 void MultiDisplayWindowBase::copyToBin(      BinaryDataHandler &pMem,
00274                                   const BitVector         &whichField)
00275 {
00276     Inherited::copyToBin(pMem, whichField);
00277 
00278     if(FieldBits::NoField != (HServersFieldMask & whichField))
00279     {
00280         _sfHServers.copyToBin(pMem);
00281     }
00282 
00283     if(FieldBits::NoField != (VServersFieldMask & whichField))
00284     {
00285         _sfVServers.copyToBin(pMem);
00286     }
00287 
00288     if(FieldBits::NoField != (ManageClientViewportsFieldMask & whichField))
00289     {
00290         _sfManageClientViewports.copyToBin(pMem);
00291     }
00292 
00293     if(FieldBits::NoField != (XOverlapFieldMask & whichField))
00294     {
00295         _sfXOverlap.copyToBin(pMem);
00296     }
00297 
00298     if(FieldBits::NoField != (YOverlapFieldMask & whichField))
00299     {
00300         _sfYOverlap.copyToBin(pMem);
00301     }
00302 
00303 
00304 }
00305 
00306 void MultiDisplayWindowBase::copyFromBin(      BinaryDataHandler &pMem,
00307                                     const BitVector    &whichField)
00308 {
00309     Inherited::copyFromBin(pMem, whichField);
00310 
00311     if(FieldBits::NoField != (HServersFieldMask & whichField))
00312     {
00313         _sfHServers.copyFromBin(pMem);
00314     }
00315 
00316     if(FieldBits::NoField != (VServersFieldMask & whichField))
00317     {
00318         _sfVServers.copyFromBin(pMem);
00319     }
00320 
00321     if(FieldBits::NoField != (ManageClientViewportsFieldMask & whichField))
00322     {
00323         _sfManageClientViewports.copyFromBin(pMem);
00324     }
00325 
00326     if(FieldBits::NoField != (XOverlapFieldMask & whichField))
00327     {
00328         _sfXOverlap.copyFromBin(pMem);
00329     }
00330 
00331     if(FieldBits::NoField != (YOverlapFieldMask & whichField))
00332     {
00333         _sfYOverlap.copyFromBin(pMem);
00334     }
00335 
00336 
00337 }
00338 
00339 #if !defined(OSG_FIXED_MFIELDSYNC)
00340 void MultiDisplayWindowBase::executeSyncImpl(      MultiDisplayWindowBase *pOther,
00341                                         const BitVector         &whichField)
00342 {
00343 
00344     Inherited::executeSyncImpl(pOther, whichField);
00345 
00346     if(FieldBits::NoField != (HServersFieldMask & whichField))
00347         _sfHServers.syncWith(pOther->_sfHServers);
00348 
00349     if(FieldBits::NoField != (VServersFieldMask & whichField))
00350         _sfVServers.syncWith(pOther->_sfVServers);
00351 
00352     if(FieldBits::NoField != (ManageClientViewportsFieldMask & whichField))
00353         _sfManageClientViewports.syncWith(pOther->_sfManageClientViewports);
00354 
00355     if(FieldBits::NoField != (XOverlapFieldMask & whichField))
00356         _sfXOverlap.syncWith(pOther->_sfXOverlap);
00357 
00358     if(FieldBits::NoField != (YOverlapFieldMask & whichField))
00359         _sfYOverlap.syncWith(pOther->_sfYOverlap);
00360 
00361 
00362 }
00363 #else
00364 void MultiDisplayWindowBase::executeSyncImpl(      MultiDisplayWindowBase *pOther,
00365                                         const BitVector         &whichField,
00366                                         const SyncInfo          &sInfo      )
00367 {
00368 
00369     Inherited::executeSyncImpl(pOther, whichField, sInfo);
00370 
00371     if(FieldBits::NoField != (HServersFieldMask & whichField))
00372         _sfHServers.syncWith(pOther->_sfHServers);
00373 
00374     if(FieldBits::NoField != (VServersFieldMask & whichField))
00375         _sfVServers.syncWith(pOther->_sfVServers);
00376 
00377     if(FieldBits::NoField != (ManageClientViewportsFieldMask & whichField))
00378         _sfManageClientViewports.syncWith(pOther->_sfManageClientViewports);
00379 
00380     if(FieldBits::NoField != (XOverlapFieldMask & whichField))
00381         _sfXOverlap.syncWith(pOther->_sfXOverlap);
00382 
00383     if(FieldBits::NoField != (YOverlapFieldMask & whichField))
00384         _sfYOverlap.syncWith(pOther->_sfYOverlap);
00385 
00386 
00387 
00388 }
00389 
00390 void MultiDisplayWindowBase::execBeginEditImpl (const BitVector &whichField, 
00391                                                  UInt32     uiAspect,
00392                                                  UInt32     uiContainerSize)
00393 {
00394     Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00395 
00396 }
00397 #endif
00398 
00399 
00400 
00401 OSG_BEGIN_NAMESPACE
00402 
00403 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00404 DataType FieldDataTraits<MultiDisplayWindowPtr>::_type("MultiDisplayWindowPtr", "ClusterWindowPtr");
00405 #endif
00406 
00407 
00408 OSG_END_NAMESPACE
00409 
00410 
00411 /*------------------------------------------------------------------------*/
00412 /*                              cvs id's                                  */
00413 
00414 #ifdef OSG_SGI_CC
00415 #pragma set woff 1174
00416 #endif
00417 
00418 #ifdef OSG_LINUX_ICC
00419 #pragma warning( disable : 177 )
00420 #endif
00421 
00422 namespace
00423 {
00424     static Char8 cvsid_cpp       [] = "@(#)$Id: FCBaseTemplate_cpp.h,v 1.42 2004/08/03 05:53:03 dirk Exp $";
00425     static Char8 cvsid_hpp       [] = OSGMULTIDISPLAYWINDOWBASE_HEADER_CVSID;
00426     static Char8 cvsid_inl       [] = OSGMULTIDISPLAYWINDOWBASE_INLINE_CVSID;
00427 
00428     static Char8 cvsid_fields_hpp[] = OSGMULTIDISPLAYWINDOWFIELDS_HEADER_CVSID;
00429 }
00430 

Generated on Thu Aug 25 04:07:51 2005 for OpenSG by  doxygen 1.4.3