Back to index

salome-geom  6.5.0
Defines | Functions
GEOM_Object.cxx File Reference
#include <Standard_Stream.hxx>
#include "utilities.h"
#include <GEOM_Object.hxx>
#include <GEOM_Engine.hxx>
#include <GEOM_Solver.hxx>
#include <TDF_Tool.hxx>
#include <TDF_Data.hxx>
#include <TDF_Reference.hxx>
#include <TDF_LabelSequence.hxx>
#include <TDocStd_Owner.hxx>
#include <TDocStd_Document.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_Real.hxx>
#include <TDataStd_ChildNodeIterator.hxx>
#include <TDataStd_UAttribute.hxx>
#include <TDataStd_Name.hxx>
#include <TDataStd_Comment.hxx>
#include <TDataStd_RealArray.hxx>
#include <TDataStd_ByteArray.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopExp.hxx>

Go to the source code of this file.

Defines

#define FUNCTION_LABEL(theNb)   (_label.FindChild(1).FindChild((theNb)))
#define TYPE_LABEL   2
#define FREE_LABEL   3
#define TIC_LABEL   4
#define COLOR_LABEL   5
#define AUTO_COLOR_LABEL   6
#define MARKER_LABEL   7
#define MARKER_LABEL_TYPE   1
#define MARKER_LABEL_SIZE   2
#define MARKER_LABEL_ID   3

Functions

 Handle (GEOM_Object) GEOM_Object
 GetObject.
 Handle (GEOM_Function) GEOM_Object
 AddFunction.
 Handle (TColStd_HSequenceOfTransient) GEOM_Object
 GetAllDependency.
Standard_EXPORT
Handle_Standard_Type & 
GEOM_Object_Type_ ()

Define Documentation

#define AUTO_COLOR_LABEL   6

Definition at line 55 of file GEOM_Object.cxx.

#define COLOR_LABEL   5

Definition at line 54 of file GEOM_Object.cxx.

#define FREE_LABEL   3

Definition at line 52 of file GEOM_Object.cxx.

#define FUNCTION_LABEL (   theNb)    (_label.FindChild(1).FindChild((theNb)))

Definition at line 50 of file GEOM_Object.cxx.

#define MARKER_LABEL   7

Definition at line 56 of file GEOM_Object.cxx.

#define MARKER_LABEL_ID   3

Definition at line 60 of file GEOM_Object.cxx.

#define MARKER_LABEL_SIZE   2

Definition at line 59 of file GEOM_Object.cxx.

#define MARKER_LABEL_TYPE   1

Definition at line 58 of file GEOM_Object.cxx.

#define TIC_LABEL   4

Definition at line 53 of file GEOM_Object.cxx.

#define TYPE_LABEL   2

Definition at line 51 of file GEOM_Object.cxx.


Function Documentation

Standard_EXPORT Handle_Standard_Type& GEOM_Object_Type_ ( )

Definition at line 664 of file GEOM_Object.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_Object",
                                                         sizeof(GEOM_Object),
                                                         1,
                                                         (Standard_Address)_Ancestors,
                                                         (Standard_Address)NULL);
  return _aType;
}

Here is the call graph for this function:

GetObject.

GetReferencedObject.

Definition at line 87 of file GEOM_Object.cxx.

{
  if (!theLabel.IsAttribute(GetObjectID())) return NULL;

  TCollection_AsciiString anEntry;
  TDF_Tool::Entry(theLabel, anEntry);

  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theLabel.Data());
  if(aDoc.IsNull()) return NULL;

  Handle(TDataStd_Integer) anID;
  if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL;


  GEOM_Engine* anEngine=  GEOM_Engine::GetEngine();
  if(anEngine == NULL) return NULL;
  return anEngine->GetObject(anID->Get(), (char*) anEntry.ToCString());


}

Here is the call graph for this function:

AddFunction.

GetlastFunction.

GetFunction.

Definition at line 545 of file GEOM_Object.cxx.

{
  Standard_Integer nb = GetNbFunctions();
  if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub-shape
  nb++;
  TDF_Label aChild = FUNCTION_LABEL(nb);

  Handle(TDataStd_TreeNode) aNode = TDataStd_TreeNode::Set(aChild);
  _root->Append(aNode);

  Handle(GEOM_Function) aFunction = new GEOM_Function(aChild, theGUID, theFunctionType);

  return aFunction;

}

Here is the call graph for this function:

Handle ( TColStd_HSequenceOfTransient  )

GetAllDependency.

GetLastDependency.

Definition at line 603 of file GEOM_Object.cxx.

{
  Handle(TColStd_HSequenceOfTransient) anArray;
  TDF_LabelSequence aSeq;
  Standard_Integer nb = GetNbFunctions();
  if(nb == 0) return anArray;
  for(Standard_Integer i=1; i<=nb; i++) {
    Handle(GEOM_Function) aFunction = GetFunction(i);
    if(aFunction.IsNull()) continue;
    aFunction->GetDependency(aSeq);
  }

  Standard_Integer aLength = aSeq.Length();
  if(aLength > 0) {
    anArray = new TColStd_HSequenceOfTransient;
    for(Standard_Integer j =1; j<=aLength; j++) {
      Handle(GEOM_Object) aRefObj = GetReferencedObject(aSeq(j));
      if(!aRefObj.IsNull()) anArray->Append(aRefObj);
    }
  }

  return anArray;
}

Here is the call graph for this function: