00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifdef OSG_DOC_FILES_IN_MODULE
00038
00041 #endif
00042
00043 #include <stdlib.h>
00044 #include <stdio.h>
00045
00046 #include "OSGConfig.h"
00047
00048 #include "OSGNode.h"
00049 #include "OSGNodeCore.h"
00050 #include "OSGBinaryDataHandler.h"
00051
00052 OSG_USING_NAMESPACE
00053
00054 const BitVector
00055 NodeCore::ParentsFieldMask = (1 << NodeCore::ParentsFieldId );
00056
00057 FieldDescription *NodeCore::_desc[] =
00058 {
00059 new FieldDescription(MFNodePtr::getClassType(),
00060 "parents",
00061 OSG_FC_FIELD_IDM_DESC(ParentsField),
00062 true,
00063 (FieldAccessMethod) &NodeCore::getMFParents)
00064 };
00065
00066 FieldContainerType NodeCore::_type("NodeCore",
00067 "AttachmentContainer",
00068 NULL,
00069 NULL,
00070 NULL,
00071 _desc,
00072 sizeof(_desc));
00073
00074
00075 OSG_ABSTR_FIELD_CONTAINER_DEF(NodeCore, NodeCorePtr)
00076
00077 #if defined(OSG_FIXED_MFIELDSYNC)
00078 void NodeCore::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00079 {
00080 _parents.terminateShare(uiAspect, this->getContainerSize());
00081 }
00082 #endif
00083
00084
00085
00086
00087 void NodeCore::dump( UInt32 uiIndent,
00088 const BitVector bvFlags) const
00089 {
00090 UInt32 i;
00091
00092 NodeCorePtr thisP = getPtr();
00093
00094
00095
00096 indentLog(uiIndent, PLOG);
00097
00098 PLOG << "Core"
00099 << "("
00100 << std::dec
00101 << thisP.getFieldContainerId()
00102 << ") : " << getType().getName()
00103 << " "
00104 << _attachmentMap.getValue().size()
00105 << " attachments | "
00106 << this
00107 << std::endl;
00108
00109 indentLog(uiIndent, PLOG);
00110 PLOG << "[" << std::endl;
00111
00112 indentLog(uiIndent + 4, PLOG);
00113 PLOG << "Parents : " << std::endl;
00114
00115 for(i = 0; i < _parents.size(); i++)
00116 {
00117 indentLog(uiIndent + 4, PLOG);
00118 PLOG << " " << i << ") " << &(*(_parents[i])) << std::endl;
00119 }
00120
00121 indentLog(uiIndent, PLOG);
00122 PLOG << "]" << std::endl;
00123
00124 indentLog(uiIndent, PLOG);
00125 PLOG << "{" << std::endl;
00126
00127 Inherited::dump(uiIndent, bvFlags);
00128
00129 indentLog(uiIndent, PLOG);
00130 PLOG << "}" << std::endl;
00131 }
00132
00133
00134
00135
00136 #ifdef __sgi
00137 #pragma set woff 1174
00138 #endif
00139
00140 #ifdef OSG_LINUX_ICC
00141 #pragma warning( disable : 177 )
00142 #endif
00143
00144 namespace
00145 {
00146 static Char8 cvsid_cpp[] = "@(#)$Id: $";
00147 static Char8 cvsid_hpp[] = OSGNODECORE_HEADER_CVSID;
00148 static Char8 cvsid_inl[] = OSGNODECORE_INLINE_CVSID;
00149 }