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

OSGAttachmentContainerImpl.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *                     Copyright 2000-2002 by OpenSG Forum                   *
00006  *                                                                           *
00007  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00008  *                                                                           *
00009 \*---------------------------------------------------------------------------*/
00010 /*---------------------------------------------------------------------------*\
00011  *                                License                                    *
00012  *                                                                           *
00013  * This library is free software; you can redistribute it and/or modify it   *
00014  * under the terms of the GNU Library General Public License as published    *
00015  * by the Free Software Foundation, version 2.                               *
00016  *                                                                           *
00017  * This library is distributed in the hope that it will be useful, but       *
00018  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00020  * Library General Public License for more details.                          *
00021  *                                                                           *
00022  * You should have received a copy of the GNU Library General Public         *
00023  * License along with this library; if not, write to the Free Software       *
00024  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00025  *                                                                           *
00026 \*---------------------------------------------------------------------------*/
00027 /*---------------------------------------------------------------------------*\
00028  *                                Changes                                    *
00029  *                                                                           *
00030  *                                                                           *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef _OSGATTACHMENTCONTAINERIMPL_H_
00038 #define _OSGATTACHMENTCONTAINERIMPL_H_
00039 #ifdef __sgi
00040 #pragma once
00041 #endif
00042 
00043 #ifdef OSG_DOC_FILES_IN_MODULE
00044 
00047 #endif
00048 
00049 #include <OSGSystemDef.h>
00050 #include <OSGBaseTypes.h>
00051 #include <OSGMatrix.h>
00052 #include <OSGFieldContainer.h>
00053 #include <OSGSFAttachmentMap.h>
00054 #include <OSGAttachmentPtr.h>
00055 
00056 OSG_BEGIN_NAMESPACE
00057 
00058 class BinaryDataHandler;
00059 
00066 class OSG_SYSTEMLIB_DLLMAPPING AttachmentContainer : public FieldContainer 
00067 {
00068     /*=========================  PROTECTED  ===============================*/
00069 
00070   protected:
00071 
00072     typedef FieldContainer Inherited;
00073 
00074     /*==========================  PUBLIC  =================================*/
00075 
00076   public:
00077 
00078     enum 
00079     { 
00080         AttachmentsFieldId = Inherited::NextFieldId, 
00081         NextFieldId        = AttachmentsFieldId + 1
00082     };
00083 
00084     static const BitVector AttachmentsFieldMask;
00085 
00086 
00087     /*---------------------------------------------------------------------*/
00091     OSG_ABSTR_FIELD_CONTAINER_DECL(AttachmentContainerPtr)
00092 
00093     
00094     /*---------------------------------------------------------------------*/
00098     void          addAttachment (const AttachmentPtr &fieldContainerP, 
00099                                        UInt16         binding        = 0);
00100 
00101     void          subAttachment (const AttachmentPtr &fieldContainerP,
00102                                        UInt16         binding        = 0);
00103 
00104     AttachmentPtr findAttachment(      UInt32         groupId,
00105                                        UInt16         binding        = 0);
00106 
00107     AttachmentPtr findAttachment(const FieldContainerType &type,
00108                                        UInt16              binding   = 0);
00110     /*---------------------------------------------------------------------*/
00114     SFAttachmentMap *getSFAttachments(void);
00115 
00117     /*---------------------------------------------------------------------*/
00121     virtual void changed(BitVector  whichField, 
00122                          UInt32     origin    );
00123 
00125     /*---------------------------------------------------------------------*/
00129     virtual UInt32  getBinSize (const BitVector         &whichField);
00130 
00131     virtual void    copyToBin  (      BinaryDataHandler &pMem, 
00132                                 const BitVector         &whichField);
00133     virtual void    copyFromBin(      BinaryDataHandler &pMem, 
00134                                 const BitVector         &whichField);
00135     
00137     /*---------------------------------------------------------------------*/
00141     virtual void dump(      UInt32    uiIndent = 0, 
00142                       const BitVector bvFlags  = 0) const;
00143 
00145     /*=========================  PROTECTED  ===============================*/
00146 
00147   protected:
00148 
00149     /*---------------------------------------------------------------------*/
00153     static FieldDescription   *_desc[];
00154     static FieldContainerType  _type;
00155 
00157     /*---------------------------------------------------------------------*/
00161     SFAttachmentMap _attachmentMap;
00162 
00164     /*---------------------------------------------------------------------*/
00168     AttachmentContainer(void);
00169     AttachmentContainer(const AttachmentContainer &source);
00170 
00172     /*---------------------------------------------------------------------*/
00176     virtual ~AttachmentContainer (void);
00177 
00179     /*---------------------------------------------------------------------*/
00183 #if !defined(OSG_FIXED_MFIELDSYNC)
00184     virtual void executeSync    (      FieldContainer      &other,
00185                                  const BitVector           &whichField);
00186 
00187             void executeSyncImpl(      AttachmentContainer *pOther,
00188                                  const BitVector           &whichField);
00189 #else
00190     virtual void executeSync    (      FieldContainer      &other,
00191                                  const BitVector           &whichField,
00192                                  const SyncInfo            &sInfo     );
00193 
00194             void executeSyncImpl(      AttachmentContainer *pOther,
00195                                  const BitVector           &whichField,
00196                                  const SyncInfo            &sInfo     );
00197 #endif
00198 
00200     /*---------------------------------------------------------------------*/
00204     AttachmentContainerPtr getPtr(void);
00205 
00207     /*==========================  PRIVATE  ================================*/
00208 
00209   private:
00210 
00211     friend class FieldContainer;
00212     friend class FieldContainerType;
00213 
00215     void operator =(const AttachmentContainer &source);
00216 };
00217 
00218 OSG_END_NAMESPACE
00219 
00220 #define OSGATTACHMENTCONTAINER_HEADER_CVSID "@(#)$Id: $"
00221 
00222 #endif /* _OSGATTACHMENTCONTAINERIMPL_H_ */

Generated on Thu Aug 25 04:01:00 2005 for OpenSG by  doxygen 1.4.3