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

OSGShaderParameterIntBase.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 ShaderParameterInt!
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #define OSG_COMPILESHADERPARAMETERINTINST
00055 
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058 
00059 #include <OSGConfig.h>
00060 
00061 #include "OSGShaderParameterIntBase.h"
00062 #include "OSGShaderParameterInt.h"
00063 
00064 
00065 OSG_USING_NAMESPACE
00066 
00067 const OSG::BitVector  ShaderParameterIntBase::ValueFieldMask = 
00068     (TypeTraits<BitVector>::One << ShaderParameterIntBase::ValueFieldId);
00069 
00070 const OSG::BitVector ShaderParameterIntBase::MTInfluenceMask = 
00071     (Inherited::MTInfluenceMask) | 
00072     (static_cast<BitVector>(0x0) << Inherited::NextFieldId); 
00073 
00074 
00075 // Field descriptions
00076 
00081 
00082 
00083 FieldDescription *ShaderParameterIntBase::_desc[] = 
00084 {
00085     new FieldDescription(SFInt32::getClassType(), 
00086                      "value", 
00087                      ValueFieldId, ValueFieldMask,
00088                      false,
00089                      (FieldAccessMethod) &ShaderParameterIntBase::getSFValue)
00090 };
00091 
00092 
00093 FieldContainerType ShaderParameterIntBase::_type(
00094     "ShaderParameterInt",
00095     "ShaderParameter",
00096     NULL,
00097     (PrototypeCreateF) &ShaderParameterIntBase::createEmpty,
00098     ShaderParameterInt::initMethod,
00099     _desc,
00100     sizeof(_desc));
00101 
00102 //OSG_FIELD_CONTAINER_DEF(ShaderParameterIntBase, ShaderParameterIntPtr)
00103 
00104 /*------------------------------ get -----------------------------------*/
00105 
00106 FieldContainerType &ShaderParameterIntBase::getType(void) 
00107 {
00108     return _type; 
00109 } 
00110 
00111 const FieldContainerType &ShaderParameterIntBase::getType(void) const 
00112 {
00113     return _type;
00114 } 
00115 
00116 
00117 FieldContainerPtr ShaderParameterIntBase::shallowCopy(void) const 
00118 { 
00119     ShaderParameterIntPtr returnValue; 
00120 
00121     newPtr(returnValue, dynamic_cast<const ShaderParameterInt *>(this)); 
00122 
00123     return returnValue; 
00124 }
00125 
00126 UInt32 ShaderParameterIntBase::getContainerSize(void) const 
00127 { 
00128     return sizeof(ShaderParameterInt); 
00129 }
00130 
00131 
00132 #if !defined(OSG_FIXED_MFIELDSYNC)
00133 void ShaderParameterIntBase::executeSync(      FieldContainer &other,
00134                                     const BitVector      &whichField)
00135 {
00136     this->executeSyncImpl((ShaderParameterIntBase *) &other, whichField);
00137 }
00138 #else
00139 void ShaderParameterIntBase::executeSync(      FieldContainer &other,
00140                                     const BitVector      &whichField,                                    const SyncInfo       &sInfo     )
00141 {
00142     this->executeSyncImpl((ShaderParameterIntBase *) &other, whichField, sInfo);
00143 }
00144 void ShaderParameterIntBase::execBeginEdit(const BitVector &whichField, 
00145                                             UInt32     uiAspect,
00146                                             UInt32     uiContainerSize) 
00147 {
00148     this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00149 }
00150 
00151 void ShaderParameterIntBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00152 {
00153     Inherited::onDestroyAspect(uiId, uiAspect);
00154 
00155 }
00156 #endif
00157 
00158 /*------------------------- constructors ----------------------------------*/
00159 
00160 #ifdef OSG_WIN32_ICL
00161 #pragma warning (disable : 383)
00162 #endif
00163 
00164 ShaderParameterIntBase::ShaderParameterIntBase(void) :
00165     _sfValue                  (), 
00166     Inherited() 
00167 {
00168 }
00169 
00170 #ifdef OSG_WIN32_ICL
00171 #pragma warning (default : 383)
00172 #endif
00173 
00174 ShaderParameterIntBase::ShaderParameterIntBase(const ShaderParameterIntBase &source) :
00175     _sfValue                  (source._sfValue                  ), 
00176     Inherited                 (source)
00177 {
00178 }
00179 
00180 /*-------------------------- destructors ----------------------------------*/
00181 
00182 ShaderParameterIntBase::~ShaderParameterIntBase(void)
00183 {
00184 }
00185 
00186 /*------------------------------ access -----------------------------------*/
00187 
00188 UInt32 ShaderParameterIntBase::getBinSize(const BitVector &whichField)
00189 {
00190     UInt32 returnValue = Inherited::getBinSize(whichField);
00191 
00192     if(FieldBits::NoField != (ValueFieldMask & whichField))
00193     {
00194         returnValue += _sfValue.getBinSize();
00195     }
00196 
00197 
00198     return returnValue;
00199 }
00200 
00201 void ShaderParameterIntBase::copyToBin(      BinaryDataHandler &pMem,
00202                                   const BitVector         &whichField)
00203 {
00204     Inherited::copyToBin(pMem, whichField);
00205 
00206     if(FieldBits::NoField != (ValueFieldMask & whichField))
00207     {
00208         _sfValue.copyToBin(pMem);
00209     }
00210 
00211 
00212 }
00213 
00214 void ShaderParameterIntBase::copyFromBin(      BinaryDataHandler &pMem,
00215                                     const BitVector    &whichField)
00216 {
00217     Inherited::copyFromBin(pMem, whichField);
00218 
00219     if(FieldBits::NoField != (ValueFieldMask & whichField))
00220     {
00221         _sfValue.copyFromBin(pMem);
00222     }
00223 
00224 
00225 }
00226 
00227 #if !defined(OSG_FIXED_MFIELDSYNC)
00228 void ShaderParameterIntBase::executeSyncImpl(      ShaderParameterIntBase *pOther,
00229                                         const BitVector         &whichField)
00230 {
00231 
00232     Inherited::executeSyncImpl(pOther, whichField);
00233 
00234     if(FieldBits::NoField != (ValueFieldMask & whichField))
00235         _sfValue.syncWith(pOther->_sfValue);
00236 
00237 
00238 }
00239 #else
00240 void ShaderParameterIntBase::executeSyncImpl(      ShaderParameterIntBase *pOther,
00241                                         const BitVector         &whichField,
00242                                         const SyncInfo          &sInfo      )
00243 {
00244 
00245     Inherited::executeSyncImpl(pOther, whichField, sInfo);
00246 
00247     if(FieldBits::NoField != (ValueFieldMask & whichField))
00248         _sfValue.syncWith(pOther->_sfValue);
00249 
00250 
00251 
00252 }
00253 
00254 void ShaderParameterIntBase::execBeginEditImpl (const BitVector &whichField, 
00255                                                  UInt32     uiAspect,
00256                                                  UInt32     uiContainerSize)
00257 {
00258     Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00259 
00260 }
00261 #endif
00262 
00263 
00264 
00265 #include <OSGSFieldTypeDef.inl>
00266 #include <OSGMFieldTypeDef.inl>
00267 
00268 OSG_BEGIN_NAMESPACE
00269 
00270 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00271 DataType FieldDataTraits<ShaderParameterIntPtr>::_type("ShaderParameterIntPtr", "ShaderParameterPtr");
00272 #endif
00273 
00274 OSG_DLLEXPORT_SFIELD_DEF1(ShaderParameterIntPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00275 OSG_DLLEXPORT_MFIELD_DEF1(ShaderParameterIntPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00276 
00277 OSG_END_NAMESPACE
00278 
00279 
00280 /*------------------------------------------------------------------------*/
00281 /*                              cvs id's                                  */
00282 
00283 #ifdef OSG_SGI_CC
00284 #pragma set woff 1174
00285 #endif
00286 
00287 #ifdef OSG_LINUX_ICC
00288 #pragma warning( disable : 177 )
00289 #endif
00290 
00291 namespace
00292 {
00293     static Char8 cvsid_cpp       [] = "@(#)$Id: OSGShaderParameterIntBase.cpp,v 1.5 2005/07/20 00:08:59 vossg Exp $";
00294     static Char8 cvsid_hpp       [] = OSGSHADERPARAMETERINTBASE_HEADER_CVSID;
00295     static Char8 cvsid_inl       [] = OSGSHADERPARAMETERINTBASE_INLINE_CVSID;
00296 
00297     static Char8 cvsid_fields_hpp[] = OSGSHADERPARAMETERINTFIELDS_HEADER_CVSID;
00298 }
00299 

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