Permalink
Browse files

changed: auto add updateData callback to stages so that stagedata can…

… be updated as the stage core changes

       : fc type dump field id and mask with desc
  • Loading branch information...
1 parent 6d0c32c commit 5edbbfc9fbfce2d24a6a8ce0e5d22d85ee892243 @vossg committed May 21, 2012
View
@@ -3,8 +3,8 @@
\mainpage OpenSG - The Open Source Scenegraph
-<b> Warning </b> a lot of the documentation is currently just copied from 1.8 and was
- not updated, hence the concepts will be <b> out of date </b> for now.
+Most of the documentation is currently doxygen generated class documentation.
+Over time we will try to improve on the general concept documentation.
*/
@@ -461,6 +461,9 @@ void FieldContainerType::dump( UInt32 OSG_CHECK_ARG(uiIndent),
for(UInt32 i = 0; i < _vDescVec.size(); i++)
{
- SLOG << "Desc : " << _vDescVec[i]->getCName() << std::endl;
+ FLOG(("Desc : %s | %d | 0x%016"PRIx64"\n",
+ _vDescVec[i]->getCName(),
+ _vDescVec[i]->getFieldId(),
+ _vDescVec[i]->getFieldMask()));
}
}
@@ -189,6 +189,10 @@ class StageHandlerMixin : public TraversalValidationHandlerMixin<ParentT>
/*! \name Type information */
/*! \{ */
+ virtual void dataDestroyed(FieldContainer *pCore,
+ BitVector whichField,
+ UInt32 origin );
+
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Fields */
@@ -245,6 +245,41 @@ void StageHandlerMixin<ParentT>::setData(
_1),
this);
}
+
+ if(pData != NULL)
+ {
+ this->addChangedFunctor(
+ boost::bind(&StageData::updateData,
+ pData,
+ _1,
+ _2,
+ _3),
+ "");
+
+ pData->addChangedFunctor(
+ boost::bind(&Self::dataDestroyed,
+ this,
+ _1,
+ _2,
+ _3),
+ "");
+ }
+ if(pStoredData != NULL)
+ {
+ this->subChangedFunctor(
+ boost::bind(&StageData::updateData,
+ pStoredData,
+ _1,
+ _2,
+ _3));
+
+ pStoredData->subChangedFunctor(
+ boost::bind(&Self::dataDestroyed,
+ this,
+ _1,
+ _2,
+ _3));
+ }
}
}
@@ -282,6 +317,22 @@ StageHandlerMixin<ParentT>::~StageHandlerMixin(void)
{
}
+template <class ParentT> inline
+void StageHandlerMixin<ParentT>::dataDestroyed(FieldContainer *pCore,
+ BitVector whichField,
+ UInt32 origin )
+{
+ if(whichField == 0x0000)
+ {
+ this->subChangedFunctor(
+ boost::bind(&StageData::updateData,
+ pCore,
+ _1,
+ _2,
+ _3));
+ }
+}
+
template <class ParentT> inline
void StageHandlerMixin<ParentT>::dump( UInt32 uiIndent,
const BitVector bvFlags ) const
@@ -111,4 +111,10 @@ void StageData::dump( UInt32 ,
SLOG << "Dump StageData NI" << std::endl;
}
+void StageData::updateData(FieldContainer *pCore,
+ BitVector whichField,
+ UInt32 origin )
+{
+}
+
OSG_END_NAMESPACE
@@ -113,6 +113,15 @@ class OSG_GROUP_DLLMAPPING StageData : public StageDataBase
/*! \name Init */
/*! \{ */
+ virtual void updateData(FieldContainer *pCore,
+ BitVector whichField,
+ UInt32 origin );
+
+ /*! \} */
+ /*---------------------------------------------------------------------*/
+ /*! \name Init */
+ /*! \{ */
+
static void initMethod(InitPhase ePhase);
/*! \} */

0 comments on commit 5edbbfc

Please sign in to comment.