Hi,

an updated version of the patch is attached, which makes the following
changes:

* Implement TypeFactoryBase::initializePendingElements and call it from
TypeFactoryBase::initializeFactoryPost(). It can not be called from
TypeFactoryBase::initialize because this screws up the
FieldContainerFactory. See below for some more details.

* Make TypeFactoryBase a friend of TypeBase to allow calling initialize()

* Add a anonymous namespace to OSGTypeInst.cpp with DataType objects for
"abstract" type objects ("TypeRoot", BaseType", "IntegralType", "Field").

* Add the files
 - OSGFieldContainerAttachmentFields.h,
 - OSGFieldContainerAttachmentSFields.h,
 - OSGFieldContainerAttachmentsMFields.h
 - OSGAttachmentContainerFields.h
 - OSGAttachmentContainerSFields.h
 - OSGAttachmentContainerMFields.h
 To introduce fields of the respective (ptr) types to the system.

* Add the types to OSGContainerTypeInst.cpp and fix the base types of
some of the exising ones.

The first two points are more or less a hack. Conceptually the problem
seems to be that the FieldContainerFactory does the initialization of
FieldContainer types itself, instead of letting the TypeFactory do the
work. I think the proper fix is to move the "pending type" handling from
the FieldContainerFactory into the TypeFactory.

        Cheers,
                Carsten

PS: Can the trac site handle huge images/image maps ? Gerrit built a
neat feature into the TypeFactory that allows it to write a .dot file
for graphviz with the inheritance hierarchy of all types in the system
(as seen by the type system). It could be used for a fast navigation
inside/into the docs maybe ?
Index: Source/System/NodeCores/Drawables/Particles/OSGParticleBSP.cpp
===================================================================
--- Source/System/NodeCores/Drawables/Particles/OSGParticleBSP.cpp	(revision 546)
+++ Source/System/NodeCores/Drawables/Particles/OSGParticleBSP.cpp	(working copy)
@@ -522,7 +522,7 @@
 /*-------------------------- field instantiations -------------------------*/
 
 DataType FieldTraits<ParticleBSPTree>::_type("ParticleBSPTree", 
-                                             "None");
+                                             "TypeRoot");
 
 OSG_FIELDTRAITS_GETTYPE(ParticleBSPTree)
 
Index: Source/System/Image/OSGImageGenericAtt.cpp
===================================================================
--- Source/System/Image/OSGImageGenericAtt.cpp	(revision 546)
+++ Source/System/Image/OSGImageGenericAtt.cpp	(working copy)
@@ -72,7 +72,7 @@
 OSG_BEGIN_NAMESPACE
 
 DataType FieldTraits<ImageGenericAttPtr>::_type("ImageGenericAttPtr",
-                                                "AttachmentPtr"     );
+                                                "FieldContainerAttachmentPtr");
 
 OSG_FIELD_DLLEXPORT_DEF1(SField, ImageGenericAttPtr);
 OSG_FIELD_DLLEXPORT_DEF1(MField, ImageGenericAttPtr);
Index: Source/System/FieldContainer/Fields/OSGFieldContainerFieldTraits.h
===================================================================
--- Source/System/FieldContainer/Fields/OSGFieldContainerFieldTraits.h	(revision 546)
+++ Source/System/FieldContainer/Fields/OSGFieldContainerFieldTraits.h	(working copy)
@@ -282,7 +282,7 @@
 typedef PointerFwdBuilder<
     FieldContainerPtr, 
     FieldContainerConstPtr,
-    FieldContainerAttachment>::ObjPtr      FieldContainerAttachmentChunkPtr;
+    FieldContainerAttachment>::ObjPtr      FieldContainerAttachmentPtr;
 
 typedef PointerFwdBuilder<
     FieldContainerPtr, 
Index: Source/System/FieldContainer/Fields/Wrapper/OSGFieldContainerAttachmentFields.h
===================================================================
--- Source/System/FieldContainer/Fields/Wrapper/OSGFieldContainerAttachmentFields.h	(revision 546)
+++ Source/System/FieldContainer/Fields/Wrapper/OSGFieldContainerAttachmentFields.h	(working copy)
@@ -41,6 +41,6 @@
    field type header. 
 */
 
-#include "OSGFieldContainerSFields.h"
-#include "OSGFieldContainerMFields.h"
+#include "OSGFieldContainerAttachmentSFields.h"
+#include "OSGFieldContainerAttachmentMFields.h"
 
Index: Source/System/FieldContainer/Fields/OSGAttachmentContainerFieldTraits.h
===================================================================
--- Source/System/FieldContainer/Fields/OSGAttachmentContainerFieldTraits.h	(revision 0)
+++ Source/System/FieldContainer/Fields/OSGAttachmentContainerFieldTraits.h	(revision 0)
@@ -0,0 +1,103 @@
+/*---------------------------------------------------------------------------*\
+ *                                OpenSG                                     *
+ *                                                                           *
+ *                                                                           *
+ *                   Copyright (C) 2007 by the OpenSG Forum                  *
+ *                                                                           *
+ *                            www.opensg.org                                 *
+ *                                                                           *
+ *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                License                                    *
+ *                                                                           *
+ * This library is free software; you can redistribute it and/or modify it   *
+ * under the terms of the GNU Library General Public License as published    *
+ * by the Free Software Foundation, version 2.                               *
+ *                                                                           *
+ * This library is distributed in the hope that it will be useful, but       *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of                *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+ * Library General Public License for more details.                          *
+ *                                                                           *
+ * You should have received a copy of the GNU Library General Public         *
+ * License along with this library; if not, write to the Free Software       *
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                Changes                                    *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OSGATTACHMENTCONTAINERFIELDTRAITS_H_
+#define _OSGATTACHMENTCONTAINERFIELDTRAITS_H_
+#ifdef __sgi
+#pragma once
+#endif
+
+#include "OSGFieldContainerFieldTraits.h"
+#include "OSGDataType.h"
+
+#include "OSGContainerForwards.h"
+
+OSG_BEGIN_NAMESPACE
+
+#if !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
+
+#ifdef OSG_DOC_FILES_IN_MODULE
+/*! \file 
+    \ingroup 
+    \ingroup 
+*/
+#endif
+
+/*! \ingroup 
+ */
+#if !defined(OSG_DOC_DEV_TRAITS)
+/*! \hideinhierarchy */
+#endif
+
+template <>
+struct FieldTraits<AttachmentContainerPtr>
+    : public FieldTraitsFCPtrBase<AttachmentContainerPtr>
+{
+    static  DataType                            _type;
+    typedef FieldTraits<AttachmentContainerPtr>  Self;
+
+
+    enum             { Convertible = Self::NotConvertible              };
+
+    static       DataType &getType      (void)
+    {
+        return _type;
+    }
+
+    static const Char8    *getSName     (void)
+    {
+        return "SFAttachmentContainerPtr";
+    }
+
+    static const Char8    *getMName     (void)
+    {
+        return "MFAttachmentContainerPtr";
+    }
+};
+
+#if !defined(OSG_DOC_DEV_TRAITS)
+/*! \class  FieldTraitsTemplateBase<AttachmentContainerPtr>
+    \hideinhierarchy
+ */
+#endif
+
+#endif // !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
+
+OSG_END_NAMESPACE
+
+#endif /* _OSGATTACHMENTCONTAINERFIELDTRAITS_H_ */

Property changes on: Source/System/FieldContainer/Fields/OSGAttachmentContainerFieldTraits.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Index: Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentFieldTraits.h
===================================================================
--- Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentFieldTraits.h	(revision 0)
+++ Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentFieldTraits.h	(revision 0)
@@ -0,0 +1,103 @@
+/*---------------------------------------------------------------------------*\
+ *                                OpenSG                                     *
+ *                                                                           *
+ *                                                                           *
+ *                   Copyright (C) 2007 by the OpenSG Forum                  *
+ *                                                                           *
+ *                            www.opensg.org                                 *
+ *                                                                           *
+ *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                License                                    *
+ *                                                                           *
+ * This library is free software; you can redistribute it and/or modify it   *
+ * under the terms of the GNU Library General Public License as published    *
+ * by the Free Software Foundation, version 2.                               *
+ *                                                                           *
+ * This library is distributed in the hope that it will be useful, but       *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of                *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+ * Library General Public License for more details.                          *
+ *                                                                           *
+ * You should have received a copy of the GNU Library General Public         *
+ * License along with this library; if not, write to the Free Software       *
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                Changes                                    *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OSGFIELDCONTAINERATTACHMENTFIELDTRAITS_H_
+#define _OSGFIELDCONTAINERATTACHMENTFIELDTRAITS_H_
+#ifdef __sgi
+#pragma once
+#endif
+
+#include "OSGFieldContainerFieldTraits.h"
+#include "OSGDataType.h"
+
+#include "OSGContainerForwards.h"
+
+OSG_BEGIN_NAMESPACE
+
+#if !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
+
+#ifdef OSG_DOC_FILES_IN_MODULE
+/*! \file 
+    \ingroup 
+    \ingroup 
+*/
+#endif
+
+/*! \ingroup 
+ */
+#if !defined(OSG_DOC_DEV_TRAITS)
+/*! \hideinhierarchy */
+#endif
+
+template <>
+struct FieldTraits<FieldContainerAttachmentPtr>
+    : public FieldTraitsFCPtrBase<FieldContainerAttachmentPtr>
+{
+    static  DataType                                  _type;
+    typedef FieldTraits<FieldContainerAttachmentPtr>  Self;
+
+
+    enum             { Convertible = Self::NotConvertible              };
+
+    static       DataType &getType      (void)
+    {
+        return _type;
+    }
+
+    static const Char8    *getSName     (void)
+    {
+        return "SFFieldContainerAttachmentPtr";
+    }
+
+    static const Char8    *getMName     (void)
+    {
+        return "MFFieldContainerAttachmentPtr";
+    }
+};
+
+#if !defined(OSG_DOC_DEV_TRAITS)
+/*! \class  FieldTraitsTemplateBase<FieldContainerAttachmentPtr>
+    \hideinhierarchy
+ */
+#endif
+
+#endif // !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
+
+OSG_END_NAMESPACE
+
+#endif /* _OSGFIELDCONTAINERATTACHMENTFIELDTRAITS_H_ */

Property changes on: Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentFieldTraits.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Index: Source/System/FieldContainer/Fields/OSGAttachmentContainerMFields.h
===================================================================
--- Source/System/FieldContainer/Fields/OSGAttachmentContainerMFields.h	(revision 0)
+++ Source/System/FieldContainer/Fields/OSGAttachmentContainerMFields.h	(revision 0)
@@ -0,0 +1,72 @@
+/*---------------------------------------------------------------------------*\
+ *                                OpenSG                                     *
+ *                                                                           *
+ *                                                                           *
+ *                   Copyright (C) 2007 by the OpenSG Forum                  *
+ *                                                                           *
+ *                            www.opensg.org                                 *
+ *                                                                           *
+ *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                License                                    *
+ *                                                                           *
+ * This library is free software; you can redistribute it and/or modify it   *
+ * under the terms of the GNU Library General Public License as published    *
+ * by the Free Software Foundation, version 2.                               *
+ *                                                                           *
+ * This library is distributed in the hope that it will be useful, but       *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of                *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+ * Library General Public License for more details.                          *
+ *                                                                           *
+ * You should have received a copy of the GNU Library General Public         *
+ * License along with this library; if not, write to the Free Software       *
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                Changes                                    *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OSGATTACHMENTCONTAINERMFIELDS_H_
+#define _OSGATTACHMENTCONTAINERMFIELDS_H_
+#ifdef __sgi
+#pragma once
+#endif
+
+#include "OSGMField.h"
+#include "OSGMFieldAdaptor.h"
+#include "OSGAttachmentContainerFieldTraits.h"
+#include "OSGFieldContainerMFields.h"
+
+OSG_BEGIN_NAMESPACE
+
+#if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
+/*! \ingroup  */
+
+typedef MFieldAdaptor   <AttachmentContainerPtr,
+                         MFFieldContainerPtr     >
+    MFAttachmentContainerPtr;
+
+#ifdef FDFOO
+typedef FieldDescription<AttachmentContainerPtr,
+                         MultiField              >
+    MAttachmentContainerPtrFieldDescription;
+#endif
+#endif
+
+#ifndef OSG_COMPILECONTAINERFIELDINST
+OSG_FIELD_DLLEXPORT_DECL1(MField, AttachmentContainerPtr, OSG_SYSTEM_DLLTMPLMAPPING)
+#endif
+
+OSG_END_NAMESPACE
+
+#endif /* _OSGATTACHMENTCONTAINERMFIELDS_H_ */

Property changes on: Source/System/FieldContainer/Fields/OSGAttachmentContainerMFields.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Index: Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentMFields.h
===================================================================
--- Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentMFields.h	(revision 0)
+++ Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentMFields.h	(revision 0)
@@ -0,0 +1,72 @@
+/*---------------------------------------------------------------------------*\
+ *                                OpenSG                                     *
+ *                                                                           *
+ *                                                                           *
+ *                   Copyright (C) 2007 by the OpenSG Forum                  *
+ *                                                                           *
+ *                            www.opensg.org                                 *
+ *                                                                           *
+ *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                License                                    *
+ *                                                                           *
+ * This library is free software; you can redistribute it and/or modify it   *
+ * under the terms of the GNU Library General Public License as published    *
+ * by the Free Software Foundation, version 2.                               *
+ *                                                                           *
+ * This library is distributed in the hope that it will be useful, but       *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of                *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+ * Library General Public License for more details.                          *
+ *                                                                           *
+ * You should have received a copy of the GNU Library General Public         *
+ * License along with this library; if not, write to the Free Software       *
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                Changes                                    *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OSGFIELDCONTAINERATTACHMENTMFIELDS_H_
+#define _OSGFIELDCONTAINERATTACHMENTMFIELDS_H_
+#ifdef __sgi
+#pragma once
+#endif
+
+#include "OSGMField.h"
+#include "OSGMFieldAdaptor.h"
+#include "OSGFieldContainerAttachmentFieldTraits.h"
+#include "OSGFieldContainerMFields.h"
+
+OSG_BEGIN_NAMESPACE
+
+#if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
+/*! \ingroup  */
+
+typedef MFieldAdaptor   <FieldContainerAttachmentPtr,
+                         MFFieldContainerPtr                  >
+    MFFieldContainerAttachmentPtr;
+
+#ifdef FDFOO
+typedef FieldDescription<FieldContainerAttachmentPtrFieldDesc,
+                         MultiField                           >
+    MFieldContainerAttachmentPtrFieldDescription;
+#endif
+#endif
+
+#ifndef OSG_COMPILECONTAINERFIELDINST
+OSG_FIELD_DLLEXPORT_DECL1(MField, FieldContainerAttachmentPtr, OSG_SYSTEM_DLLTMPLMAPPING)
+#endif
+
+OSG_END_NAMESPACE
+
+#endif /* _OSGFIELDCONTAINERATTACHMENTMFIELDS_H_ */

Property changes on: Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentMFields.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Index: Source/System/FieldContainer/Fields/OSGAttachmentContainerSFields.h
===================================================================
--- Source/System/FieldContainer/Fields/OSGAttachmentContainerSFields.h	(revision 0)
+++ Source/System/FieldContainer/Fields/OSGAttachmentContainerSFields.h	(revision 0)
@@ -0,0 +1,73 @@
+/*---------------------------------------------------------------------------*\
+ *                                OpenSG                                     *
+ *                                                                           *
+ *                                                                           *
+ *                   Copyright (C) 2007 by the OpenSG Forum                  *
+ *                                                                           *
+ *                            www.opensg.org                                 *
+ *                                                                           *
+ *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                License                                    *
+ *                                                                           *
+ * This library is free software; you can redistribute it and/or modify it   *
+ * under the terms of the GNU Library General Public License as published    *
+ * by the Free Software Foundation, version 2.                               *
+ *                                                                           *
+ * This library is distributed in the hope that it will be useful, but       *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of                *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+ * Library General Public License for more details.                          *
+ *                                                                           *
+ * You should have received a copy of the GNU Library General Public         *
+ * License along with this library; if not, write to the Free Software       *
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                Changes                                    *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OSGATTACHMENTCONTAINERSFIELDS_H_
+#define _OSGATTACHMENTCONTAINERSFIELDS_H_
+#ifdef __sgi
+#pragma once
+#endif
+
+#include "OSGSField.h"
+#include "OSGSFieldAdaptor.h"
+#include "OSGAttachmentContainerFieldTraits.h"
+#include "OSGFieldContainerSFields.h"
+
+OSG_BEGIN_NAMESPACE
+
+#if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
+/*! \ingroup  */
+
+typedef SFieldAdaptor   <AttachmentContainerPtr,
+                         SFFieldContainerPtr    >
+    SFAttachmentContainerPtr;
+
+#ifdef FDFOO
+typedef FieldDescription<AttachmentContainerPtr,
+                         SingleField            >
+    SAttachmentContainerPtrFieldDescription;
+#endif
+#endif
+
+#ifndef OSG_COMPILECONTAINERFIELDINST
+OSG_FIELD_DLLEXPORT_DECL1(SField, AttachmentContainerPtr, OSG_SYSTEM_DLLTMPLMAPPING)
+#endif
+
+
+OSG_END_NAMESPACE
+
+#endif /* _OSGATTACHMENTCONTAINERSFIELDS_H_ */

Property changes on: Source/System/FieldContainer/Fields/OSGAttachmentContainerSFields.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Index: Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentSFields.h
===================================================================
--- Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentSFields.h	(revision 0)
+++ Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentSFields.h	(revision 0)
@@ -0,0 +1,72 @@
+/*---------------------------------------------------------------------------*\
+ *                                OpenSG                                     *
+ *                                                                           *
+ *                                                                           *
+ *                   Copyright (C) 2007 by the OpenSG Forum                  *
+ *                                                                           *
+ *                            www.opensg.org                                 *
+ *                                                                           *
+ *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                License                                    *
+ *                                                                           *
+ * This library is free software; you can redistribute it and/or modify it   *
+ * under the terms of the GNU Library General Public License as published    *
+ * by the Free Software Foundation, version 2.                               *
+ *                                                                           *
+ * This library is distributed in the hope that it will be useful, but       *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of                *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
+ * Library General Public License for more details.                          *
+ *                                                                           *
+ * You should have received a copy of the GNU Library General Public         *
+ * License along with this library; if not, write to the Free Software       *
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*\
+ *                                Changes                                    *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+ *                                                                           *
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OSGFIELDCONTAINERATTACHMENTSFIELDS_H_
+#define _OSGFIELDCONTAINERATTACHMENTSFIELDS_H_
+#ifdef __sgi
+#pragma once
+#endif
+
+#include "OSGSField.h"
+#include "OSGSFieldAdaptor.h"
+#include "OSGFieldContainerAttachmentFieldTraits.h"
+#include "OSGFieldContainerSFields.h"
+
+OSG_BEGIN_NAMESPACE
+
+#if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
+/*! \ingroup  */
+
+typedef SFieldAdaptor   <FieldContainerAttachmentPtr,
+                         SFFieldContainerPtr                  >
+    SFFieldContainerAttachmentPtr;
+
+#ifdef FDFOO
+typedef FieldDescription<FieldContainerAttachmentPtrFieldDesc,
+                         SingleField                          >
+    SFieldContainerAttachmentPtrFieldDescription;
+#endif
+#endif
+
+#ifndef OSG_COMPILECONTAINERFIELDINST
+OSG_FIELD_DLLEXPORT_DECL1(SField, FieldContainerAttachmentPtr, OSG_SYSTEM_DLLTMPLMAPPING)
+#endif
+
+OSG_END_NAMESPACE
+
+#endif /* _OSGFIELDCONTAINERATTACHMENTSFIELDS_H_ */

Property changes on: Source/System/FieldContainer/Fields/OSGFieldContainerAttachmentSFields.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Index: Source/System/FieldContainer/Fields/OSGContainerTypeInst.cpp
===================================================================
--- Source/System/FieldContainer/Fields/OSGContainerTypeInst.cpp	(revision 546)
+++ Source/System/FieldContainer/Fields/OSGContainerTypeInst.cpp	(working copy)
@@ -57,6 +57,12 @@
 #include "OSGFieldContainerSFields.h"
 #include "OSGFieldContainerMFields.h"
 
+#include "OSGFieldContainerAttachmentSFields.h"
+#include "OSGFieldContainerAttachmentMFields.h"
+
+#include "OSGAttachmentContainerSFields.h"
+#include "OSGAttachmentContainerMFields.h"
+
 #include "OSGNodeSFields.h"
 #include "OSGNodeMFields.h"
 
@@ -82,13 +88,21 @@
     "ParentFieldContainerPtr",
     NULL);
 
+DataType FieldTraits<FieldContainerAttachmentPtr>::_type(
+    "FieldContainerAttachmentPtr",
+    "FieldContainerPtr");
+
+DataType FieldTraits<AttachmentContainerPtr     >::_type(
+    "AttachmentContainerPtr",
+    "FieldContainerPtr");
+
 DataType FieldTraits<NodeCorePtr                >::_type(
     "NodeCorePtr",
-    "FieldContainerPtr");
+    "AttachmentContainerPtr");
 
 DataType FieldTraits<NodePtr                    >::_type(
     "NodePtr",
-    "FieldContainerPtr");
+    "AttachmentContainerPtr");
 
 DataType FieldTraits<ParentNodePtr,            1>::_type(
     "ParentNodePtr",
@@ -109,7 +123,7 @@
 OSG_FIELDTRAITS_GETTYPE   (FieldContainerPtr          )
 OSG_FIELDTRAITS_GETTYPE_NS(ParentFieldContainerPtr,  1)
 
-#endif //!defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
+#endif // !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
 
 OSG_FIELD_DLLEXPORT_DEF1(SField, FieldContainerPtr);
 OSG_FIELD_DLLEXPORT_DEF1(MField, FieldContainerPtr);
@@ -117,6 +131,9 @@
 OSG_FIELD_DLLEXPORT_DEF2(SField, ParentFieldContainerPtr, 1);
 OSG_FIELD_DLLEXPORT_DEF2(MField, ParentFieldContainerPtr, 1);
 
+OSG_FIELD_DLLEXPORT_DEF2(SFieldAdaptor, FieldContainerAttachmentPtr, SFFieldContainerPtr);
+OSG_FIELD_DLLEXPORT_DEF2(MFieldAdaptor, FieldContainerAttachmentPtr, MFFieldContainerPtr);
+
 OSG_FIELD_DLLEXPORT_DEF2(SFieldAdaptor, NodeCorePtr, SFFieldContainerPtr);
 OSG_FIELD_DLLEXPORT_DEF2(MFieldAdaptor, NodeCorePtr, MFFieldContainerPtr);
 
Index: Source/System/FieldContainer/Base/OSGFieldContainerAttachment.h
===================================================================
--- Source/System/FieldContainer/Base/OSGFieldContainerAttachment.h	(revision 546)
+++ Source/System/FieldContainer/Base/OSGFieldContainerAttachment.h	(working copy)
@@ -45,7 +45,7 @@
 #include "OSGFieldContainer.h"
 #include "OSGAttachmentMixin.h"
 #include "OSGContainerMixinHead.h"
-#include "OSGFieldContainerFields.h"
+#include "OSGFieldContainerAttachmentFields.h"
 
 OSG_BEGIN_NAMESPACE
 
Index: Source/System/Statistics/Base/OSGStatCollector.cpp
===================================================================
--- Source/System/Statistics/Base/OSGStatCollector.cpp	(revision 546)
+++ Source/System/Statistics/Base/OSGStatCollector.cpp	(working copy)
@@ -339,7 +339,7 @@
 /*-------------------------- field instantiations -------------------------*/
 
 DataType FieldTraits<StatCollector>::_type("StatCollector",
-                                           "None");
+                                           "TypeRoot");
 
 #endif
 
Index: Source/Base/Field/OSGTypeInst.cpp
===================================================================
--- Source/Base/Field/OSGTypeInst.cpp	(revision 546)
+++ Source/Base/Field/OSGTypeInst.cpp	(working copy)
@@ -72,6 +72,17 @@
 
 #if !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
 
+namespace
+{
+    // Type objects for "abstract" types in the type hierarchy.
+    // These types do not correspond with any real types, but are used to
+    // group the concrete types.
+    DataType typeObjTypeRoot    ("TypeRoot",     NULL      );
+    DataType typeObjBaseType    ("BaseType",     "TypeRoot");
+    DataType typeObjIntegralType("IntegralType", "TypeRoot");
+    DataType typeObjField       ("Field",        "TypeRoot");
+}
+
 DataType FieldTraits<bool,      2 >::_type("bool"  ,       "IntegralType");
 DataType FieldTraits< Int8        >::_type("Int8"  ,       "IntegralType");
 DataType FieldTraits<UInt8        >::_type("UInt8" ,       "IntegralType");
Index: Source/Base/Base/OSGTypeBase.h
===================================================================
--- Source/Base/Base/OSGTypeBase.h	(revision 546)
+++ Source/Base/Base/OSGTypeBase.h	(working copy)
@@ -55,6 +55,8 @@
 //  Forward References
 //---------------------------------------------------------------------------
 
+class TypeFactoryBase;
+
 //---------------------------------------------------------------------------
 //   Types
 //---------------------------------------------------------------------------
@@ -103,6 +105,8 @@
     //   friend classes
     //-----------------------------------------------------------------------
 
+    friend class OSG::TypeFactoryBase;
+
     //-----------------------------------------------------------------------
     //   friend functions
     //-----------------------------------------------------------------------
Index: Source/Base/Base/OSGTypeFactory.cpp
===================================================================
--- Source/Base/Base/OSGTypeFactory.cpp	(revision 546)
+++ Source/Base/Base/OSGTypeFactory.cpp	(working copy)
@@ -95,9 +95,10 @@
 void TypeFactoryBase::writeTypeDot(FILE     *pOut,
                                    TypeBase *pTypeBase)
 {
-    fprintf(pOut, "    OpenSG%s [shape=record,label=\"%s\"]\n", 
+    fprintf(pOut, "    OpenSG%s [shape=record,label=\"%s - %s\"]\n", 
             pTypeBase->getCName(),
-            pTypeBase->getCName());
+            pTypeBase->getCName(),
+            pTypeBase->isInitialized() ? "Init" : "UnInit");
 
     if(pTypeBase->getCParentName() != NULL)
     {
@@ -163,7 +164,7 @@
 
 bool TypeFactoryBase::initializeFactoryPost(void)
 {
-    return true;
+    return this->initializePendingElements();
 }
 
 bool TypeFactoryBase::terminate(void)
@@ -178,6 +179,24 @@
     return true;
 }
 
+bool
+TypeFactoryBase::initializePendingElements(void)
+{
+    bool        returnValue = true;
+    TypeStoreIt typeIt      = _vTypeStore.begin();
+    TypeStoreIt typeEnd     = _vTypeStore.end  ();
+
+    for(; (typeIt != typeEnd) && (returnValue == true); ++typeIt)
+    {
+        if((*typeIt != 0) && ((*typeIt)->isInitialized() == false))
+        {
+            returnValue = (*typeIt)->initialize();
+        }
+    }
+
+    return returnValue;
+}
+
 bool TypeFactoryBase::onLoadInitialize(void)
 {
     return true;
@@ -313,7 +332,7 @@
  */
 
     fprintf(pOut, "    rankdir=LR;\n");
-    fprintf(pOut, "    size=\"8,60\";\n");
+    fprintf(pOut, "    size=\"120,200\";\n");
     fprintf(pOut, "    page=\"8.2677,11.69\";\n");
     fprintf(pOut, "    radio=auto;\n");
 
Index: Source/Base/Base/OSGTypeFactory.h
===================================================================
--- Source/Base/Base/OSGTypeFactory.h	(revision 546)
+++ Source/Base/Base/OSGTypeFactory.h	(working copy)
@@ -193,6 +193,8 @@
     virtual bool initialize           (void);
     virtual bool terminate            (void);
 
+    virtual bool initializePendingElements(void);
+
     virtual bool onLoadInitialize     (void);
 
     virtual bool initializeFactoryPost(void);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to