X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FACISExport%2FACISExport.cxx;fp=src%2FACISExport%2FACISExport.cxx;h=0000000000000000000000000000000000000000;hb=078482e428af0ad5c9c7278f5d1fd3b747f82f38;hp=aaecd275842d567fe7ef5dd4d42529126e055003;hpb=e91319df41895303f40086ee69cc754427907b86;p=plugins%2Facisplugin.git diff --git a/src/ACISExport/ACISExport.cxx b/src/ACISExport/ACISExport.cxx deleted file mode 100644 index aaecd27..0000000 --- a/src/ACISExport/ACISExport.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2014 OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include -#include - -#include - -#include -#include -#include -#include - -#ifdef ACIS_HASLICENSE -#include - -#include -#include -#endif // ACIS_HASLICENSE - -extern "C" -{ - /*! - \brief Get version of the plugin. - \return the version of the plugin - */ - ACISPLUGIN_EXPORT - int GetVersion() - { - return ACISPLUGIN_VERSION; - } - - /*! - \brief Get version of the plugin. - \return the string representation of the plugin's version - */ - ACISPLUGIN_EXPORT - char* GetVersionStr() - { - return (char*)ACISPLUGIN_VERSION_STR; - } - - /*! - \brief Export shape to the ACIS format. - \param theShape shape being exported - \param theFileName file path - \param theFormatName file format signature - \return error status (0 in case of success) - */ - ACISPLUGIN_EXPORT - int Export(const TopoDS_Shape& theShape, - const TCollection_AsciiString& theFileName, - const TCollection_AsciiString& theFormatName) - { -#ifdef ACIS_HASLICENSE - try { - OCCLicense_Activate("SAT-W-"OCC_VERSION_STRING, ACIS_WRITE_LICENSE); - } - catch (Standard_LicenseError) { - return 1; - } -#endif // ACIS_HASLICENSE - - // Set "C" numeric locale to save numbers correctly - Kernel_Utils::Localizer loc; - - SatControl_Writer aWriter; - - try { - IFSelect_ReturnStatus status ; - status = aWriter.TransferShape(theShape); - if ( status == IFSelect_RetDone ) - status = aWriter.WriteFile( theFileName.ToCString() ) ; - if ( status == IFSelect_RetDone ) - return 1; - } - catch(Standard_Failure) { - return 1; - } - return 0; - } -} // end of extern "C"