+//=============================================================================
+/*!
+ * AddSubShapeReference
+ */
+//=============================================================================
+void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape)
+{
+ _isDone = false;
+
+ TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+
+ Handle(TDataStd_ExtStringList) aList;
+ if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
+ aList = new TDataStd_ExtStringList;
+ aSubShapesLabel.AddAttribute(aList);
+ }
+
+ TCollection_AsciiString anEntry;
+ TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
+ aList->Append(anEntry);
+
+ _isDone = true;
+}
+
+//=============================================================================
+/*!
+ * RemoveSubShapeReference
+ */
+//=============================================================================
+void GEOM_Function::RemoveSubShapeReference(Handle(GEOM_Function) theSubShape)
+{
+ _isDone = false;
+
+ TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+
+ Handle(TDataStd_ExtStringList) aList;
+ if (aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
+ TCollection_AsciiString anEntry;
+ TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
+ aList->Remove(anEntry);
+ }
+
+ _isDone = true;
+}
+
+//=============================================================================
+/*!
+ * HasSubShapeReferences
+ */
+//=============================================================================
+bool GEOM_Function::HasSubShapeReferences()
+{
+ _isDone = true;
+
+ TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+ return aSubShapesLabel.IsAttribute(TDataStd_ExtStringList::GetID());
+}
+
+//=============================================================================
+/*!
+ * GetSubShapeReferences
+ */
+//=============================================================================
+const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences()
+{
+ _isDone = false;
+
+ TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+
+ Handle(TDataStd_ExtStringList) aList;
+ if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
+ aList = new TDataStd_ExtStringList;
+ aSubShapesLabel.AddAttribute(aList);
+ }
+
+ _isDone = true;
+ return aList->List();
+}
+