string GetCaseCreation() raises (SALOME::SALOME_Exception);
};
- interface HOMARD_Iteration : SALOME::GenericObj
- {
- // Generalites
- void SetName(in string Name) raises (SALOME::SALOME_Exception);
- string GetName() raises (SALOME::SALOME_Exception);
-
- // Caracteristiques
- void SetDirNameLoc(in string NomDir) raises (SALOME::SALOME_Exception);
- string GetDirNameLoc() raises (SALOME::SALOME_Exception);
-
- string GetDirName() raises (SALOME::SALOME_Exception);
-
- void SetNumber(in long NumIter) raises (SALOME::SALOME_Exception);
- long GetNumber() raises (SALOME::SALOME_Exception);
-
- void SetState(in long State) raises (SALOME::SALOME_Exception);
- long GetState() raises (SALOME::SALOME_Exception);
-
- void SetMeshName(in string NomMesh) raises (SALOME::SALOME_Exception);
- string GetMeshName() raises (SALOME::SALOME_Exception);
-
- void SetMeshFile(in string MeshFile) raises (SALOME::SALOME_Exception);
- string GetMeshFile() raises (SALOME::SALOME_Exception);
-
- // Fichier des messages
- void SetLogFile(in string LogFile) raises (SALOME::SALOME_Exception);
- string GetLogFile() raises (SALOME::SALOME_Exception);
-
- void SetFileInfo(in string FileInfo) raises (SALOME::SALOME_Exception);
- string GetFileInfo() raises (SALOME::SALOME_Exception);
-
- // Drivers
- void SetInfoCompute(in long MessInfo) raises (SALOME::SALOME_Exception);
- long GetInfoCompute() raises (SALOME::SALOME_Exception);
- };
-
interface HOMARD_Cas : SALOME::GenericObj
{
string GetName() raises (SALOME::SALOME_Exception);
in string Group) raises (SALOME::SALOME_Exception);
ListBoundaryGroupType GetBoundaryGroup() raises (SALOME::SALOME_Exception);
void SupprBoundaryGroup() raises (SALOME::SALOME_Exception);
-
- void AddIteration (in string IterName) raises (SALOME::SALOME_Exception);
};
interface HOMARD_Gen : SALOME::GenericObj
// A.2. Information
HOMARD_Boundary GetBoundary(in string BoundaryName) raises (SALOME::SALOME_Exception);
HOMARD_Cas GetCase() raises (SALOME::SALOME_Exception);
- HOMARD_Iteration GetIteration(in long numIter) raises (SALOME::SALOME_Exception);
listeBoundarys GetAllBoundarysName() raises (SALOME::SALOME_Exception);
- // B. CreateIteration
- HOMARD_Iteration CreateIteration() raises (SALOME::SALOME_Exception);
-
void InvalideBoundary (in string BoundaryName) raises (SALOME::SALOME_Exception);
long DeleteBoundary (in string BoundaryName) raises (SALOME::SALOME_Exception);
throw SALOME::SALOME_Exception(es);
}
// D. En cas de reprise, deplacement du point de depart
- SMESHHOMARD::HOMARD_Iteration_ptr Iter0 = _gen_i->GetIteration(0);
+ HOMARD_Gen_i* aGenImpl = SMESH::DownCast<HOMARD_Gen_i*>(_gen_i);
+ HOMARD_Iteration_i* Iter0 = aGenImpl->GetIteration(0);
int state = Iter0->GetNumber();
if (state != 0) { // GetState()
MESSAGE ("etat : " << state);
*/
//=============================================================================
HOMARD_Iteration_i::HOMARD_Iteration_i()
- : SALOME::GenericObj_i(SMESH_Gen_i::GetPOA())
{
MESSAGE("Default constructor, not for use");
ASSERT(0);
*/
//=============================================================================
HOMARD_Iteration_i::HOMARD_Iteration_i(SMESHHOMARD::HOMARD_Gen_var engine)
- : SALOME::GenericObj_i(SMESH_Gen_i::GetPOA())
{
MESSAGE("constructor");
_gen_i = engine;
*/
//=============================================================================
HOMARD_Gen_i::HOMARD_Gen_i() : SALOME::GenericObj_i(SMESH_Gen_i::GetPOA()),
+ myIteration0(NULL),
+ myIteration1(NULL),
_ConfType(0),
_KeepMedOUT(true),
_PublishMeshOUT(false),
MESSAGE ("DeleteIteration : numIter = " << numIter);
if (numIter == 0) {
- myIteration0 = SMESHHOMARD::HOMARD_Iteration::_nil();
+ if (myIteration0 != NULL) {
+ delete myIteration0;
+ myIteration0 = NULL;
+ }
}
else {
- if (!CORBA::is_nil(myIteration1)) {
+ if (myIteration1 != NULL) {
// Invalide Iteration
if (myIteration1->GetState() > 0) {
myIteration1->SetState(1);
}
}
- myIteration1 = SMESHHOMARD::HOMARD_Iteration::_nil();
+ delete myIteration1;
+ myIteration1 = NULL;
}
}
}
if (numIter == 0) {
- if (CORBA::is_nil(myIteration0)) {
+ if (myIteration0 == NULL) {
SALOME::ExceptionStruct es;
es.type = SALOME::BAD_PARAM;
es.text = "Invalid iteration";
throw SALOME::SALOME_Exception(es);
}
- myCase->AddIteration(myIteration0->GetName());
+ HOMARD_Cas_i* aCaseImpl = SMESH::DownCast<HOMARD_Cas_i*>(myCase);
+ aCaseImpl->AddIteration(myIteration0->GetName());
}
else {
- if (CORBA::is_nil(myIteration1)) {
+ if (myIteration1 == NULL) {
SALOME::ExceptionStruct es;
es.type = SALOME::BAD_PARAM;
es.text = "Invalid iteration";
throw SALOME::SALOME_Exception(es);
}
- myCase->AddIteration(myIteration1->GetName());
+ HOMARD_Cas_i* aCaseImpl = SMESH::DownCast<HOMARD_Cas_i*>(myCase);
+ aCaseImpl->AddIteration(myIteration1->GetName());
}
}
return SMESHHOMARD::HOMARD_Cas::_duplicate(myCase);
}
//=============================================================================
-SMESHHOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::GetIteration(int numIter)
+HOMARD_Iteration_i* HOMARD_Gen_i::GetIteration(int numIter)
{
if (numIter == 0) {
- ASSERT(!CORBA::is_nil(myIteration0));
- return SMESHHOMARD::HOMARD_Iteration::_duplicate(myIteration0);
+ ASSERT(myIteration0);
+ return myIteration0;
}
- ASSERT(!CORBA::is_nil(myIteration1));
- return SMESHHOMARD::HOMARD_Iteration::_duplicate(myIteration1);
+ ASSERT(myIteration1);
+ return myIteration1;
}
//=============================================================================
return aCase._retn();
}
//=============================================================================
-SMESHHOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::newIteration()
+HOMARD_Iteration_i* HOMARD_Gen_i::newIteration()
{
SMESHHOMARD::HOMARD_Gen_var engine = POA_SMESHHOMARD::HOMARD_Gen::_this();
HOMARD_Iteration_i* aServant = new HOMARD_Iteration_i(engine);
- SMESHHOMARD::HOMARD_Iteration_var aIter =
- SMESHHOMARD::HOMARD_Iteration::_narrow(aServant->_this());
- return aIter._retn();
+ return aServant;
}
//=============================================================================
SMESHHOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::newBoundary()
//=============================================================================
// Create Iteration1
//=============================================================================
-SMESHHOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration()
+HOMARD_Iteration_i* HOMARD_Gen_i::CreateIteration()
{
- if (CORBA::is_nil(myIteration0)) {
+ if (myIteration0 == NULL) {
SALOME::ExceptionStruct es;
es.type = SALOME::BAD_PARAM;
es.text = "The parent iteration is not defined.";
}
const char* nomDirCase = myCase->GetDirName();
- if (!myIteration1->_is_nil()) {
+ if (myIteration1 != NULL) {
DeleteIteration(1);
}
myIteration1 = newIteration();
- if (CORBA::is_nil(myIteration1)) {
+ if (myIteration1 == NULL) {
SALOME::ExceptionStruct es;
es.type = SALOME::BAD_PARAM;
es.text = "Unable to create the iteration 1";
std::string label = "IterationHomard_" + nomIterParent;
AssociateCaseIter(1, label.c_str());
- return SMESHHOMARD::HOMARD_Iteration::_duplicate(myIteration1);
+ return myIteration1;
}
//=============================================================================
SMESHHOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryName,
if (_LogInFile) myIteration1->SetLogFile(_LogFile.c_str());
// A.1. L'objet iteration
- ASSERT(!CORBA::is_nil(myIteration1));
+ ASSERT(myIteration1);
// A.2. Controle de la possibilite d'agir
// A.2.1. Etat de l'iteration
PythonDump();
// Delete log file, if required
- if (!myIteration1->_is_nil()) {
+ if (myIteration1 != NULL) {
MESSAGE("myIteration1->GetLogFile() = " << myIteration1->GetLogFile());
if (_LogInFile && _RemoveLogOnSuccess) {
// Remove log file on success
if (NumeIter < 11) { siter = "0" + siter; }
// B. L'iteration parent
- ASSERT(!CORBA::is_nil(myIteration0));
+ ASSERT(myIteration0);
// C. Le sous-répertoire de l'iteration precedente
char* DirComputePa = ComputeDirPaManagement();
SMESHHOMARD::HOMARD_Gen_var _gen_i;
};
-class SMESH_I_EXPORT HOMARD_Iteration_i : public virtual SALOME::GenericObj_i,
- public virtual POA_SMESHHOMARD::HOMARD_Iteration
+class SMESH_I_EXPORT HOMARD_Iteration_i
{
public:
HOMARD_Iteration_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
void SetFileInfo(const char* FileInfo);
char* GetFileInfo();
- // Liens avec les autres iterations
- void LinkNextIteration(const char* NomIteration);
- void UnLinkNextIteration(const char* NomIteration);
-
// Liens avec les autres structures
void SetCaseName(const char* NomCas);
char* GetCaseName();
const char* FileName,
const char* theWorkingDir);
- SMESHHOMARD::HOMARD_Iteration_ptr CreateIteration();
+ HOMARD_Iteration_i* CreateIteration();
// Les informations
SMESHHOMARD::HOMARD_Boundary_ptr GetBoundary (const char* nomBoundary);
SMESHHOMARD::HOMARD_Cas_ptr GetCase ();
- SMESHHOMARD::HOMARD_Iteration_ptr GetIteration (CORBA::Long numIter);
+ HOMARD_Iteration_i* GetIteration (CORBA::Long numIter);
SMESHHOMARD::listeBoundarys* GetAllBoundarysName();
private:
SMESHHOMARD::HOMARD_Boundary_ptr newBoundary();
SMESHHOMARD::HOMARD_Cas_ptr newCase();
- SMESHHOMARD::HOMARD_Iteration_ptr newIteration();
+ HOMARD_Iteration_i* newIteration();
void CleanCase();
private:
SMESHHOMARDImpl::HOMARD_Gen* myHomard;
+ HOMARD_Iteration_i* myIteration0;
+ HOMARD_Iteration_i* myIteration1;
+ SMESHHOMARD::HOMARD_Cas_var myCase;
std::map<std::string, SMESHHOMARD::HOMARD_Boundary_var> _mesBoundarys;
- SMESHHOMARD::HOMARD_Iteration_var myIteration0;
- SMESHHOMARD::HOMARD_Iteration_var myIteration1;
- SMESHHOMARD::HOMARD_Cas_var myCase;
// Preferences
int _ConfType; // Le type de conformite ou non conformite