mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-23 04:15:37 +05:00
Implementation of GetEntry(), Set/GetParameters()
This commit is contained in:
parent
a2d993375a
commit
72d914068e
@ -145,7 +145,9 @@ bool SMESH_Hypothesis_i::IsPublished(){
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
char* SMESH_Hypothesis_i::GetEntry()
|
char* SMESH_Hypothesis_i::GetEntry()
|
||||||
{
|
{
|
||||||
return NULL;
|
char aBuf[100];
|
||||||
|
sprintf( aBuf, "%i", GetId() );
|
||||||
|
return CORBA::string_dup( aBuf );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -177,18 +179,11 @@ CORBA::Boolean SMESH_Hypothesis_i::IsValid()
|
|||||||
//void SMESH_Hypothesis_i::SetParameters(const char* theParameters)
|
//void SMESH_Hypothesis_i::SetParameters(const char* theParameters)
|
||||||
void SMESH_Hypothesis_i::SetParameters( SALOME::Notebook_ptr theNotebook, const SALOME::StringArray& theParameters )
|
void SMESH_Hypothesis_i::SetParameters( SALOME::Notebook_ptr theNotebook, const SALOME::StringArray& theParameters )
|
||||||
{
|
{
|
||||||
/*
|
std::list<std::string> aParams;
|
||||||
SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
|
int n = theParameters.length();
|
||||||
char * aParameters = CORBA::string_dup(theParameters);
|
for( int i=0; i<n; i++ )
|
||||||
if(gen){
|
aParams.push_back( theParameters[i].in() );
|
||||||
if(IsPublished()) {
|
myBaseImpl->SetParameters( aParams );
|
||||||
SMESH_Gen_i::GetSMESHGen()->UpdateParameters(SMESH::SMESH_Hypothesis::_narrow(_this()),aParameters);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
myBaseImpl->SetParameters(gen->ParseParameters(aParameters));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -200,20 +195,13 @@ void SMESH_Hypothesis_i::SetParameters( SALOME::Notebook_ptr theNotebook, const
|
|||||||
//char* SMESH_Hypothesis_i::GetParameters()
|
//char* SMESH_Hypothesis_i::GetParameters()
|
||||||
SALOME::StringArray* SMESH_Hypothesis_i::GetParameters()
|
SALOME::StringArray* SMESH_Hypothesis_i::GetParameters()
|
||||||
{
|
{
|
||||||
/*
|
std::list<std::string> aParams = myBaseImpl->GetParameters();
|
||||||
SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
|
SALOME::StringArray_var aRes = new SALOME::StringArray();
|
||||||
char* aResult;
|
aRes->length( aParams.size() );
|
||||||
if(IsPublished()) {
|
std::list<std::string>::const_iterator it = aParams.begin(), last = aParams.end();
|
||||||
MESSAGE("SMESH_Hypothesis_i::GetParameters() : Get Parameters from SObject");
|
for( int i=0; it!=last; it++, i++ )
|
||||||
aResult = gen->GetParameters(SMESH::SMESH_Hypothesis::_narrow(_this()));
|
aRes[i] = CORBA::string_dup( it->c_str() );
|
||||||
}
|
return aRes._retn();
|
||||||
else {
|
|
||||||
MESSAGE("SMESH_Hypothesis_i::GetParameters() : Get local parameters");
|
|
||||||
aResult = myBaseImpl->GetParameters();
|
|
||||||
}
|
|
||||||
return CORBA::string_dup(aResult);
|
|
||||||
*/
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user