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

OSGWIN32WindowBase.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 WIN32Window!
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #define OSG_COMPILEWIN32WINDOWINST
00055 
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058 
00059 #include <OSGConfig.h>
00060 
00061 #include "OSGWIN32WindowBase.h"
00062 #include "OSGWIN32Window.h"
00063 
00064 
00065 OSG_USING_NAMESPACE
00066 
00067 const OSG::BitVector  WIN32WindowBase::HwndFieldMask = 
00068     (TypeTraits<BitVector>::One << WIN32WindowBase::HwndFieldId);
00069 
00070 const OSG::BitVector  WIN32WindowBase::HdcFieldMask = 
00071     (TypeTraits<BitVector>::One << WIN32WindowBase::HdcFieldId);
00072 
00073 const OSG::BitVector  WIN32WindowBase::HglrcFieldMask = 
00074     (TypeTraits<BitVector>::One << WIN32WindowBase::HglrcFieldId);
00075 
00076 const OSG::BitVector WIN32WindowBase::MTInfluenceMask = 
00077     (Inherited::MTInfluenceMask) | 
00078     (static_cast<BitVector>(0x0) << Inherited::NextFieldId); 
00079 
00080 
00081 // Field descriptions
00082 
00093 
00094 
00095 FieldDescription *WIN32WindowBase::_desc[] = 
00096 {
00097     new FieldDescription(SFHWND::getClassType(), 
00098                      "hwnd", 
00099                      HwndFieldId, HwndFieldMask,
00100                      true,
00101                      (FieldAccessMethod) &WIN32WindowBase::getSFHwnd),
00102     new FieldDescription(SFHDC::getClassType(), 
00103                      "hdc", 
00104                      HdcFieldId, HdcFieldMask,
00105                      true,
00106                      (FieldAccessMethod) &WIN32WindowBase::getSFHdc),
00107     new FieldDescription(SFHGLRC::getClassType(), 
00108                      "hglrc", 
00109                      HglrcFieldId, HglrcFieldMask,
00110                      true,
00111                      (FieldAccessMethod) &WIN32WindowBase::getSFHglrc)
00112 };
00113 
00114 
00115 FieldContainerType WIN32WindowBase::_type(
00116     "WIN32Window",
00117     "Window",
00118     NULL,
00119     (PrototypeCreateF) &WIN32WindowBase::createEmpty,
00120     WIN32Window::initMethod,
00121     _desc,
00122     sizeof(_desc));
00123 
00124 //OSG_FIELD_CONTAINER_DEF(WIN32WindowBase, WIN32WindowPtr)
00125 
00126 /*------------------------------ get -----------------------------------*/
00127 
00128 FieldContainerType &WIN32WindowBase::getType(void) 
00129 {
00130     return _type; 
00131 } 
00132 
00133 const FieldContainerType &WIN32WindowBase::getType(void) const 
00134 {
00135     return _type;
00136 } 
00137 
00138 
00139 FieldContainerPtr WIN32WindowBase::shallowCopy(void) const 
00140 { 
00141     WIN32WindowPtr returnValue; 
00142 
00143     newPtr(returnValue, dynamic_cast<const WIN32Window *>(this)); 
00144 
00145     return returnValue; 
00146 }
00147 
00148 UInt32 WIN32WindowBase::getContainerSize(void) const 
00149 { 
00150     return sizeof(WIN32Window); 
00151 }
00152 
00153 
00154 #if !defined(OSG_FIXED_MFIELDSYNC)
00155 void WIN32WindowBase::executeSync(      FieldContainer &other,
00156                                     const BitVector      &whichField)
00157 {
00158     this->executeSyncImpl((WIN32WindowBase *) &other, whichField);
00159 }
00160 #else
00161 void WIN32WindowBase::executeSync(      FieldContainer &other,
00162                                     const BitVector      &whichField,                                    const SyncInfo       &sInfo     )
00163 {
00164     this->executeSyncImpl((WIN32WindowBase *) &other, whichField, sInfo);
00165 }
00166 void WIN32WindowBase::execBeginEdit(const BitVector &whichField, 
00167                                             UInt32     uiAspect,
00168                                             UInt32     uiContainerSize) 
00169 {
00170     this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00171 }
00172 
00173 void WIN32WindowBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00174 {
00175     Inherited::onDestroyAspect(uiId, uiAspect);
00176 
00177 }
00178 #endif
00179 
00180 /*------------------------- constructors ----------------------------------*/
00181 
00182 #ifdef OSG_WIN32_ICL
00183 #pragma warning (disable : 383)
00184 #endif
00185 
00186 WIN32WindowBase::WIN32WindowBase(void) :
00187     _sfHwnd                   (HWND(0)), 
00188     _sfHdc                    (HDC(0)), 
00189     _sfHglrc                  (HGLRC(0)), 
00190     Inherited() 
00191 {
00192 }
00193 
00194 #ifdef OSG_WIN32_ICL
00195 #pragma warning (default : 383)
00196 #endif
00197 
00198 WIN32WindowBase::WIN32WindowBase(const WIN32WindowBase &source) :
00199     _sfHwnd                   (source._sfHwnd                   ), 
00200     _sfHdc                    (source._sfHdc                    ), 
00201     _sfHglrc                  (source._sfHglrc                  ), 
00202     Inherited                 (source)
00203 {
00204 }
00205 
00206 /*-------------------------- destructors ----------------------------------*/
00207 
00208 WIN32WindowBase::~WIN32WindowBase(void)
00209 {
00210 }
00211 
00212 /*------------------------------ access -----------------------------------*/
00213 
00214 UInt32 WIN32WindowBase::getBinSize(const BitVector &whichField)
00215 {
00216     UInt32 returnValue = Inherited::getBinSize(whichField);
00217 
00218     if(FieldBits::NoField != (HwndFieldMask & whichField))
00219     {
00220         returnValue += _sfHwnd.getBinSize();
00221     }
00222 
00223     if(FieldBits::NoField != (HdcFieldMask & whichField))
00224     {
00225         returnValue += _sfHdc.getBinSize();
00226     }
00227 
00228     if(FieldBits::NoField != (HglrcFieldMask & whichField))
00229     {
00230         returnValue += _sfHglrc.getBinSize();
00231     }
00232 
00233 
00234     return returnValue;
00235 }
00236 
00237 void WIN32WindowBase::copyToBin(      BinaryDataHandler &pMem,
00238                                   const BitVector         &whichField)
00239 {
00240     Inherited::copyToBin(pMem, whichField);
00241 
00242     if(FieldBits::NoField != (HwndFieldMask & whichField))
00243     {
00244         _sfHwnd.copyToBin(pMem);
00245     }
00246 
00247     if(FieldBits::NoField != (HdcFieldMask & whichField))
00248     {
00249         _sfHdc.copyToBin(pMem);
00250     }
00251 
00252     if(FieldBits::NoField != (HglrcFieldMask & whichField))
00253     {
00254         _sfHglrc.copyToBin(pMem);
00255     }
00256 
00257 
00258 }
00259 
00260 void WIN32WindowBase::copyFromBin(      BinaryDataHandler &pMem,
00261                                     const BitVector    &whichField)
00262 {
00263     Inherited::copyFromBin(pMem, whichField);
00264 
00265     if(FieldBits::NoField != (HwndFieldMask & whichField))
00266     {
00267         _sfHwnd.copyFromBin(pMem);
00268     }
00269 
00270     if(FieldBits::NoField != (HdcFieldMask & whichField))
00271     {
00272         _sfHdc.copyFromBin(pMem);
00273     }
00274 
00275     if(FieldBits::NoField != (HglrcFieldMask & whichField))
00276     {
00277         _sfHglrc.copyFromBin(pMem);
00278     }
00279 
00280 
00281 }
00282 
00283 #if !defined(OSG_FIXED_MFIELDSYNC)
00284 void WIN32WindowBase::executeSyncImpl(      WIN32WindowBase *pOther,
00285                                         const BitVector         &whichField)
00286 {
00287 
00288     Inherited::executeSyncImpl(pOther, whichField);
00289 
00290     if(FieldBits::NoField != (HwndFieldMask & whichField))
00291         _sfHwnd.syncWith(pOther->_sfHwnd);
00292 
00293     if(FieldBits::NoField != (HdcFieldMask & whichField))
00294         _sfHdc.syncWith(pOther->_sfHdc);
00295 
00296     if(FieldBits::NoField != (HglrcFieldMask & whichField))
00297         _sfHglrc.syncWith(pOther->_sfHglrc);
00298 
00299 
00300 }
00301 #else
00302 void WIN32WindowBase::executeSyncImpl(      WIN32WindowBase *pOther,
00303                                         const BitVector         &whichField,
00304                                         const SyncInfo          &sInfo      )
00305 {
00306 
00307     Inherited::executeSyncImpl(pOther, whichField, sInfo);
00308 
00309     if(FieldBits::NoField != (HwndFieldMask & whichField))
00310         _sfHwnd.syncWith(pOther->_sfHwnd);
00311 
00312     if(FieldBits::NoField != (HdcFieldMask & whichField))
00313         _sfHdc.syncWith(pOther->_sfHdc);
00314 
00315     if(FieldBits::NoField != (HglrcFieldMask & whichField))
00316         _sfHglrc.syncWith(pOther->_sfHglrc);
00317 
00318 
00319 
00320 }
00321 
00322 void WIN32WindowBase::execBeginEditImpl (const BitVector &whichField, 
00323                                                  UInt32     uiAspect,
00324                                                  UInt32     uiContainerSize)
00325 {
00326     Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00327 
00328 }
00329 #endif
00330 
00331 
00332 
00333 #include <OSGSFieldTypeDef.inl>
00334 #include <OSGMFieldTypeDef.inl>
00335 
00336 OSG_BEGIN_NAMESPACE
00337 
00338 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00339 DataType FieldDataTraits<WIN32WindowPtr>::_type("WIN32WindowPtr", "WindowPtr");
00340 #endif
00341 
00342 OSG_DLLEXPORT_SFIELD_DEF1(WIN32WindowPtr, OSG_WINDOWWIN32LIB_DLLTMPLMAPPING);
00343 OSG_DLLEXPORT_MFIELD_DEF1(WIN32WindowPtr, OSG_WINDOWWIN32LIB_DLLTMPLMAPPING);
00344 
00345 OSG_END_NAMESPACE
00346 
00347 
00348 /*------------------------------------------------------------------------*/
00349 /*                              cvs id's                                  */
00350 
00351 #ifdef OSG_SGI_CC
00352 #pragma set woff 1174
00353 #endif
00354 
00355 #ifdef OSG_LINUX_ICC
00356 #pragma warning( disable : 177 )
00357 #endif
00358 
00359 namespace
00360 {
00361     static Char8 cvsid_cpp       [] = "@(#)$Id: FCBaseTemplate_cpp.h,v 1.42 2004/08/03 05:53:03 dirk Exp $";
00362     static Char8 cvsid_hpp       [] = OSGWIN32WINDOWBASE_HEADER_CVSID;
00363     static Char8 cvsid_inl       [] = OSGWIN32WINDOWBASE_INLINE_CVSID;
00364 
00365     static Char8 cvsid_fields_hpp[] = OSGWIN32WINDOWFIELDS_HEADER_CVSID;
00366 }
00367 

Generated on Thu Aug 25 04:12:11 2005 for OpenSG by  doxygen 1.4.3