ENV: Windows porting.

This commit is contained in:
env 2005-08-11 04:04:55 +00:00
parent 66ed942fe4
commit 424ee09297
19 changed files with 192 additions and 158 deletions

View File

@ -26,11 +26,11 @@
// Module : GEOM // Module : GEOM
// $Header$ // $Header$
using namespace std; #include <Standard_OStream.hxx>
#include "Archimede_VolumeSection.hxx" #include "Archimede_VolumeSection.hxx"
#include "utilities.h" #include "utilities.h"
#include <iostream.h>
#include <BRepMesh_IncrementalMesh.hxx> #include <BRepMesh_IncrementalMesh.hxx>
#include <TopExp_Explorer.hxx> #include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx> #include <TopLoc_Location.hxx>
@ -120,8 +120,8 @@ void VolumeSection::CenterOfGravity()
} }
} }
// Creation du point d'initialisation, c'est à dire le centre de gravité // Creation du point d'initialisation, c'est € dire le centre de gravit‰
//géométrique de la boite englobante //g‰om‰trique de la boite englobante
InitPoint.SetX(0.5 * (Xmin + Xmax)); InitPoint.SetX(0.5 * (Xmin + Xmax));
InitPoint.SetY(0.5 * (Ymin + Ymax)); InitPoint.SetY(0.5 * (Ymin + Ymax));
@ -155,7 +155,7 @@ Standard_Real VolumeSection::CalculateVolume(Standard_Real Elevation)
const TColgp_Array1OfPnt& Nodes = Tr->Nodes(); const TColgp_Array1OfPnt& Nodes = Tr->Nodes();
// Calcul des volumes de chaque triangle, de chaque face // Calcul des volumes de chaque triangle, de chaque face
//en tenant compte des triangles coupés par le plan de section //en tenant compte des triangles coups par le plan de section
for (i=1;i<=nbTriangles;i++) for (i=1;i<=nbTriangles;i++)
{ {
@ -379,7 +379,7 @@ gp_Pnt VolumeSection::Intersection(gp_Pnt P1,gp_Pnt P2,Standard_Real Hauteur)
return Point; return Point;
} }
//Fonction calculant le volume élémentaire de chaque tétraedre à partir de 3 points //Fonction calculant le volume ‰l‰mentaire de chaque t‰traedre € partir de 3 points
Standard_Real VolumeSection::ElementaryVolume(gp_Pnt P1,gp_Pnt P2,gp_Pnt P3) Standard_Real VolumeSection::ElementaryVolume(gp_Pnt P1,gp_Pnt P2,gp_Pnt P3)
{ {
Standard_Real Determinant; Standard_Real Determinant;

View File

@ -39,36 +39,36 @@ class VolumeSection{
public: public:
// Constructeur effectuant le maillage de peau de la shape // Constructeur effectuant le maillage de peau de la shape
VolumeSection(TopoDS_Shape , Standard_Real); Standard_EXPORT VolumeSection(TopoDS_Shape , Standard_Real);
//Methode qui affecte à un point,les coordonnées de centre de la boite englobante de la shape //Methode qui affecte € un point,les coordonn‰es de centre de la boite englobante de la shape
void CenterOfGravity(); Standard_EXPORT void CenterOfGravity();
// Methode qui calcule le volume sous un plan Z = h // Methode qui calcule le volume sous un plan Z = h
Standard_Real CalculateVolume(Standard_Real); Standard_EXPORT Standard_Real CalculateVolume(Standard_Real);
// Methode qui resout l'equation V(h)=constante // Methode qui resout l'equation V(h)=constante
Standard_Real Archimede(Standard_Real , Standard_Real); Standard_EXPORT Standard_Real Archimede(Standard_Real , Standard_Real);
// Methode permettant de "setter" un plan afin de l'utiliser à l'interieur de la classe // Methode permettant de "setter" un plan afin de l'utiliser l'interieur de la classe
void SetPlane(Handle (Geom_Plane)); Standard_EXPORT void SetPlane(Handle (Geom_Plane));
// Methode permettant de récupérer la shape modifiée à l'extérieur de la classe // Methode permettant de r‰cup‰rer la shape modifi‰e € l'ext‰rieur de la classe
TopoDS_Shape GetShape(); Standard_EXPORT TopoDS_Shape GetShape();
// Methode effectuant la rotation du plan et de la shape // Methode effectuant la rotation du plan et de la shape
void MakeRotation(gp_Dir); Standard_EXPORT void MakeRotation(gp_Dir);
// Methode effectuant la rotation inverse du plan et de la shape // Methode effectuant la rotation inverse du plan et de la shape
Handle (Geom_RectangularTrimmedSurface) InvMakeRotation(gp_Dir,Handle(Geom_RectangularTrimmedSurface)); Standard_EXPORT Handle (Geom_RectangularTrimmedSurface) InvMakeRotation(gp_Dir,Handle(Geom_RectangularTrimmedSurface));
// Methode permettant de découper le plan selon une projection de la Shape // Methode permettant de dcouper le plan selon une projection de la Shape
Handle (Geom_RectangularTrimmedSurface) TrimSurf(); Standard_EXPORT Handle (Geom_RectangularTrimmedSurface) TrimSurf();
// Methode permmettant de deplacer le plan jusqu'a la position donnée par Archimède // Methode permmettant de deplacer le plan jusqu'a la position donn‰e par Archimˆde
Handle (Geom_RectangularTrimmedSurface) AjustePlan(Handle(Geom_RectangularTrimmedSurface),Standard_Real,gp_Pnt); Standard_EXPORT Handle (Geom_RectangularTrimmedSurface) AjustePlan(Handle(Geom_RectangularTrimmedSurface),Standard_Real,gp_Pnt);
void getZ( double& min, double& max); Standard_EXPORT void getZ( double& min, double& max);
private: private:

View File

@ -10,6 +10,12 @@
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#ifdef WNT
#include <SALOME_WNT.hxx>
#else
#define SALOME_WNT_EXPORT
#endif
//============================================================================= //=============================================================================
/*! /*!
* *
@ -18,9 +24,7 @@
extern "C" extern "C"
{ {
#ifdef WNT SALOME_WNT_EXPORT
__declspec(__dllexport)
#endif
int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName) int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
{ {
MESSAGE("Export BREP into file " << theFileName.ToCString()); MESSAGE("Export BREP into file " << theFileName.ToCString());

View File

@ -11,6 +11,12 @@
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#ifdef WNT
#include <SALOME_WNT.hxx>
#else
#define SALOME_WNT_EXPORT
#endif
//============================================================================= //=============================================================================
/*! /*!
* *
@ -19,9 +25,7 @@
extern "C" extern "C"
{ {
#ifdef WNT SALOME_WNT_EXPORT
__declspec(__dllexport)
#endif
TopoDS_Shape Import (const TCollection_AsciiString& theFileName, TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
TCollection_AsciiString& theError) TCollection_AsciiString& theError)
{ {

View File

@ -21,7 +21,22 @@ class QLineEdit;
class QPushButton; class QPushButton;
class QRadioButton; class QRadioButton;
class DlgRef_Skeleton_QTD : public QDialog
#if defined DLGREF_EXPORTS
#if defined WIN32
#define DLGREF_EXPORT __declspec( dllexport )
#else
#define DLGREF_EXPORT
#endif
#else
#if defined WNT
#define DLGREF_EXPORT __declspec( dllimport )
#else
#define DLGREF_EXPORT
#endif
#endif
class DLGREF_EXPORT DlgRef_Skeleton_QTD : public QDialog
{ {
Q_OBJECT Q_OBJECT

View File

@ -26,7 +26,6 @@
// Module : GEOM // Module : GEOM
// $Header$ // $Header$
using namespace std;
#include "DlgRef_SpinBox.h" #include "DlgRef_SpinBox.h"
#include <qvalidator.h> #include <qvalidator.h>

View File

@ -1,6 +1,6 @@
using namespace std; #include <Standard_Stream.hxx>
#include "GEOM_Application.ixx" #include <GEOM_Application.ixx>
//======================================================================= //=======================================================================
//function : GEOM_Application //function : GEOM_Application

View File

@ -1,3 +1,7 @@
#ifdef WNT
#pragma warning( disable:4786 )
#endif
#include "GEOM_Engine.hxx" #include "GEOM_Engine.hxx"
#include "GEOM_Solver.hxx" #include "GEOM_Solver.hxx"

View File

@ -15,64 +15,64 @@
class GEOM_Engine class GEOM_Engine
{ {
public: public:
GEOM_Engine(); Standard_EXPORT GEOM_Engine();
~GEOM_Engine() { _mapIDDocument.Clear(); _objects.Clear(); } Standard_EXPORT ~GEOM_Engine() { _mapIDDocument.Clear(); _objects.Clear(); }
//Retuns the engine //Retuns the engine
static GEOM_Engine* GetEngine(); Standard_EXPORT static GEOM_Engine* GetEngine();
//Returns the OCAF document by its ID, if document doesn't exists it will be created //Returns the OCAF document by its ID, if document doesn't exists it will be created
Handle(TDocStd_Document) GetDocument(int theDocID); Standard_EXPORT Handle(TDocStd_Document) GetDocument(int theDocID);
//Returns the ID of the given OCAF document //Returns the ID of the given OCAF document
int GetDocID(Handle(TDocStd_Document) theDocument); Standard_EXPORT int GetDocID(Handle(TDocStd_Document) theDocument);
//Returns the OCAF appliaction //Returns the OCAF appliaction
Handle(TDocStd_Application) GetApplication() { return _OCAFApp; } Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
//Returns a pointer to GEOM_Object defined by a document and the entry //Returns a pointer to GEOM_Object defined by a document and the entry
Handle(GEOM_Object) GetObject(int theDocID, char* theEntry); Standard_EXPORT Handle(GEOM_Object) GetObject(int theDocID, char* theEntry);
//Adds a new object of the type theType in the OCAF document //Adds a new object of the type theType in the OCAF document
Handle(GEOM_Object) AddObject(int theDocID, int theType); Standard_EXPORT Handle(GEOM_Object) AddObject(int theDocID, int theType);
//Removes the object from the OCAF document //Removes the object from the OCAF document
bool RemoveObject(Handle(GEOM_Object) theObject); Standard_EXPORT bool RemoveObject(Handle(GEOM_Object) theObject);
//Saves the OCAF document with ID = theDocID with file with name theFileName //Saves the OCAF document with ID = theDocID with file with name theFileName
bool Save(int theDocID, char* theFileName); Standard_EXPORT bool Save(int theDocID, char* theFileName);
//Loads the OCAF document into the application and assigns to it an ID = theDocID //Loads the OCAF document into the application and assigns to it an ID = theDocID
bool Load(int theDocID, char* theFileName); Standard_EXPORT bool Load(int theDocID, char* theFileName);
//Closes the document with ID = theDocID //Closes the document with ID = theDocID
void Close(int theDocID); Standard_EXPORT void Close(int theDocID);
//Sets the number of Undos (default value = 10) //Sets the number of Undos (default value = 10)
void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; } Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
//Applies an Undo to document with ID = theDocID //Applies an Undo to document with ID = theDocID
void Undo(int theDocID); Standard_EXPORT void Undo(int theDocID);
//Applies an Redo to document with ID = theDocID //Applies an Redo to document with ID = theDocID
void Redo(int theDocID); Standard_EXPORT void Redo(int theDocID);
//Adds a new sub shape object of the MainShape object //Adds a new sub shape object of the MainShape object
Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape, Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape,
Handle(TColStd_HArray1OfInteger) theIndices, Handle(TColStd_HArray1OfInteger) theIndices,
bool isStandaloneOperation = false); bool isStandaloneOperation = false);
TCollection_AsciiString DumpPython(int theDocID, Standard_EXPORT TCollection_AsciiString DumpPython(int theDocID,
Resource_DataMapOfAsciiStringAsciiString& theObjectNames, Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
bool isPublished, bool isPublished,
bool& aValidScript); bool& aValidScript);
const char* GetDumpName (const char* theStudyEntry) const; Standard_EXPORT const char* GetDumpName (const char* theStudyEntry) const;
Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const; Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
protected: protected:
static void SetEngine(GEOM_Engine* theEngine); Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
private: private:

View File

@ -1,8 +1,9 @@
using namespace std;
#include "GEOM_Function.hxx" #include <Standard_Stream.hxx>
#include "GEOM_Object.hxx"
#include "GEOM_Solver.hxx" #include <GEOM_Function.hxx>
#include <GEOM_Object.hxx>
#include <GEOM_Solver.hxx>
#include "utilities.h" #include "utilities.h"

View File

@ -130,96 +130,96 @@ private:
public: public:
//Returns a GUID for a function tree //Returns a GUID for a function tree
static const Standard_GUID& GetFunctionTreeID(); Standard_EXPORT static const Standard_GUID& GetFunctionTreeID();
//Returns the ID which is associated with a reference to another function //Returns the ID which is associated with a reference to another function
static const Standard_GUID& GetDependencyID(); Standard_EXPORT static const Standard_GUID& GetDependencyID();
//Finds and returns a function located on a label theEntry //Finds and returns a function located on a label theEntry
static Handle(GEOM_Function) GetFunction(const TDF_Label& theEntry); Standard_EXPORT static Handle(GEOM_Function) GetFunction(const TDF_Label& theEntry);
GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType); Standard_EXPORT GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType);
~GEOM_Function() {;} Standard_EXPORT ~GEOM_Function() {;}
TDF_Label GetOwnerEntry(); Standard_EXPORT TDF_Label GetOwnerEntry();
//Access to properties //Access to properties
//Returns a result of the function built by the function Driver //Returns a result of the function built by the function Driver
TopoDS_Shape GetValue(); Standard_EXPORT TopoDS_Shape GetValue();
//Sets the function result //Sets the function result
void SetValue(TopoDS_Shape& theShape); Standard_EXPORT void SetValue(TopoDS_Shape& theShape);
//Returns a function entry in the OCAF document //Returns a function entry in the OCAF document
TDF_Label& GetEntry() { return _label; } Standard_EXPORT TDF_Label& GetEntry() { return _label; }
//Returns the type of the function //Returns the type of the function
int GetType(); Standard_EXPORT int GetType();
//Returns a function Driver GUID //Returns a function Driver GUID
Standard_GUID GetDriverGUID(); Standard_EXPORT Standard_GUID GetDriverGUID();
//Returns aPython description of the function //Returns aPython description of the function
TCollection_AsciiString GetDescription(); Standard_EXPORT TCollection_AsciiString GetDescription();
//Sets aPython description of the function //Sets aPython description of the function
void SetDescription(const TCollection_AsciiString& theDescription); Standard_EXPORT void SetDescription(const TCollection_AsciiString& theDescription);
//Access to arguments //Access to arguments
//Sets a real argument at position thePosition //Sets a real argument at position thePosition
void SetReal(int thePosition, double theValue); Standard_EXPORT void SetReal(int thePosition, double theValue);
//Returns a real argument at position thePosition //Returns a real argument at position thePosition
double GetReal(int thePosition); Standard_EXPORT double GetReal(int thePosition);
//Sets a real array argument at position thePosition //Sets a real array argument at position thePosition
void SetRealArray(int thePosition, const Handle(TColStd_HArray1OfReal)& theArray); Standard_EXPORT void SetRealArray(int thePosition, const Handle(TColStd_HArray1OfReal)& theArray);
//Returns a real array argument at position thePosition //Returns a real array argument at position thePosition
Handle(TColStd_HArray1OfReal) GetRealArray(int thePosition); Standard_EXPORT Handle(TColStd_HArray1OfReal) GetRealArray(int thePosition);
//Sets an integer argument at position thePosition //Sets an integer argument at position thePosition
void SetInteger(int thePosition, int theValue); Standard_EXPORT void SetInteger(int thePosition, int theValue);
//Returns an integer argument at position thePosition //Returns an integer argument at position thePosition
int GetInteger(int thePosition); Standard_EXPORT int GetInteger(int thePosition);
//Sets an integer array argument at position thePosition //Sets an integer array argument at position thePosition
void SetIntegerArray(int thePosition, const Handle(TColStd_HArray1OfInteger)& theArray); Standard_EXPORT void SetIntegerArray(int thePosition, const Handle(TColStd_HArray1OfInteger)& theArray);
//Returns an integer array argument at position thePosition //Returns an integer array argument at position thePosition
Handle(TColStd_HArray1OfInteger) GetIntegerArray(int thePosition); Standard_EXPORT Handle(TColStd_HArray1OfInteger) GetIntegerArray(int thePosition);
//Sets a reference to other function argument at position thePosition //Sets a reference to other function argument at position thePosition
void SetReference(int thePosition, Handle(GEOM_Function) theReference); Standard_EXPORT void SetReference(int thePosition, Handle(GEOM_Function) theReference);
//Sets a string argument at position thePosition //Sets a string argument at position thePosition
void SetString(int thePosition, const TCollection_AsciiString& theValue); Standard_EXPORT void SetString(int thePosition, const TCollection_AsciiString& theValue);
//Returns a string argument at position thePosition //Returns a string argument at position thePosition
TCollection_AsciiString GetString(int thePosition); Standard_EXPORT TCollection_AsciiString GetString(int thePosition);
//Returns a reference to other function argument at position thePosition //Returns a reference to other function argument at position thePosition
Handle(GEOM_Function) GetReference(int thePosition); Standard_EXPORT Handle(GEOM_Function) GetReference(int thePosition);
//Set an array of ExtendedString //Set an array of ExtendedString
void SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray); Standard_EXPORT void SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray);
//Returns the array of ExtendedString //Returns the array of ExtendedString
Handle(TColStd_HArray1OfExtendedString) GetStringArray(int thePosition); Standard_EXPORT Handle(TColStd_HArray1OfExtendedString) GetStringArray(int thePosition);
//Returns a GUID for a references tree //Returns a GUID for a references tree
static const Standard_GUID& GetReferencesTreeID(); Standard_EXPORT static const Standard_GUID& GetReferencesTreeID();
//Sets a list of references to other function arguments at position thePosition //Sets a list of references to other function arguments at position thePosition
void SetReferenceList (int thePosition, Standard_EXPORT void SetReferenceList (int thePosition,
const Handle(TColStd_HSequenceOfTransient)& theRefList); const Handle(TColStd_HSequenceOfTransient)& theRefList);
//Returns a list of references to other function arguments at position thePosition //Returns a list of references to other function arguments at position thePosition
Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition);
//Sets a TopoDS_Shape argument at position thePosition //Sets a TopoDS_Shape argument at position thePosition
//void SetShape(int thePosition, const TopoDS_Shape& theShape); //void SetShape(int thePosition, const TopoDS_Shape& theShape);
@ -228,17 +228,17 @@ public:
//TopoDS_Shape GetShape(int thePosition); //TopoDS_Shape GetShape(int thePosition);
//Returns true if the last method succided //Returns true if the last method succided
bool IsDone() { return _isDone; } Standard_EXPORT bool IsDone() { return _isDone; }
//Returns a sequence of the external dependencies of this function //Returns a sequence of the external dependencies of this function
void GetDependency(TDF_LabelSequence& theSeq); Standard_EXPORT void GetDependency(TDF_LabelSequence& theSeq);
//Returns top label of this function's history tree //Returns top label of this function's history tree
TDF_Label GetHistoryEntry (const Standard_Boolean create = Standard_True); Standard_EXPORT TDF_Label GetHistoryEntry (const Standard_Boolean create = Standard_True);
//Returns history label, corresponding to the label, //Returns history label, corresponding to the label,
//on which a reference on argument is stored //on which a reference on argument is stored
TDF_Label GetArgumentHistoryEntry (const TDF_Label& theArgumentRefEntry, Standard_EXPORT TDF_Label GetArgumentHistoryEntry (const TDF_Label& theArgumentRefEntry,
const Standard_Boolean create = Standard_True); const Standard_Boolean create = Standard_True);
private: private:

View File

@ -1,10 +1,10 @@
using namespace std; #include <Standard_Stream.hxx>
#include "GEOM_IOperations.hxx" #include <GEOM_IOperations.hxx>
#include "utilities.h" #include "utilities.h"
#include "OpUtil.hxx" #include <OpUtil.hxx>
#include "Utils_ExceptHandlers.hxx" #include <Utils_ExceptHandlers.hxx>
#include <TDataStd_TreeNode.hxx> #include <TDataStd_TreeNode.hxx>
#include <TDataStd_ChildNodeIterator.hxx> #include <TDataStd_ChildNodeIterator.hxx>

View File

@ -17,42 +17,42 @@
class GEOM_IOperations class GEOM_IOperations
{ {
public: public:
GEOM_IOperations(GEOM_Engine* theEngine, int theDocID); Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine, int theDocID);
~GEOM_IOperations(); Standard_EXPORT ~GEOM_IOperations();
//Starts a new operation (opens a tansaction) //Starts a new operation (opens a tansaction)
void StartOperation(); Standard_EXPORT void StartOperation();
//Finishes the previously started operation (closes the transaction) //Finishes the previously started operation (closes the transaction)
void FinishOperation(); Standard_EXPORT void FinishOperation();
//Aborts the operation //Aborts the operation
void AbortOperation(); Standard_EXPORT void AbortOperation();
//Returns true if the last operation succided //Returns true if the last operation succided
bool IsDone(); Standard_EXPORT bool IsDone();
//Sets Not done error code //Sets Not done error code
void SetNotDone() { _errorCode = KO; } Standard_EXPORT void SetNotDone() { _errorCode = KO; }
//Sets an error code of the operation //Sets an error code of the operation
void SetErrorCode(const TCollection_AsciiString& theErrorCode) { Standard_EXPORT void SetErrorCode(const TCollection_AsciiString& theErrorCode) {
_errorCode = theErrorCode; _errorCode = theErrorCode;
} }
//Returns an error code of the last operatioin //Returns an error code of the last operatioin
char* GetErrorCode() { Standard_EXPORT char* GetErrorCode() {
return _errorCode.ToCString(); return _errorCode.ToCString();
} }
//Returns a pointer to GEOM_Engine which this operation interface is associated //Returns a pointer to GEOM_Engine which this operation interface is associated
GEOM_Engine* GetEngine() { return _engine; } Standard_EXPORT GEOM_Engine* GetEngine() { return _engine; }
//Return a pointer to Solver associated with this operation interface //Return a pointer to Solver associated with this operation interface
GEOM_Solver* GetSolver() { return _solver; } Standard_EXPORT GEOM_Solver* GetSolver() { return _solver; }
//Returns an ID of the OCAF document where this operation stores the data //Returns an ID of the OCAF document where this operation stores the data
int GetDocID() { return _docID; } Standard_EXPORT int GetDocID() { return _docID; }
private: private:

View File

@ -1,8 +1,8 @@
using namespace std; #include <Standard_Stream.hxx>
#include "GEOM_Object.hxx" #include <GEOM_Object.hxx>
#include "GEOM_Engine.hxx" #include <GEOM_Engine.hxx>
#include "GEOM_Solver.hxx" #include <GEOM_Solver.hxx>
#include <TDF_Tool.hxx> #include <TDF_Tool.hxx>
#include <TDF_Data.hxx> #include <TDF_Data.hxx>
#include <TDF_Reference.hxx> #include <TDF_Reference.hxx>

View File

@ -131,100 +131,100 @@ class GEOM_Object : public MMgt_TShared
GEOM_Object(TDF_Label& theLabel); GEOM_Object(TDF_Label& theLabel);
public: public:
GEOM_Object(TDF_Label& theEntry, int theType); Standard_EXPORT GEOM_Object(TDF_Label& theEntry, int theType);
~GEOM_Object() {;} Standard_EXPORT ~GEOM_Object() {;}
//Finds a GEOM_Object on the label theLabel //Finds a GEOM_Object on the label theLabel
static Handle(GEOM_Object) GetObject(TDF_Label& theLabel); Standard_EXPORT static Handle(GEOM_Object) GetObject(TDF_Label& theLabel);
//Finds a GEOM_Object by a reference, stored on the label theLabel //Finds a GEOM_Object by a reference, stored on the label theLabel
static Handle(GEOM_Object) GetReferencedObject(TDF_Label& theLabel); Standard_EXPORT static Handle(GEOM_Object) GetReferencedObject(TDF_Label& theLabel);
//Returns a GEOM_Object common GUID //Returns a GEOM_Object common GUID
static const Standard_GUID& GetObjectID(); Standard_EXPORT static const Standard_GUID& GetObjectID();
//Returns a GUID associated with a sub shape object //Returns a GUID associated with a sub shape object
static const Standard_GUID& GetSubShapeID(); Standard_EXPORT static const Standard_GUID& GetSubShapeID();
//########################################################### //###########################################################
//Access to properties //Access to properties
//########################################################### //###########################################################
//Returns a TreeNode that presents a root of a function tree for this GEOM_Object //Returns a TreeNode that presents a root of a function tree for this GEOM_Object
Handle(TDataStd_TreeNode) GetRootNode() { return _root; } Standard_EXPORT Handle(TDataStd_TreeNode) GetRootNode() { return _root; }
//Returns a label of this GEOM_Object //Returns a label of this GEOM_Object
TDF_Label GetEntry() { return _label; } Standard_EXPORT TDF_Label GetEntry() { return _label; }
//Returns a type of this GEOM_Object (GEOM_POINT, GEOM_VECTOR...) //Returns a type of this GEOM_Object (GEOM_POINT, GEOM_VECTOR...)
int GetType(); Standard_EXPORT int GetType();
//Sets the type of this GEOM_Object //Sets the type of this GEOM_Object
void SetType(int theType); Standard_EXPORT void SetType(int theType);
//Returns an ID of the OCAF document where this GEOM_Object is stored //Returns an ID of the OCAF document where this GEOM_Object is stored
int GetDocID(); Standard_EXPORT int GetDocID();
//Returns a value (as TopoDS_Shape) of this GEOM_Object //Returns a value (as TopoDS_Shape) of this GEOM_Object
TopoDS_Shape GetValue(); Standard_EXPORT TopoDS_Shape GetValue();
//Sets a name of this GEOM_Object //Sets a name of this GEOM_Object
void SetName(const char* theName); Standard_EXPORT void SetName(const char* theName);
//Returns a name of this GEOM_Object //Returns a name of this GEOM_Object
char* GetName(); Standard_EXPORT char* GetName();
//Sets an auxiliary data //Sets an auxiliary data
void SetAuxData(const char* theData); Standard_EXPORT void SetAuxData(const char* theData);
//Returns an auxiliary data //Returns an auxiliary data
TCollection_AsciiString GetAuxData(); Standard_EXPORT TCollection_AsciiString GetAuxData();
//########################################################### //###########################################################
// Sub shape methods // Sub shape methods
//########################################################### //###########################################################
//Returns false if the object is a sub shape of another object //Returns false if the object is a sub shape of another object
bool IsMainShape(); Standard_EXPORT bool IsMainShape();
//########################################################### //###########################################################
// CORBA related methods // CORBA related methods
//########################################################### //###########################################################
//Sets an IOR of CORBA GEOM_Object_i which refers to this object //Sets an IOR of CORBA GEOM_Object_i which refers to this object
void SetIOR(TCollection_AsciiString& theIOR) { _ior = theIOR; } Standard_EXPORT void SetIOR(TCollection_AsciiString& theIOR) { _ior = theIOR; }
//Returns an IOR of CORBA GEOM_Object_i which refers to this object //Returns an IOR of CORBA GEOM_Object_i which refers to this object
TCollection_AsciiString GetIOR() { return _ior; } Standard_EXPORT TCollection_AsciiString GetIOR() { return _ior; }
//########################################################### //###########################################################
//Functions methods //Functions methods
//########################################################### //###########################################################
//Adds a function with a driver GUID = theGUID and a type theFunctionType to the function tree of this GEOM_Object //Adds a function with a driver GUID = theGUID and a type theFunctionType to the function tree of this GEOM_Object
Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID, int theFunctionType); Standard_EXPORT Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID, int theFunctionType);
//Returns a number of functions of this GEOM_Object //Returns a number of functions of this GEOM_Object
int GetNbFunctions(); Standard_EXPORT int GetNbFunctions();
//Returns a function with given number theFunctionNumber //Returns a function with given number theFunctionNumber
Handle(GEOM_Function) GetFunction(int theFunctionNumber); Standard_EXPORT Handle(GEOM_Function) GetFunction(int theFunctionNumber);
//Return the last function of this GEOM_Object //Return the last function of this GEOM_Object
Handle(GEOM_Function) GetLastFunction(); Standard_EXPORT Handle(GEOM_Function) GetLastFunction();
//Returns all dependencies of the object //Returns all dependencies of the object
Handle(TColStd_HSequenceOfTransient) GetAllDependency(); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetAllDependency();
//Returns the dependencies of the last function //Returns the dependencies of the last function
Handle(TColStd_HSequenceOfTransient) GetLastDependency(); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetLastDependency();
//########################################################### //###########################################################
// Internal methods // Internal methods
//########################################################### //###########################################################
//Returns a label which could be used to store some additional data //Returns a label which could be used to store some additional data
TDF_Label GetFreeLabel(); Standard_EXPORT TDF_Label GetFreeLabel();
private: private:

View File

@ -37,18 +37,18 @@ namespace GEOM
Handle(GEOM_Function) myFunction; Handle(GEOM_Function) myFunction;
public: public:
TPythonDump (Handle(GEOM_Function)& theFunction); Standard_EXPORT TPythonDump (Handle(GEOM_Function)& theFunction);
virtual ~TPythonDump(); Standard_EXPORT virtual ~TPythonDump();
// operator TCollection_AsciiString () const; // operator TCollection_AsciiString () const;
TPythonDump& operator<< (long int theArg); Standard_EXPORT TPythonDump& operator<< (long int theArg);
TPythonDump& operator<< (int theArg); Standard_EXPORT TPythonDump& operator<< (int theArg);
TPythonDump& operator<< (double theArg); Standard_EXPORT TPythonDump& operator<< (double theArg);
TPythonDump& operator<< (float theArg); Standard_EXPORT TPythonDump& operator<< (float theArg);
TPythonDump& operator<< (const void* theArg); Standard_EXPORT TPythonDump& operator<< (const void* theArg);
TPythonDump& operator<< (const char* theArg); Standard_EXPORT TPythonDump& operator<< (const char* theArg);
TPythonDump& operator<< (const Handle(GEOM_Object)& theObject); Standard_EXPORT TPythonDump& operator<< (const Handle(GEOM_Object)& theObject);
}; };
} }

View File

@ -11,19 +11,19 @@
class GEOM_Solver class GEOM_Solver
{ {
public: public:
GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {} Standard_EXPORT GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {}
~GEOM_Solver() {} Standard_EXPORT ~GEOM_Solver() {}
//Update the values of all GEOM_Object in the document theDocID, theSeq will contain a list of touched labels //Update the values of all GEOM_Object in the document theDocID, theSeq will contain a list of touched labels
//Note: not Implemented //Note: not Implemented
bool Update(int theDocID, TDF_LabelSequence& theSeq); Standard_EXPORT bool Update(int theDocID, TDF_LabelSequence& theSeq);
//Updates a value of theObject, theSeq will contain a list of touched labels //Updates a value of theObject, theSeq will contain a list of touched labels
//Note: not implemented //Note: not implemented
bool UpdateObject(Handle(GEOM_Object) theObject, TDF_LabelSequence& theSeq); Standard_EXPORT bool UpdateObject(Handle(GEOM_Object) theObject, TDF_LabelSequence& theSeq);
//Recomputes a function //Recomputes a function
bool ComputeFunction(Handle(GEOM_Function) theFunction); Standard_EXPORT bool ComputeFunction(Handle(GEOM_Function) theFunction);
private: private:

View File

@ -1,9 +1,10 @@
using namespace std; #include <Standard_Stream.hxx>
#include "GEOM_SubShapeDriver.hxx"
#include "GEOM_ISubShape.hxx" #include <GEOM_SubShapeDriver.hxx>
#include "GEOM_Function.hxx" #include <GEOM_ISubShape.hxx>
#include "GEOM_Object.hxx" #include <GEOM_Function.hxx>
#include <GEOM_Object.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>

View File

@ -26,9 +26,11 @@
// Module : GEOM // Module : GEOM
// $Header$ // $Header$
using namespace std; #include <Standard_Stream.hxx>
#include "GEOM_Gen_i.hh"
#include "SALOME_NamingService.hxx" #include <CORBA.h>
#include <GEOM_Gen_i.hh>
#include <SALOME_NamingService.hxx>
//================================================================================== //==================================================================================
// function : main() MAIN // function : main() MAIN
@ -48,7 +50,11 @@ int main(int argc, char** argv)
// We allocate the objects on the heap. Since these are reference // We allocate the objects on the heap. Since these are reference
// counted objects, they will be deleted by the POA when they are no // counted objects, they will be deleted by the POA when they are no
// longer needed. // longer needed.
#ifdef WNT
GEOM_Gen_i * myGEOM_Gen_i = new GEOM_Gen_i((CORBA::ORB_ptr)orb, poa, 0, 0, 0 );
#else
GEOM_Gen_i * myGEOM_Gen_i = new GEOM_Gen_i(orb); GEOM_Gen_i * myGEOM_Gen_i = new GEOM_Gen_i(orb);
#endif
// Activate the objects. This tells the POA that the objects are // Activate the objects. This tells the POA that the objects are
// ready to accept requests. // ready to accept requests.