+//================================================================================
+/*!
+ * Save a pointer to a data holder intended to pass temporary data Driver -> Operation.
+ * This method should be called by Operation to set the data holder.
+ * An instance of GEOM_Function that sets the data holder will remove the
+ * corresponding OCAF attribute at it's destruction
+ */
+//================================================================================
+
+void GEOM_Function::SetCallBackData( void* data )
+{
+ std::ostringstream strm;
+ strm << (long long) data;
+ TCollection_ExtendedString string( strm.str().c_str() );
+
+ TDF_Label aChild = _label.FindChild(CALLBACK_LABEL);
+ TDataStd_Comment::Set(aChild, string);
+
+ _isCallBackData = true; // I will remove TDataStd_Comment at destruction
+}
+
+//================================================================================
+/*!
+ * Returns a pointer to a data holder intended to pass data Driver -> Operation.
+ * This method should be called by Driver to get the data holder to fill it in.
+ * Returns NULL if the Operation have not set the data holder.
+ */
+//================================================================================
+
+void* GEOM_Function::GetCallBackData()
+{
+ Handle(TDataStd_Comment) aComment;
+ TDF_Label aChild = _label.FindChild( CALLBACK_LABEL );
+ if(!aChild.FindAttribute(TDataStd_Comment::GetID(), aComment)) return NULL;
+ TCollection_AsciiString string( aComment->Get() );
+
+ long long address;
+#ifndef WIN32
+ address = atoll ( string.ToCString() );
+#else
+ address = _strtoi64 ( string.ToCString(), NULL, 10 );
+#endif
+
+ return reinterpret_cast<void*> ( address );
+}
+
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient )