Back to index

salome-geom  6.5.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
GEOM_Function Class Reference

#include <GEOM_Function.hxx>

List of all members.

Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const
Standard_EXPORT Standard_Boolean IsKind (const Handle(Standard_Type)&AType) const
Standard_EXPORT GEOM_Function (const TDF_Label &theEntry, const Standard_GUID &theGUID, int theType)
 Constructor:
Standard_EXPORT ~GEOM_Function ()
Standard_EXPORT TDF_Label GetOwnerEntry ()
 GetOwner.
Standard_EXPORT TopoDS_Shape GetValue ()
 GetValue.
Standard_EXPORT void SetValue (TopoDS_Shape &theShape)
 SetValue.
Standard_EXPORT TDF_Label & GetEntry ()
Standard_EXPORT int GetType ()
 GetType.
Standard_EXPORT Standard_GUID GetDriverGUID ()
 GetDriverGUID.
Standard_EXPORT
TCollection_AsciiString 
GetDescription ()
 GetDescription.
Standard_EXPORT void SetDescription (const TCollection_AsciiString &theDescription)
 SetDescription.
Standard_EXPORT void SetReal (int thePosition, double theValue)
 SetReal.
Standard_EXPORT double GetReal (int thePosition)
 GetReal.
Standard_EXPORT void SetRealArray (int thePosition, const Handle(TColStd_HArray1OfReal)&theArray)
 SetRealArray.
Standard_EXPORT Handle (TColStd_HArray1OfReal) GetRealArray(int thePosition)
Standard_EXPORT void SetInteger (int thePosition, int theValue)
 SetInteger.
Standard_EXPORT int GetInteger (int thePosition)
 GetInteger.
Standard_EXPORT void SetIntegerArray (int thePosition, const Handle(TColStd_HArray1OfInteger)&theArray)
 SetIntegerArray.
Standard_EXPORT Handle (TColStd_HArray1OfInteger) GetIntegerArray(int thePosition)
Standard_EXPORT void SetReference (int thePosition, Handle(GEOM_Function) theReference)
 SetReference.
Standard_EXPORT void SetString (int thePosition, const TCollection_AsciiString &theValue)
 SetString.
Standard_EXPORT
TCollection_AsciiString 
GetString (int thePosition)
 GetString.
Standard_EXPORT Handle (GEOM_Function) GetReference(int thePosition)
Standard_EXPORT void SetStringArray (int thePosition, const Handle(TColStd_HArray1OfExtendedString)&theArray)
 SetStringArray.
Standard_EXPORT Handle (TColStd_HArray1OfExtendedString) GetStringArray(int thePosition)
Standard_EXPORT void SetReferenceList (int thePosition, const Handle(TColStd_HSequenceOfTransient)&theRefList)
 SetReferenceList.
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetReferenceList(int thePosition)
Standard_EXPORT bool IsDone ()
Standard_EXPORT void GetDependency (TDF_LabelSequence &theSeq)
 SetShape.
Standard_EXPORT void AddSubShapeReference (Handle(GEOM_Function) theSubShape)
 AddSubShapeReference.
Standard_EXPORT void RemoveSubShapeReference (Handle(GEOM_Function) theSubShape)
 RemoveSubShapeReference.
Standard_EXPORT bool HasSubShapeReferences ()
 HasSubShapeReferences.
Standard_EXPORT const
TDataStd_ListOfExtendedString & 
GetSubShapeReferences ()
 GetSubShapeReferences.
Standard_EXPORT TDF_Label GetHistoryEntry (const Standard_Boolean create=Standard_True)
 GetHistoryEntry.
Standard_EXPORT TDF_Label GetArgumentHistoryEntry (const TDF_Label &theArgumentRefEntry, const Standard_Boolean create=Standard_True)
 GetArgumentHistoryEntry.
Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create=Standard_True)
 GetNamingEntry.

Static Public Member Functions

static Standard_EXPORT const
Standard_GUID & 
GetFunctionTreeID ()
static Standard_EXPORT const
Standard_GUID & 
GetDependencyID ()
static Standard_EXPORT Handle (GEOM_Function) GetFunction(const TDF_Label &theEntry)
static Standard_EXPORT const
Standard_GUID & 
GetReferencesTreeID ()

Private Member Functions

 GEOM_Function (const TDF_Label &theEntry)

Private Attributes

TDF_Label _label
bool _isDone

Friends

Standard_EXPORT friend
Handle_Standard_Type & 
GEOM_Function_Type_ ()

Detailed Description

Definition at line 123 of file GEOM_Function.hxx.


Constructor & Destructor Documentation

GEOM_Function::GEOM_Function ( const TDF_Label &  theEntry) [inline, private]

Definition at line 151 of file GEOM_Function.hxx.

{ _label = theEntry; }
GEOM_Function::GEOM_Function ( const TDF_Label &  theEntry,
const Standard_GUID &  theGUID,
int  theType 
)

Constructor:

Definition at line 124 of file GEOM_Function.cxx.

: _label(theEntry)
{
  TFunction_Function::Set(theEntry, theGUID);
  TDataStd_Integer::Set(theEntry, theType);

  //Add function to a function tree
  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theEntry.Data());
  Handle(TDataStd_TreeNode) aRoot, aNode;
  if(!aDoc->Main().FindAttribute(GetFunctionTreeID(), aRoot))
    aRoot = TDataStd_TreeNode::Set(aDoc->Main(), GetFunctionTreeID());

  aNode = TDataStd_TreeNode::Set(theEntry, GetFunctionTreeID());
  aRoot->Append(aNode);
}

Here is the call graph for this function:

Definition at line 166 of file GEOM_Function.hxx.

{;}

Member Function Documentation

AddSubShapeReference.

Definition at line 707 of file GEOM_Function.cxx.

{
  _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;
}

Here is the call graph for this function:

TDF_Label GEOM_Function::GetArgumentHistoryEntry ( const TDF_Label &  theArgumentRefEntry,
const Standard_Boolean  create = Standard_True 
)

GetArgumentHistoryEntry.

Definition at line 796 of file GEOM_Function.cxx.

{
  TColStd_ListOfInteger anArgumentRefTags;
  TDF_Tool::TagList(theArgumentRefEntry, anArgumentRefTags);
  Standard_Integer anArgumentRefLabelPos = anArgumentRefTags.Extent();

  TDF_Label aHistoryLabel = GetHistoryEntry(create);
  if (aHistoryLabel.IsNull())
    return aHistoryLabel;
  Standard_Integer aHistoryLabelPos = aHistoryLabel.Depth() + 1;

  Standard_Integer itag;
  TDF_Label aHistoryCurLabel = aHistoryLabel;
  TColStd_ListIteratorOfListOfInteger aListIter (anArgumentRefTags);
  for (itag = 1; itag <= aHistoryLabelPos; itag++) {
    aListIter.Next();
  }
  for (; itag <= anArgumentRefLabelPos; itag++) {
    aHistoryCurLabel = aHistoryCurLabel.FindChild(aListIter.Value(), create);
    if (aHistoryCurLabel.IsNull())
      return aHistoryCurLabel;
    aListIter.Next();
  }

  return aHistoryCurLabel;
}

Here is the call graph for this function:

void GEOM_Function::GetDependency ( TDF_LabelSequence &  theSeq)

SetShape.

GetShape

GetDependency

Definition at line 694 of file GEOM_Function.cxx.

{
  TDF_ChildIterator anIterator(ARGUMENTS, Standard_True);
  for(; anIterator.More(); anIterator.Next()) {
    if(anIterator.Value().IsAttribute(GetDependencyID())) theSeq.Append(anIterator.Value());
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

const Standard_GUID & GEOM_Function::GetDependencyID ( ) [static]

Definition at line 101 of file GEOM_Function.cxx.

{
  static Standard_GUID aDependencyID("E2620650-2354-41bd-8C2C-210CFCD00948");
  return aDependencyID;
}

Here is the caller graph for this function:

TCollection_AsciiString GEOM_Function::GetDescription ( )

GetDescription.

Definition at line 311 of file GEOM_Function.cxx.

{
  Handle(TDataStd_Comment) aComment;
  TDF_Label aChild = _label.FindChild(DESCRIPTION_LABEL);
  if(!aChild.FindAttribute(TDataStd_Comment::GetID(), aComment)) return TCollection_AsciiString();
  TCollection_AsciiString aDescr(aComment->Get());
  return aDescr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_GUID GEOM_Function::GetDriverGUID ( )

GetDriverGUID.

Definition at line 296 of file GEOM_Function.cxx.

{
  Handle(TFunction_Function) aFunction;
  if(!_label.FindAttribute(TFunction_Function::GetID(), aFunction)) {
    return TDF::LowestID();
  }

  return aFunction->GetDriverGUID();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_EXPORT TDF_Label& GEOM_Function::GetEntry ( ) [inline]

Definition at line 179 of file GEOM_Function.hxx.

{ return _label; }

Here is the caller graph for this function:

const Standard_GUID & GEOM_Function::GetFunctionTreeID ( ) [static]

Definition at line 90 of file GEOM_Function.cxx.

{
  static Standard_GUID aFunctionTreeID("FF1BBB00-5D14-4df2-980B-3A668264EA16");
  return aFunctionTreeID;
}

Here is the caller graph for this function:

TDF_Label GEOM_Function::GetHistoryEntry ( const Standard_Boolean  create = Standard_True)

GetHistoryEntry.

Definition at line 786 of file GEOM_Function.cxx.

{
  return _label.FindChild(HISTORY_LABEL, create);
}

Here is the caller graph for this function:

int GEOM_Function::GetInteger ( int  thePosition)

GetInteger.

Definition at line 433 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return 0;
  Handle(TDataStd_Integer) anInteger;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  if(!anArgLabel.FindAttribute(TDataStd_Integer::GetID(), anInteger)) return 0;

  _isDone = true;
  return anInteger->Get();
}

Here is the call graph for this function:

TDF_Label GEOM_Function::GetNamingEntry ( const Standard_Boolean  create = Standard_True)

GetNamingEntry.

Definition at line 829 of file GEOM_Function.cxx.

{
  return _label.FindChild(NAMING_LABEL, create);
}

GetOwner.

Definition at line 145 of file GEOM_Function.cxx.

{
  TDF_Label aFather = _label.Father();
  while(!aFather.IsRoot()) {
    if(aFather.IsAttribute(GEOM_Object::GetObjectID())) return aFather;
    aFather = aFather.Father();
  }

  return TDF_Label();
}

Here is the call graph for this function:

Here is the caller graph for this function:

double GEOM_Function::GetReal ( int  thePosition)

GetReal.

Definition at line 368 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return 0.0;
  Handle(TDataStd_Real) aReal;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  if(!anArgLabel.FindAttribute(TDataStd_Real::GetID(), aReal)) return 0.0;

  _isDone = true;
  return aReal->Get();
}

Here is the call graph for this function:

const Standard_GUID & GEOM_Function::GetReferencesTreeID ( ) [static]

Definition at line 570 of file GEOM_Function.cxx.

{
  static Standard_GUID aReferencesTreeID("FF1BBB10-5D14-4df2-980B-3A668264EA16");
  return aReferencesTreeID;
}

Here is the caller graph for this function:

TCollection_AsciiString GEOM_Function::GetString ( int  thePosition)

GetString.

Definition at line 481 of file GEOM_Function.cxx.

{
  _isDone = false;
  TCollection_AsciiString aRes;
  if(thePosition <= 0) return aRes;
  Handle(TDataStd_Comment) aString;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  if(!anArgLabel.FindAttribute(TDataStd_Comment::GetID(), aString)) return aRes;

  _isDone = true;
  aRes = TCollection_AsciiString(aString->Get());
  return aRes;
}

Here is the call graph for this function:

const TDataStd_ListOfExtendedString & GEOM_Function::GetSubShapeReferences ( )

GetSubShapeReferences.

Definition at line 765 of file GEOM_Function.cxx.

{
  _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();
}

Here is the call graph for this function:

GetType.

Definition at line 161 of file GEOM_Function.cxx.

{
  _isDone = false;
  Handle(TDataStd_Integer) aType;
  if(!_label.FindAttribute(TDataStd_Integer::GetID(), aType)) return 0;
  _isDone = true;
  return aType->Get();
}

Here is the call graph for this function:

TopoDS_Shape GEOM_Function::GetValue ( )

GetValue.

Definition at line 175 of file GEOM_Function.cxx.

{
  _isDone = false;

  TopoDS_Shape aShape;
  TDF_Label aLabel = GetOwnerEntry();
  if (aLabel.IsRoot()) return aShape;
  Handle(GEOM_Object) anObject = GEOM_Object::GetObject(aLabel);
  if (anObject.IsNull()) return aShape;

  if (!anObject->IsMainShape()) {
    bool isResult = false;
    TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL);
    if (!aResultLabel.IsNull()) {
      Handle(TNaming_NamedShape) aNS;
      if (aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS))
        isResult = true;
    }

    // compare tics
    if (isResult) {
      // tic of this
      Standard_Integer aTic = anObject->GetTic();

      // tic of main shape
      GEOM_ISubShape aCI (this);
      TDF_Label aLabelObjMainSh = aCI.GetMainShape()->GetOwnerEntry();
      if (aLabelObjMainSh.IsRoot()) return aShape;
      Handle(GEOM_Object) anObjMainSh = GEOM_Object::GetObject(aLabelObjMainSh);
      if (anObjMainSh.IsNull()) return aShape;
      Standard_Integer aTicMainSh = anObjMainSh->GetTic();

      // compare
      isResult = ((aTic == aTicMainSh) ? true : false);
    }

    if (!isResult) {
      try {
#if OCC_VERSION_LARGE > 0x06010000
        OCC_CATCH_SIGNALS;
#endif
        GEOM_Solver aSolver(GEOM_Engine::GetEngine());
        if (!aSolver.ComputeFunction(this)) {
          MESSAGE("GEOM_Object::GetValue Error : Can't build a sub-shape");
          return aShape;
        }
      }
      catch (Standard_Failure) {
        Handle(Standard_Failure) aFail = Standard_Failure::Caught();
        MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
        return aShape;
      }
    }
  }

  TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL);
  Handle(TNaming_NamedShape) aNS;
  if (!aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) return aShape;

  aShape = aNS->Get();

#ifdef KEEP_ORIENTATION_0021251
  // 0021251: TNaming_NamedShape doesn't store orientation
  TDF_Label anOrientationLabel = _label.FindChild(ORIENTATION_LABEL);
  Handle(TDataStd_Integer) anInteger;
  if (anOrientationLabel.FindAttribute(TDataStd_Integer::GetID(), anInteger)) {
    aShape.Orientation((TopAbs_Orientation)anInteger->Get());
  }
#endif

  _isDone = true;
  return aShape;
}

Here is the call graph for this function:

Standard_EXPORT const GEOM_Function::Handle ( Standard_Type  ) const [inline]

Definition at line 144 of file GEOM_Function.hxx.

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_EXPORT GEOM_Function::Handle ( TColStd_HArray1OfReal  )
Standard_EXPORT GEOM_Function::Handle ( TColStd_HArray1OfInteger  )
Standard_EXPORT GEOM_Function::Handle ( TColStd_HArray1OfExtendedString  )
Standard_EXPORT GEOM_Function::Handle ( TColStd_HSequenceOfTransient  )

HasSubShapeReferences.

Definition at line 752 of file GEOM_Function.cxx.

{
  _isDone = true;

  TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
  return aSubShapesLabel.IsAttribute(TDataStd_ExtStringList::GetID());
}

Definition at line 254 of file GEOM_Function.hxx.

{ return _isDone; }
Standard_EXPORT Standard_Boolean GEOM_Function::IsKind ( const Handle(Standard_Type)&  AType) const [inline]

Definition at line 146 of file GEOM_Function.hxx.

      { return (STANDARD_TYPE(GEOM_Function) == AType || MMgt_TShared::IsKind(AType)); }

Here is the call graph for this function:

void GEOM_Function::operator delete ( void *  anAddress) [inline]

Definition at line 136 of file GEOM_Function.hxx.

      {
        if (anAddress) Standard::Free((Standard_Address&)anAddress);
      }
void* GEOM_Function::operator new ( size_t  ,
void *  anAddress 
) [inline]

Definition at line 128 of file GEOM_Function.hxx.

      {
        return anAddress;
      }
void* GEOM_Function::operator new ( size_t  size) [inline]

Definition at line 132 of file GEOM_Function.hxx.

      {
        return Standard::Allocate(size);
      }

RemoveSubShapeReference.

Definition at line 731 of file GEOM_Function.cxx.

{
  _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;
}

Here is the call graph for this function:

void GEOM_Function::SetDescription ( const TCollection_AsciiString &  theDescription)

SetDescription.

Definition at line 325 of file GEOM_Function.cxx.

{
  TDF_Label aChild = _label.FindChild(DESCRIPTION_LABEL);
  Handle(TDataStd_Comment) aComment =
    TDataStd_Comment::Set(aChild, TCollection_ExtendedString(theDescription));
}

Here is the call graph for this function:

void GEOM_Function::SetInteger ( int  thePosition,
int  theValue 
)

SetInteger.

Definition at line 402 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  TDataStd_Integer::Set(anArgLabel, theValue);
  _isDone = true;
}
void GEOM_Function::SetIntegerArray ( int  thePosition,
const Handle(TColStd_HArray1OfInteger)&  theArray 
)

SetIntegerArray.

Definition at line 416 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  Handle(TDataStd_IntegerArray) anAttr =
    TDataStd_IntegerArray::Set(anArgLabel, theArray->Lower(), theArray->Upper());
  anAttr->ChangeArray(theArray);
  _isDone = true;
}

Here is the call graph for this function:

void GEOM_Function::SetReal ( int  thePosition,
double  theValue 
)

SetReal.

Definition at line 337 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  TDataStd_Real::Set(anArgLabel, theValue);
  _isDone = true;
}
void GEOM_Function::SetRealArray ( int  thePosition,
const Handle(TColStd_HArray1OfReal)&  theArray 
)

SetRealArray.

Definition at line 351 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  Handle(TDataStd_RealArray) anAttr =
    TDataStd_RealArray::Set(anArgLabel, theArray->Lower(), theArray->Upper());
  anAttr->ChangeArray(theArray);
  _isDone = true;
}

Here is the call graph for this function:

void GEOM_Function::SetReference ( int  thePosition,
Handle(GEOM_Function theReference 
)

SetReference.

Definition at line 500 of file GEOM_Function.cxx.

{
  _isDone = false;
  if (thePosition <= 0) return;
  if (theReference.IsNull()) return;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  TDF_Reference::Set(anArgLabel, theReference->GetEntry());
  TDataStd_UAttribute::Set(anArgLabel, GetDependencyID());
  _isDone = true;
  return;
}

Here is the call graph for this function:

void GEOM_Function::SetReferenceList ( int  thePosition,
const Handle(TColStd_HSequenceOfTransient)&  theRefList 
)

SetReferenceList.

Definition at line 581 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return;

  // parent label for the list of references
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  anArgLabel.ForgetAllAttributes();

  // set TreeNode on the parent label
  Handle(TDataStd_TreeNode) aRoot, aNode;
  aRoot = TDataStd_TreeNode::Set(anArgLabel, GetReferencesTreeID());

  // store references on sub-labels of the parent label
  Handle(GEOM_Function) aFunc;
  Standard_Integer ind, len = theRefList->Length();
  for (ind = 1; ind <= len; ind++) {
    aFunc = Handle(GEOM_Function)::DownCast(theRefList->Value(ind));
    if (aFunc.IsNull()) continue;
    TDF_Label anArgLabel_i = SUB_ARGUMENT(thePosition, ind);
    TDF_Reference::Set(anArgLabel_i, aFunc->GetEntry());
    TDataStd_UAttribute::Set(anArgLabel_i, GetDependencyID());

    // set TreeNode on the child label
    aNode = TDataStd_TreeNode::Set(anArgLabel_i, GetReferencesTreeID());
    aRoot->Append(aNode);
  }

  _isDone = true;
  return;
}

Here is the call graph for this function:

void GEOM_Function::SetString ( int  thePosition,
const TCollection_AsciiString &  theValue 
)

SetString.

Definition at line 467 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  TDataStd_Comment::Set(anArgLabel, theValue);
  _isDone = true;
}
void GEOM_Function::SetStringArray ( int  thePosition,
const Handle(TColStd_HArray1OfExtendedString)&  theArray 
)

SetStringArray.

Definition at line 535 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0 || theArray.IsNull()) return;
  TDF_Label anArgLabel = ARGUMENT(thePosition);

  Handle(TDataStd_ExtStringArray) anArray = new TDataStd_ExtStringArray;
  anArray->ChangeArray(theArray);
  anArgLabel.AddAttribute(anArray);

  _isDone = true;
}

Here is the call graph for this function:

void GEOM_Function::SetValue ( TopoDS_Shape &  theShape)

SetValue.

Definition at line 254 of file GEOM_Function.cxx.

{
  _isDone = false;
  TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL);
  TNaming_Builder aBuilder (aResultLabel);

  aBuilder.Generated(theShape);

#ifdef KEEP_ORIENTATION_0021251
  // 0021251: TNaming_NamedShape doesn't store orientation
  TDF_Label anOrientationLabel = _label.FindChild(ORIENTATION_LABEL);
  TDataStd_Integer::Set(anOrientationLabel, (int)theShape.Orientation());
#endif

  // synchronisation between main shape and its sub-shapes
  TDF_Label aLabel = GetOwnerEntry();
  if (aLabel.IsRoot()) return;
  Handle(GEOM_Object) anObject = GEOM_Object::GetObject(aLabel);
  if (anObject.IsNull()) return;
  if (anObject->IsMainShape()) {
    // increase modifications counter of this (main) shape
    anObject->IncrementTic();
  }
  else {
    // update modifications counter of this (sub-) shape to be the same as on main shape
    GEOM_ISubShape aCI (this);
    TDF_Label aLabelObjMainSh = aCI.GetMainShape()->GetOwnerEntry();
    if (aLabelObjMainSh.IsRoot()) return;
    Handle(GEOM_Object) anObjMainSh = GEOM_Object::GetObject(aLabelObjMainSh);
    if (anObjMainSh.IsNull()) return;

    anObject->SetTic(anObjMainSh->GetTic());
  }

  _isDone = true;
}

Here is the call graph for this function:


Friends And Related Function Documentation

Standard_EXPORT friend Handle_Standard_Type& GEOM_Function_Type_ ( ) [friend]

Definition at line 838 of file GEOM_Function.cxx.

{

  static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
  if (aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
  static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
  if (aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);

  static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
  static Handle_Standard_Type _aType = new Standard_Type("GEOM_Function",
                                                         sizeof(GEOM_Function),
                                                         1,
                                                         (Standard_Address)_Ancestors,
                                                         (Standard_Address)NULL);

  return _aType;
}

Member Data Documentation

bool GEOM_Function::_isDone [private]

Definition at line 279 of file GEOM_Function.hxx.

TDF_Label GEOM_Function::_label [private]

Definition at line 278 of file GEOM_Function.hxx.


The documentation for this class was generated from the following files: