Show
Ignore:
Timestamp:
04/07/08 02:50:33 (8 months ago)
Author:
vossg
Message:

changed: merged some merge changes back to have a running reference

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/Base/OSGPointerSFieldBase.h

    r1072 r1138  
     1/*---------------------------------------------------------------------------*\ 
     2 *                                OpenSG                                     * 
     3 *                                                                           * 
     4 *                                                                           * 
     5 *           Copyright (C) 2008 by the OpenSG Forum                          * 
     6 *                                                                           * 
     7 *                            www.opensg.org                                 * 
     8 *                                                                           * 
     9 *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          * 
     10 *                                                                           * 
     11\*---------------------------------------------------------------------------*/ 
     12/*---------------------------------------------------------------------------*\ 
     13 *                                License                                    * 
     14 *                                                                           * 
     15 * This library is free software; you can redistribute it and/or modify it   * 
     16 * under the terms of the GNU Library General Public License as published    * 
     17 * by the Free Software Foundation, version 2.                               * 
     18 *                                                                           * 
     19 * This library is distributed in the hope that it will be useful, but       * 
     20 * WITHOUT ANY WARRANTY; without even the implied warranty of                * 
     21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         * 
     22 * Library General Public License for more details.                          * 
     23 *                                                                           * 
     24 * You should have received a copy of the GNU Library General Public         * 
     25 * License along with this library; if not, write to the Free Software       * 
     26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 * 
     27 *                                                                           * 
     28\*---------------------------------------------------------------------------*/ 
     29/*---------------------------------------------------------------------------*\ 
     30 *                                Changes                                    * 
     31 *                                                                           * 
     32 *                                                                           * 
     33 *                                                                           * 
     34 *                                                                           * 
     35 *                                                                           * 
     36 *                                                                           * 
     37\*---------------------------------------------------------------------------*/ 
    138 
    239#ifndef _OSGPOINTERSFIELDBASE_H_ 
     
    744#endif 
    845 
    9 #include "OSGConfig.h" 
    10 #include "OSGField.h" 
    11 #include "OSGContainerForwards.h" 
     46#include "OSGSystemDef.h" 
     47#include "OSGSField.h" 
     48#include "OSGFieldContainerFieldTraits.h" 
     49 
     50#include "OSGGetPointerSFieldBaseHandle.h" 
     51#include "OSGGetPointerSFieldHandle.h" 
    1252#include "OSGEditPointerSFieldBaseHandle.h" 
    13 #include "OSGGetPointerSFieldBaseHandle.h" 
    14  
     53#include "OSGEditPointerSFieldHandle.h" 
    1554 
    1655#ifdef OSG_DOC_FILES_IN_MODULE 
     
    2261OSG_BEGIN_NAMESPACE 
    2362 
    24 class PointerSFieldBase : public Field 
     63class OSG_SYSTEM_DLLMAPPING PointerSFieldBase : public Field 
    2564{ 
    2665    /*==========================  PUBLIC  =================================*/ 
     66 
    2767  public: 
     68 
    2869    /*---------------------------------------------------------------------*/ 
    2970    /*! \name Public Types                                                 */ 
    3071    /*! \{                                                                 */ 
    3172     
    32     typedef Field             Inherited; 
    33     typedef PointerSFieldBase Self; 
     73    typedef       Field                                    Inherited; 
     74 
     75    typedef       PointerSFieldBase                        Self; 
     76    typedef       FieldTraits      <FieldContainerPtr, 0>  SFieldTraits; 
    3477     
    3578    // storage 
    36     typedef FieldContainerPtr StoredType; 
     79    typedef       FieldContainerPtr                        StoredType; 
     80    typedef const FieldContainerPtr                        const_value; 
     81 
     82    typedef       EditSFieldHandle <Self      >            EditHandle; 
     83    typedef       boost::shared_ptr<EditHandle>            EditHandlePtr; 
     84 
     85    typedef       GetSFieldHandle  <Self     >             GetHandle; 
     86    typedef       boost::shared_ptr<GetHandle>             GetHandlePtr; 
    3787     
    38     typedef StoredType       &StoredTypeRef; 
    39     typedef StoredType const &StoredTypeConstRef; 
     88    /*---------------------------------------------------------------------*/ 
     89 
     90    static const bool isSField       = true; 
     91    static const bool isMField       = false; 
     92 
     93    static const bool isPointerField = true; 
     94 
     95    /*! \}                                                                 */ 
     96    /*---------------------------------------------------------------------*/ 
     97    /*! \name                   Class Get                                  */ 
     98    /*! \{                                                                 */ 
     99 
     100    static const FieldType &getClassType(void); 
     101 
     102    /*! \}                                                                 */ 
     103    /*---------------------------------------------------------------------*/ 
     104    /*! \name Raw Store Access                                             */ 
     105    /*! \{                                                                 */ 
    40106     
    41     // handles 
    42     typedef EditSFieldHandle<PointerSFieldBase>      EditHandle; 
    43     typedef EditSFieldHandle<PointerSFieldBase>::Ptr EditHandlePtr; 
     107    const_value getValue(void) const; 
    44108     
    45     typedef GetSFieldHandle <PointerSFieldBase>      GetHandle; 
    46     typedef GetSFieldHandle <PointerSFieldBase>::Ptr GetHandlePtr; 
     109    /*! \}                                                                 */ 
     110    /*---------------------------------------------------------------------*/ 
     111    /*! \name                   Binary Interface                           */ 
     112    /*! \{                                                                 */ 
     113 
     114    UInt32 getBinSize(void                   ) const; 
     115     
     116    void   copyToBin (BinaryDataHandler &pMem) const; 
     117 
     118    /*! \}                                                                 */ 
     119    /*---------------------------------------------------------------------*/ 
     120    /*! \name Raw Store Access                                             */ 
     121    /*! \{                                                                 */ 
     122 
     123    bool operator ==(const Self &source) const; 
     124 
     125    /*! \}                                                                 */ 
     126    /*=========================  PROTECTED  ===============================*/ 
     127 
     128  protected: 
     129 
     130    /*---------------------------------------------------------------------*/ 
     131    /*! \name Members                                                      */ 
     132    /*! \{                                                                 */ 
     133     
     134    static FieldType  _fieldType; 
     135 
     136           StoredType _fieldValue; 
    47137     
    48138    /*! \}                                                                 */ 
     
    51141    /*! \{                                                                 */ 
    52142     
    53              PointerSFieldBase(void                          ); 
    54              PointerSFieldBase(Self const             &source); 
    55     explicit PointerSFieldBase(FieldContainerPtrConst  value ); 
     143             PointerSFieldBase(      void               ); 
     144             PointerSFieldBase(const Self        &source); 
     145    explicit PointerSFieldBase(      const_value  value ); 
    56146     
    57147    /*! \}                                                                 */ 
     
    64154    /*! \}                                                                 */ 
    65155    /*---------------------------------------------------------------------*/ 
    66     /*! \name Raw Store Access                                             */ 
     156    /*! \name                      Assign                                  */ 
    67157    /*! \{                                                                 */ 
    68      
    69     StoredTypeRef      editRawStore(void); 
    70     StoredTypeConstRef getRawStore (void) const; 
    71      
    72     /*! \}                                                                 */ 
    73     /*=========================  PROTECTED  ===============================*/ 
    74   protected: 
    75     /*---------------------------------------------------------------------*/ 
    76     /*! \name Members                                                      */ 
    77     /*! \{                                                                 */ 
    78      
    79     StoredType _fieldValue; 
    80      
     158 
     159    void operator =(const Self &source); 
     160 
    81161    /*! \}                                                                 */ 
    82162    /*==========================  PRIVATE  ================================*/ 
     163  
     164    StoredType       &editRawStore(void); 
     165    StoredType const &getRawStore (void) const; 
     166  
    83167  private: 
    84168}; 
     169 
     170typedef PointerSFieldBase FieldContainerPtrSFieldBase; 
    85171 
    86172OSG_END_NAMESPACE