// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _BRepMesh_DiscretFactory_HeaderFile #define _BRepMesh_DiscretFactory_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _BRepMesh_PluginEntryType_HeaderFile #include #endif #ifndef _BRepMesh_FactoryError_HeaderFile #include #endif #ifndef _TColStd_MapOfAsciiString_HeaderFile #include #endif #ifndef _TCollection_AsciiString_HeaderFile #include #endif #ifndef _Plugin_MapOfFunctions_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Handle_BRepMesh_DiscretRoot_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif class TColStd_MapOfAsciiString; class TCollection_AsciiString; class BRepMesh_DiscretRoot; class TopoDS_Shape; //! This class intended to setup / retrieve default triangulation algorithm.
//! Use BRepMesh_DiscretFactory::Get() static method to retrieve global Factory instance.
//! Use BRepMesh_DiscretFactory::Discret() method to retrieve meshing tool.
class BRepMesh_DiscretFactory { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Returns the global factory instance.
Standard_EXPORT static BRepMesh_DiscretFactory& Get() ; //! Returns the list of registered meshing algorithms.
Standard_EXPORT const TColStd_MapOfAsciiString& Names() const; //! Setup meshing algorithm by name.
//! Returns true if requested tool is available.
//! On fail Factory will continue to use previous algo.
Standard_EXPORT Standard_Boolean SetDefaultName(const TCollection_AsciiString& theName) ; //! Returns name for current meshing algorithm.
Standard_EXPORT const TCollection_AsciiString& DefaultName() const; //! Advanced function. Changes function name to retrieve from plugin.
//! Returns true if requested tool is available.
//! On fail Factory will continue to use previous algo.
Standard_EXPORT Standard_Boolean SetFunctionName(const TCollection_AsciiString& theFuncName) ; //! Setup meshing algorithm that should be created by this Factory.
//! Returns true if requested tool is available.
//! On fail Factory will continue to use previous algo.
//! Call ::ErrorStatus() method to retrieve fault reason.
Standard_EXPORT Standard_Boolean SetDefault(const TCollection_AsciiString& theName,const TCollection_AsciiString& theFuncName = "DISCRETALGO") ; //! Returns function name that should be exported by plugin.
Standard_EXPORT const TCollection_AsciiString& FunctionName() const; //! Returns triangulation algorithm instance.
Standard_EXPORT Handle_BRepMesh_DiscretRoot Discret(const TopoDS_Shape& theShape,const Standard_Real theDeflection,const Standard_Real theAngle) ; //! Returns error status for last meshing algorithm switch.
Standard_EXPORT BRepMesh_FactoryError ErrorStatus() const; protected: Standard_EXPORT BRepMesh_DiscretFactory(); Standard_EXPORT virtual ~BRepMesh_DiscretFactory(); Standard_EXPORT void Clear() ; BRepMesh_PluginEntryType myPluginEntry; BRepMesh_FactoryError myErrorStatus; TColStd_MapOfAsciiString myNames; TCollection_AsciiString myDefaultName; TCollection_AsciiString myFunctionName; Plugin_MapOfFunctions myFactoryMethods; private: }; // other Inline functions and methods (like "C++: function call" methods) #endif