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

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

Generated on Thu Aug 25 04:06:19 2005 for OpenSG by  doxygen 1.4.3