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

OSGSortFirstWindowBase.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 SortFirstWindow!
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #define OSG_COMPILESORTFIRSTWINDOWINST
00055 
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058 
00059 #include <OSGConfig.h>
00060 
00061 #include "OSGSortFirstWindowBase.h"
00062 #include "OSGSortFirstWindow.h"
00063 
00064 
00065 OSG_USING_NAMESPACE
00066 
00067 const OSG::BitVector  SortFirstWindowBase::CompressionFieldMask = 
00068     (TypeTraits<BitVector>::One << SortFirstWindowBase::CompressionFieldId);
00069 
00070 const OSG::BitVector  SortFirstWindowBase::SubtileSizeFieldMask = 
00071     (TypeTraits<BitVector>::One << SortFirstWindowBase::SubtileSizeFieldId);
00072 
00073 const OSG::BitVector  SortFirstWindowBase::ComposeFieldMask = 
00074     (TypeTraits<BitVector>::One << SortFirstWindowBase::ComposeFieldId);
00075 
00076 const OSG::BitVector  SortFirstWindowBase::RegionFieldMask = 
00077     (TypeTraits<BitVector>::One << SortFirstWindowBase::RegionFieldId);
00078 
00079 const OSG::BitVector  SortFirstWindowBase::UseFaceDistributionFieldMask = 
00080     (TypeTraits<BitVector>::One << SortFirstWindowBase::UseFaceDistributionFieldId);
00081 
00082 const OSG::BitVector SortFirstWindowBase::MTInfluenceMask = 
00083     (Inherited::MTInfluenceMask) | 
00084     (static_cast<BitVector>(0x0) << Inherited::NextFieldId); 
00085 
00086 
00087 // Field descriptions
00088 
00105 
00106 
00107 FieldDescription *SortFirstWindowBase::_desc[] = 
00108 {
00109     new FieldDescription(SFString::getClassType(), 
00110                      "compression", 
00111                      CompressionFieldId, CompressionFieldMask,
00112                      false,
00113                      (FieldAccessMethod) &SortFirstWindowBase::getSFCompression),
00114     new FieldDescription(SFUInt32::getClassType(), 
00115                      "subtileSize", 
00116                      SubtileSizeFieldId, SubtileSizeFieldMask,
00117                      false,
00118                      (FieldAccessMethod) &SortFirstWindowBase::getSFSubtileSize),
00119     new FieldDescription(SFBool::getClassType(), 
00120                      "compose", 
00121                      ComposeFieldId, ComposeFieldMask,
00122                      false,
00123                      (FieldAccessMethod) &SortFirstWindowBase::getSFCompose),
00124     new FieldDescription(MFUInt32::getClassType(), 
00125                      "region", 
00126                      RegionFieldId, RegionFieldMask,
00127                      false,
00128                      (FieldAccessMethod) &SortFirstWindowBase::getMFRegion),
00129     new FieldDescription(SFBool::getClassType(), 
00130                      "useFaceDistribution", 
00131                      UseFaceDistributionFieldId, UseFaceDistributionFieldMask,
00132                      false,
00133                      (FieldAccessMethod) &SortFirstWindowBase::getSFUseFaceDistribution)
00134 };
00135 
00136 
00137 FieldContainerType SortFirstWindowBase::_type(
00138     "SortFirstWindow",
00139     "ClusterWindow",
00140     NULL,
00141     (PrototypeCreateF) &SortFirstWindowBase::createEmpty,
00142     SortFirstWindow::initMethod,
00143     _desc,
00144     sizeof(_desc));
00145 
00146 //OSG_FIELD_CONTAINER_DEF(SortFirstWindowBase, SortFirstWindowPtr)
00147 
00148 /*------------------------------ get -----------------------------------*/
00149 
00150 FieldContainerType &SortFirstWindowBase::getType(void) 
00151 {
00152     return _type; 
00153 } 
00154 
00155 const FieldContainerType &SortFirstWindowBase::getType(void) const 
00156 {
00157     return _type;
00158 } 
00159 
00160 
00161 FieldContainerPtr SortFirstWindowBase::shallowCopy(void) const 
00162 { 
00163     SortFirstWindowPtr returnValue; 
00164 
00165     newPtr(returnValue, dynamic_cast<const SortFirstWindow *>(this)); 
00166 
00167     return returnValue; 
00168 }
00169 
00170 UInt32 SortFirstWindowBase::getContainerSize(void) const 
00171 { 
00172     return sizeof(SortFirstWindow); 
00173 }
00174 
00175 
00176 #if !defined(OSG_FIXED_MFIELDSYNC)
00177 void SortFirstWindowBase::executeSync(      FieldContainer &other,
00178                                     const BitVector      &whichField)
00179 {
00180     this->executeSyncImpl((SortFirstWindowBase *) &other, whichField);
00181 }
00182 #else
00183 void SortFirstWindowBase::executeSync(      FieldContainer &other,
00184                                     const BitVector      &whichField,                                    const SyncInfo       &sInfo     )
00185 {
00186     this->executeSyncImpl((SortFirstWindowBase *) &other, whichField, sInfo);
00187 }
00188 void SortFirstWindowBase::execBeginEdit(const BitVector &whichField, 
00189                                             UInt32     uiAspect,
00190                                             UInt32     uiContainerSize) 
00191 {
00192     this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00193 }
00194 
00195 void SortFirstWindowBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00196 {
00197     Inherited::onDestroyAspect(uiId, uiAspect);
00198 
00199     _mfRegion.terminateShare(uiAspect, this->getContainerSize());
00200 }
00201 #endif
00202 
00203 /*------------------------- constructors ----------------------------------*/
00204 
00205 #ifdef OSG_WIN32_ICL
00206 #pragma warning (disable : 383)
00207 #endif
00208 
00209 SortFirstWindowBase::SortFirstWindowBase(void) :
00210     _sfCompression            (), 
00211     _sfSubtileSize            (UInt32(32)), 
00212     _sfCompose                (bool(true)), 
00213     _mfRegion                 (), 
00214     _sfUseFaceDistribution    (bool(false)), 
00215     Inherited() 
00216 {
00217 }
00218 
00219 #ifdef OSG_WIN32_ICL
00220 #pragma warning (default : 383)
00221 #endif
00222 
00223 SortFirstWindowBase::SortFirstWindowBase(const SortFirstWindowBase &source) :
00224     _sfCompression            (source._sfCompression            ), 
00225     _sfSubtileSize            (source._sfSubtileSize            ), 
00226     _sfCompose                (source._sfCompose                ), 
00227     _mfRegion                 (source._mfRegion                 ), 
00228     _sfUseFaceDistribution    (source._sfUseFaceDistribution    ), 
00229     Inherited                 (source)
00230 {
00231 }
00232 
00233 /*-------------------------- destructors ----------------------------------*/
00234 
00235 SortFirstWindowBase::~SortFirstWindowBase(void)
00236 {
00237 }
00238 
00239 /*------------------------------ access -----------------------------------*/
00240 
00241 UInt32 SortFirstWindowBase::getBinSize(const BitVector &whichField)
00242 {
00243     UInt32 returnValue = Inherited::getBinSize(whichField);
00244 
00245     if(FieldBits::NoField != (CompressionFieldMask & whichField))
00246     {
00247         returnValue += _sfCompression.getBinSize();
00248     }
00249 
00250     if(FieldBits::NoField != (SubtileSizeFieldMask & whichField))
00251     {
00252         returnValue += _sfSubtileSize.getBinSize();
00253     }
00254 
00255     if(FieldBits::NoField != (ComposeFieldMask & whichField))
00256     {
00257         returnValue += _sfCompose.getBinSize();
00258     }
00259 
00260     if(FieldBits::NoField != (RegionFieldMask & whichField))
00261     {
00262         returnValue += _mfRegion.getBinSize();
00263     }
00264 
00265     if(FieldBits::NoField != (UseFaceDistributionFieldMask & whichField))
00266     {
00267         returnValue += _sfUseFaceDistribution.getBinSize();
00268     }
00269 
00270 
00271     return returnValue;
00272 }
00273 
00274 void SortFirstWindowBase::copyToBin(      BinaryDataHandler &pMem,
00275                                   const BitVector         &whichField)
00276 {
00277     Inherited::copyToBin(pMem, whichField);
00278 
00279     if(FieldBits::NoField != (CompressionFieldMask & whichField))
00280     {
00281         _sfCompression.copyToBin(pMem);
00282     }
00283 
00284     if(FieldBits::NoField != (SubtileSizeFieldMask & whichField))
00285     {
00286         _sfSubtileSize.copyToBin(pMem);
00287     }
00288 
00289     if(FieldBits::NoField != (ComposeFieldMask & whichField))
00290     {
00291         _sfCompose.copyToBin(pMem);
00292     }
00293 
00294     if(FieldBits::NoField != (RegionFieldMask & whichField))
00295     {
00296         _mfRegion.copyToBin(pMem);
00297     }
00298 
00299     if(FieldBits::NoField != (UseFaceDistributionFieldMask & whichField))
00300     {
00301         _sfUseFaceDistribution.copyToBin(pMem);
00302     }
00303 
00304 
00305 }
00306 
00307 void SortFirstWindowBase::copyFromBin(      BinaryDataHandler &pMem,
00308                                     const BitVector    &whichField)
00309 {
00310     Inherited::copyFromBin(pMem, whichField);
00311 
00312     if(FieldBits::NoField != (CompressionFieldMask & whichField))
00313     {
00314         _sfCompression.copyFromBin(pMem);
00315     }
00316 
00317     if(FieldBits::NoField != (SubtileSizeFieldMask & whichField))
00318     {
00319         _sfSubtileSize.copyFromBin(pMem);
00320     }
00321 
00322     if(FieldBits::NoField != (ComposeFieldMask & whichField))
00323     {
00324         _sfCompose.copyFromBin(pMem);
00325     }
00326 
00327     if(FieldBits::NoField != (RegionFieldMask & whichField))
00328     {
00329         _mfRegion.copyFromBin(pMem);
00330     }
00331 
00332     if(FieldBits::NoField != (UseFaceDistributionFieldMask & whichField))
00333     {
00334         _sfUseFaceDistribution.copyFromBin(pMem);
00335     }
00336 
00337 
00338 }
00339 
00340 #if !defined(OSG_FIXED_MFIELDSYNC)
00341 void SortFirstWindowBase::executeSyncImpl(      SortFirstWindowBase *pOther,
00342                                         const BitVector         &whichField)
00343 {
00344 
00345     Inherited::executeSyncImpl(pOther, whichField);
00346 
00347     if(FieldBits::NoField != (CompressionFieldMask & whichField))
00348         _sfCompression.syncWith(pOther->_sfCompression);
00349 
00350     if(FieldBits::NoField != (SubtileSizeFieldMask & whichField))
00351         _sfSubtileSize.syncWith(pOther->_sfSubtileSize);
00352 
00353     if(FieldBits::NoField != (ComposeFieldMask & whichField))
00354         _sfCompose.syncWith(pOther->_sfCompose);
00355 
00356     if(FieldBits::NoField != (RegionFieldMask & whichField))
00357         _mfRegion.syncWith(pOther->_mfRegion);
00358 
00359     if(FieldBits::NoField != (UseFaceDistributionFieldMask & whichField))
00360         _sfUseFaceDistribution.syncWith(pOther->_sfUseFaceDistribution);
00361 
00362 
00363 }
00364 #else
00365 void SortFirstWindowBase::executeSyncImpl(      SortFirstWindowBase *pOther,
00366                                         const BitVector         &whichField,
00367                                         const SyncInfo          &sInfo      )
00368 {
00369 
00370     Inherited::executeSyncImpl(pOther, whichField, sInfo);
00371 
00372     if(FieldBits::NoField != (CompressionFieldMask & whichField))
00373         _sfCompression.syncWith(pOther->_sfCompression);
00374 
00375     if(FieldBits::NoField != (SubtileSizeFieldMask & whichField))
00376         _sfSubtileSize.syncWith(pOther->_sfSubtileSize);
00377 
00378     if(FieldBits::NoField != (ComposeFieldMask & whichField))
00379         _sfCompose.syncWith(pOther->_sfCompose);
00380 
00381     if(FieldBits::NoField != (UseFaceDistributionFieldMask & whichField))
00382         _sfUseFaceDistribution.syncWith(pOther->_sfUseFaceDistribution);
00383 
00384 
00385     if(FieldBits::NoField != (RegionFieldMask & whichField))
00386         _mfRegion.syncWith(pOther->_mfRegion, sInfo);
00387 
00388 
00389 }
00390 
00391 void SortFirstWindowBase::execBeginEditImpl (const BitVector &whichField, 
00392                                                  UInt32     uiAspect,
00393                                                  UInt32     uiContainerSize)
00394 {
00395     Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00396 
00397     if(FieldBits::NoField != (RegionFieldMask & whichField))
00398         _mfRegion.beginEdit(uiAspect, uiContainerSize);
00399 
00400 }
00401 #endif
00402 
00403 
00404 
00405 OSG_BEGIN_NAMESPACE
00406 
00407 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00408 DataType FieldDataTraits<SortFirstWindowPtr>::_type("SortFirstWindowPtr", "ClusterWindowPtr");
00409 #endif
00410 
00411 
00412 OSG_END_NAMESPACE
00413 
00414 
00415 /*------------------------------------------------------------------------*/
00416 /*                              cvs id's                                  */
00417 
00418 #ifdef OSG_SGI_CC
00419 #pragma set woff 1174
00420 #endif
00421 
00422 #ifdef OSG_LINUX_ICC
00423 #pragma warning( disable : 177 )
00424 #endif
00425 
00426 namespace
00427 {
00428     static Char8 cvsid_cpp       [] = "@(#)$Id: FCBaseTemplate_cpp.h,v 1.42 2004/08/03 05:53:03 dirk Exp $";
00429     static Char8 cvsid_hpp       [] = OSGSORTFIRSTWINDOWBASE_HEADER_CVSID;
00430     static Char8 cvsid_inl       [] = OSGSORTFIRSTWINDOWBASE_INLINE_CVSID;
00431 
00432     static Char8 cvsid_fields_hpp[] = OSGSORTFIRSTWINDOWFIELDS_HEADER_CVSID;
00433 }
00434 

Generated on Thu Aug 25 04:10:33 2005 for OpenSG by  doxygen 1.4.3