X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARD%2FHOMARD_Cas.cxx;h=4b67d08cda5b76902acdf9aee98ece1c6a66db3a;hb=refs%2Ftags%2FV9_13_0b1;hp=a7ebbf4f1ec6602fb5754d8f3f438befb63b25d7;hpb=77262fdb4bf42ef5a70a8918f6bb3c86b0f6f3b3;p=modules%2Fhomard.git diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx index a7ebbf4f..4b67d08c 100644 --- a/src/HOMARD/HOMARD_Cas.cxx +++ b/src/HOMARD/HOMARD_Cas.cxx @@ -1,11 +1,11 @@ -// HOMARD HOMARD : implementaion of HOMARD idl descriptions +// HOMARD HOMARD : implementation of HOMARD idl descriptions // -// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// Copyright (C) 2011-2024 CEA, EDF // // 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. +// 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 @@ -19,7 +19,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Cas.cxx -// Author : Paul RASCLE, EDF +// Author : Gerald NICOLAS, EDF // Module : HOMARD // // Remarques : @@ -33,10 +33,14 @@ #include "HOMARD_Cas.hxx" #include "utilities.h" +#include "HOMARD.hxx" #include +#include #ifndef WIN32 -# include +#include +#else +#include #endif //============================================================================= @@ -46,7 +50,7 @@ */ //============================================================================= HOMARD_Cas::HOMARD_Cas(): - _Name(""), _NomDir("/tmp"), _ConfType(1) + _Name(""), _NomDir("/tmp"), _ConfType(0), _ExtType(0) { MESSAGE("HOMARD_Cas"); } @@ -78,6 +82,8 @@ std::string HOMARD_Cas::GetDumpPython() const aScript << _NomDir << "\")\n"; aScript << "\t" <<_Name << ".SetConfType("; aScript << _ConfType << ")\n"; + aScript << "\t" <<_Name << ".SetExtType("; + aScript << _ExtType << ")\n"; // Suivi de frontieres std::list::const_iterator it = _ListBoundaryGroup.begin(); while(it != _ListBoundaryGroup.end()) @@ -101,19 +107,32 @@ std::string HOMARD_Cas::GetDumpPython() const // Caracteristiques //============================================================================= //============================================================================= -void HOMARD_Cas::SetDirName( const char* NomDir ) +int HOMARD_Cas::SetDirName( const char* NomDir ) { - MESSAGE("SetDirName, NomDir : "< 1 ) { erreur = 1 ; } + // Creation + if ( CHDIR(NomDir) == 0 ) + { _NomDir = std::string( NomDir ); } + else + { + +#ifndef WIN32 + if ( mkdir(NomDir, S_IRWXU|S_IRGRP|S_IXGRP) == 0 ) +#else + if ( _mkdir(NomDir) == 0 ) +#endif { - // GERALD -- QMESSAGE BOX - // std::cerr << "Pb pour entrer dans le repertoire : "<=-2) && (Conftype<=3) ); _ConfType = Conftype; } //============================================================================= @@ -136,6 +159,20 @@ const int HOMARD_Cas::GetConfType() const return _ConfType; } // +// Le type exterieur +// +//============================================================================= +void HOMARD_Cas::SetExtType( int ExtType ) +{ +// VERIFICATION( (ExtType>=0) && (ExtType<=2) ); + _ExtType = ExtType; +} +//============================================================================= +const int HOMARD_Cas::GetExtType() const +{ + return _ExtType; +} +// // La boite englobante // //============================================================================= @@ -183,8 +220,17 @@ void HOMARD_Cas::SupprGroups() // Les frontieres // //============================================================================= +void HOMARD_Cas::AddBoundary( const char* Boundary ) +{ +// MESSAGE ( ". HOMARD_Cas::AddBoundary : Boundary = " << Boundary ); + const char* Group = ""; + AddBoundaryGroup( Boundary, Group ); +} +//============================================================================= void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group ) { +// MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Boundary = " << Boundary ); +// MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Group = " << Group ); _ListBoundaryGroup.push_back( Boundary ); _ListBoundaryGroup.push_back( Group ); }