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

OSGQTWindowBase.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 QTWindow!
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #define OSG_COMPILEQTWINDOWINST
00055 
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058 
00059 #include <OSGConfig.h>
00060 
00061 #include "OSGQTWindowBase.h"
00062 #include "OSGQTWindow.h"
00063 
00064 
00065 OSG_USING_NAMESPACE
00066 
00067 #ifdef __sgi
00068 #pragma set woff 1174
00069 #endif
00070 
00071 namespace
00072 {
00073     static Char8 cvsid_cpp       [] = "@(#)$Id: $";
00074     static Char8 cvsid_hpp       [] = OSGQTWINDOWBASE_HEADER_CVSID;
00075     static Char8 cvsid_inl       [] = OSGQTWINDOWBASE_INLINE_CVSID;
00076 
00077     static Char8 cvsid_fields_hpp[] = OSGQTWINDOWFIELDS_HEADER_CVSID;
00078 }
00079 
00080 #ifdef __sgi
00081 #pragma reset woff 1174
00082 #endif
00083 
00084 const OSG::BitVector  QTWindowBase::GlWidgetFieldMask = 
00085     (1 << QTWindowBase::GlWidgetFieldId);
00086 
00087 
00088 
00089 // Field descriptions
00090 
00094 
00095 
00096 FieldDescription *QTWindowBase::_desc[] = 
00097 {
00098     new FieldDescription(SFOSGQGLWidgetP::getClassType(), 
00099                      "GlWidget", 
00100                      GlWidgetFieldId, GlWidgetFieldMask,
00101                      true,
00102                      (FieldAccessMethod) &QTWindowBase::getSFGlWidget)
00103 };
00104 
00106 
00107 FieldContainerType QTWindowBase::_type(
00108     "QTWindow",
00109 #ifdef WIN32
00110     "WIN32Window",
00111 #else
00112     "XWindow",
00113 #endif
00114     NULL,
00115     (PrototypeCreateF) &QTWindowBase::createEmpty,
00116     QTWindow::initMethod,
00117     _desc,
00118     sizeof(_desc));
00119 
00120 //OSG_FIELD_CONTAINER_DEF(QTWindowBase, QTWindowPtr)
00121 
00122 /*------------------------------ get -----------------------------------*/
00123 
00124 FieldContainerType &QTWindowBase::getType(void) 
00125 {
00126     return _type; 
00127 } 
00128 
00129 const FieldContainerType &QTWindowBase::getType(void) const 
00130 {
00131     return _type;
00132 } 
00133 
00134 
00135 FieldContainerPtr QTWindowBase::shallowCopy(void) const 
00136 { 
00137     QTWindowPtr returnValue; 
00138 
00139     newPtr(returnValue, dynamic_cast<const QTWindow *>(this)); 
00140 
00141     return returnValue; 
00142 }
00143 
00144 UInt32 QTWindowBase::getContainerSize(void) const 
00145 { 
00146     return sizeof(QTWindowBase); 
00147 }
00148 
00149 
00150 void QTWindowBase::executeSync(      FieldContainer &other,
00151                                     const BitVector      &whichField)
00152 {
00153     this->executeSyncImpl((QTWindowBase *) &other, whichField);
00154 }
00155 
00156 /*------------------------- constructors ----------------------------------*/
00157 
00159 
00160 #ifdef OSG_WIN32_ICL
00161 #pragma warning (disable : 383)
00162 #endif
00163 
00164 QTWindowBase::QTWindowBase(void) :
00165     _sfGlWidget               (OSGQGLWidgetP(NULL)), 
00166     Inherited() 
00167 {
00168 }
00169 
00170 #ifdef OSG_WIN32_ICL
00171 #pragma warning (default : 383)
00172 #endif
00173 
00175 
00176 QTWindowBase::QTWindowBase(const QTWindowBase &source) :
00177     _sfGlWidget               (source._sfGlWidget               ), 
00178     Inherited                 (source)
00179 {
00180 }
00181 
00182 /*-------------------------- destructors ----------------------------------*/
00183 
00185 
00186 QTWindowBase::~QTWindowBase(void)
00187 {
00188 }
00189 
00190 /*------------------------------ access -----------------------------------*/
00191 
00192 UInt32 QTWindowBase::getBinSize(const BitVector &whichField)
00193 {
00194     UInt32 returnValue = Inherited::getBinSize(whichField);
00195 
00196     if(FieldBits::NoField != (GlWidgetFieldMask & whichField))
00197     {
00198         returnValue += _sfGlWidget.getBinSize();
00199     }
00200 
00201 
00202     return returnValue;
00203 }
00204 
00205 void QTWindowBase::copyToBin(      BinaryDataHandler &pMem,
00206                                   const BitVector         &whichField)
00207 {
00208     Inherited::copyToBin(pMem, whichField);
00209 
00210     if(FieldBits::NoField != (GlWidgetFieldMask & whichField))
00211     {
00212         _sfGlWidget.copyToBin(pMem);
00213     }
00214 
00215 
00216 }
00217 
00218 void QTWindowBase::copyFromBin(      BinaryDataHandler &pMem,
00219                                     const BitVector    &whichField)
00220 {
00221     Inherited::copyFromBin(pMem, whichField);
00222 
00223     if(FieldBits::NoField != (GlWidgetFieldMask & whichField))
00224     {
00225         _sfGlWidget.copyFromBin(pMem);
00226     }
00227 
00228 
00229 }
00230 
00231 void QTWindowBase::executeSyncImpl(      QTWindowBase *pOther,
00232                                         const BitVector         &whichField)
00233 {
00234 
00235     Inherited::executeSyncImpl(pOther, whichField);
00236 
00237     if(FieldBits::NoField != (GlWidgetFieldMask & whichField))
00238         _sfGlWidget.syncWith(pOther->_sfGlWidget);
00239 
00240 
00241 }
00242 
00243 
00244 #include <OSGMFieldTypeDef.inl>
00245 #include <OSGSFieldTypeDef.inl>
00246 
00247 OSG_BEGIN_NAMESPACE
00248 
00249 DataType FieldDataTraits<QTWindowPtr>::_type("QTWindowPtr", "WindowPtr");
00250 
00251 OSG_DLLEXPORT_SFIELD_DEF1(QTWindowPtr, OSG_WINDOWQTLIB_DLLTMPLMAPPING);
00252 OSG_DLLEXPORT_MFIELD_DEF1(QTWindowPtr, OSG_WINDOWQTLIB_DLLTMPLMAPPING);
00253 
00254 OSG_END_NAMESPACE

Generated on Thu Aug 25 04:09:02 2005 for OpenSG by  doxygen 1.4.3