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

OSGStatisticsForegroundBase.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 StatisticsForeground!
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #define OSG_COMPILESTATISTICSFOREGROUNDINST
00055 
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058 
00059 #include <OSGConfig.h>
00060 
00061 #include "OSGStatisticsForegroundBase.h"
00062 #include "OSGStatisticsForeground.h"
00063 
00064 
00065 OSG_USING_NAMESPACE
00066 
00067 const OSG::BitVector  StatisticsForegroundBase::ElementIDsFieldMask = 
00068     (TypeTraits<BitVector>::One << StatisticsForegroundBase::ElementIDsFieldId);
00069 
00070 const OSG::BitVector  StatisticsForegroundBase::CollectorFieldMask = 
00071     (TypeTraits<BitVector>::One << StatisticsForegroundBase::CollectorFieldId);
00072 
00073 const OSG::BitVector StatisticsForegroundBase::MTInfluenceMask = 
00074     (Inherited::MTInfluenceMask) | 
00075     (static_cast<BitVector>(0x0) << Inherited::NextFieldId); 
00076 
00077 
00078 // Field descriptions
00079 
00087 
00088 
00089 FieldDescription *StatisticsForegroundBase::_desc[] = 
00090 {
00091     new FieldDescription(MFInt32::getClassType(), 
00092                      "elementIDs", 
00093                      ElementIDsFieldId, ElementIDsFieldMask,
00094                      false,
00095                      (FieldAccessMethod) &StatisticsForegroundBase::getMFElementIDs),
00096     new FieldDescription(SFStatCollector::getClassType(), 
00097                      "collector", 
00098                      CollectorFieldId, CollectorFieldMask,
00099                      false,
00100                      (FieldAccessMethod) &StatisticsForegroundBase::getSFCollector)
00101 };
00102 
00103 
00104 FieldContainerType StatisticsForegroundBase::_type(
00105     "StatisticsForeground",
00106     "Foreground",
00107     NULL,
00108     NULL, 
00109     StatisticsForeground::initMethod,
00110     _desc,
00111     sizeof(_desc));
00112 
00113 //OSG_FIELD_CONTAINER_DEF(StatisticsForegroundBase, StatisticsForegroundPtr)
00114 
00115 /*------------------------------ get -----------------------------------*/
00116 
00117 FieldContainerType &StatisticsForegroundBase::getType(void) 
00118 {
00119     return _type; 
00120 } 
00121 
00122 const FieldContainerType &StatisticsForegroundBase::getType(void) const 
00123 {
00124     return _type;
00125 } 
00126 
00127 
00128 UInt32 StatisticsForegroundBase::getContainerSize(void) const 
00129 { 
00130     return sizeof(StatisticsForeground); 
00131 }
00132 
00133 
00134 #if !defined(OSG_FIXED_MFIELDSYNC)
00135 void StatisticsForegroundBase::executeSync(      FieldContainer &other,
00136                                     const BitVector      &whichField)
00137 {
00138     this->executeSyncImpl((StatisticsForegroundBase *) &other, whichField);
00139 }
00140 #else
00141 void StatisticsForegroundBase::executeSync(      FieldContainer &other,
00142                                     const BitVector      &whichField,                                    const SyncInfo       &sInfo     )
00143 {
00144     this->executeSyncImpl((StatisticsForegroundBase *) &other, whichField, sInfo);
00145 }
00146 void StatisticsForegroundBase::execBeginEdit(const BitVector &whichField, 
00147                                             UInt32     uiAspect,
00148                                             UInt32     uiContainerSize) 
00149 {
00150     this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00151 }
00152 
00153 void StatisticsForegroundBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00154 {
00155     Inherited::onDestroyAspect(uiId, uiAspect);
00156 
00157     _mfElementIDs.terminateShare(uiAspect, this->getContainerSize());
00158 }
00159 #endif
00160 
00161 /*------------------------- constructors ----------------------------------*/
00162 
00163 #ifdef OSG_WIN32_ICL
00164 #pragma warning (disable : 383)
00165 #endif
00166 
00167 StatisticsForegroundBase::StatisticsForegroundBase(void) :
00168     _mfElementIDs             (), 
00169     _sfCollector              (), 
00170     Inherited() 
00171 {
00172 }
00173 
00174 #ifdef OSG_WIN32_ICL
00175 #pragma warning (default : 383)
00176 #endif
00177 
00178 StatisticsForegroundBase::StatisticsForegroundBase(const StatisticsForegroundBase &source) :
00179     _mfElementIDs             (source._mfElementIDs             ), 
00180     _sfCollector              (source._sfCollector              ), 
00181     Inherited                 (source)
00182 {
00183 }
00184 
00185 /*-------------------------- destructors ----------------------------------*/
00186 
00187 StatisticsForegroundBase::~StatisticsForegroundBase(void)
00188 {
00189 }
00190 
00191 /*------------------------------ access -----------------------------------*/
00192 
00193 UInt32 StatisticsForegroundBase::getBinSize(const BitVector &whichField)
00194 {
00195     UInt32 returnValue = Inherited::getBinSize(whichField);
00196 
00197     if(FieldBits::NoField != (ElementIDsFieldMask & whichField))
00198     {
00199         returnValue += _mfElementIDs.getBinSize();
00200     }
00201 
00202     if(FieldBits::NoField != (CollectorFieldMask & whichField))
00203     {
00204         returnValue += _sfCollector.getBinSize();
00205     }
00206 
00207 
00208     return returnValue;
00209 }
00210 
00211 void StatisticsForegroundBase::copyToBin(      BinaryDataHandler &pMem,
00212                                   const BitVector         &whichField)
00213 {
00214     Inherited::copyToBin(pMem, whichField);
00215 
00216     if(FieldBits::NoField != (ElementIDsFieldMask & whichField))
00217     {
00218         _mfElementIDs.copyToBin(pMem);
00219     }
00220 
00221     if(FieldBits::NoField != (CollectorFieldMask & whichField))
00222     {
00223         _sfCollector.copyToBin(pMem);
00224     }
00225 
00226 
00227 }
00228 
00229 void StatisticsForegroundBase::copyFromBin(      BinaryDataHandler &pMem,
00230                                     const BitVector    &whichField)
00231 {
00232     Inherited::copyFromBin(pMem, whichField);
00233 
00234     if(FieldBits::NoField != (ElementIDsFieldMask & whichField))
00235     {
00236         _mfElementIDs.copyFromBin(pMem);
00237     }
00238 
00239     if(FieldBits::NoField != (CollectorFieldMask & whichField))
00240     {
00241         _sfCollector.copyFromBin(pMem);
00242     }
00243 
00244 
00245 }
00246 
00247 #if !defined(OSG_FIXED_MFIELDSYNC)
00248 void StatisticsForegroundBase::executeSyncImpl(      StatisticsForegroundBase *pOther,
00249                                         const BitVector         &whichField)
00250 {
00251 
00252     Inherited::executeSyncImpl(pOther, whichField);
00253 
00254     if(FieldBits::NoField != (ElementIDsFieldMask & whichField))
00255         _mfElementIDs.syncWith(pOther->_mfElementIDs);
00256 
00257     if(FieldBits::NoField != (CollectorFieldMask & whichField))
00258         _sfCollector.syncWith(pOther->_sfCollector);
00259 
00260 
00261 }
00262 #else
00263 void StatisticsForegroundBase::executeSyncImpl(      StatisticsForegroundBase *pOther,
00264                                         const BitVector         &whichField,
00265                                         const SyncInfo          &sInfo      )
00266 {
00267 
00268     Inherited::executeSyncImpl(pOther, whichField, sInfo);
00269 
00270     if(FieldBits::NoField != (CollectorFieldMask & whichField))
00271         _sfCollector.syncWith(pOther->_sfCollector);
00272 
00273 
00274     if(FieldBits::NoField != (ElementIDsFieldMask & whichField))
00275         _mfElementIDs.syncWith(pOther->_mfElementIDs, sInfo);
00276 
00277 
00278 }
00279 
00280 void StatisticsForegroundBase::execBeginEditImpl (const BitVector &whichField, 
00281                                                  UInt32     uiAspect,
00282                                                  UInt32     uiContainerSize)
00283 {
00284     Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00285 
00286     if(FieldBits::NoField != (ElementIDsFieldMask & whichField))
00287         _mfElementIDs.beginEdit(uiAspect, uiContainerSize);
00288 
00289 }
00290 #endif
00291 
00292 
00293 
00294 #include <OSGSFieldTypeDef.inl>
00295 #include <OSGMFieldTypeDef.inl>
00296 
00297 OSG_BEGIN_NAMESPACE
00298 
00299 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00300 DataType FieldDataTraits<StatisticsForegroundPtr>::_type("StatisticsForegroundPtr", "ForegroundPtr");
00301 #endif
00302 
00303 OSG_DLLEXPORT_SFIELD_DEF1(StatisticsForegroundPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00304 OSG_DLLEXPORT_MFIELD_DEF1(StatisticsForegroundPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00305 
00306 OSG_END_NAMESPACE
00307 
00308 
00309 /*------------------------------------------------------------------------*/
00310 /*                              cvs id's                                  */
00311 
00312 #ifdef OSG_SGI_CC
00313 #pragma set woff 1174
00314 #endif
00315 
00316 #ifdef OSG_LINUX_ICC
00317 #pragma warning( disable : 177 )
00318 #endif
00319 
00320 namespace
00321 {
00322     static Char8 cvsid_cpp       [] = "@(#)$Id: FCBaseTemplate_cpp.h,v 1.42 2004/08/03 05:53:03 dirk Exp $";
00323     static Char8 cvsid_hpp       [] = OSGSTATISTICSFOREGROUNDBASE_HEADER_CVSID;
00324     static Char8 cvsid_inl       [] = OSGSTATISTICSFOREGROUNDBASE_INLINE_CVSID;
00325 
00326     static Char8 cvsid_fields_hpp[] = OSGSTATISTICSFOREGROUNDFIELDS_HEADER_CVSID;
00327 }
00328 

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