#include "SALOME_GenericObj.idl"
+module SALOMEDS
+{
+ interface Study;
+};
+
/*! \brief
This package contains the interfaces used for notebook
(model parametrization) functionality
//! Return string array containing information about parameters used by given string attribute
StringArray GetAttributeParameters( in string theStringAttribute );
+
+ //! Return pointer to study
+ SALOMEDS::Study GetStudy();
};
};
return GenerateList( aRes );
}
+SALOMEDS::Study_ptr SALOME_Notebook::GetStudy()
+{
+ return myStudy.in();
+}
+
int SALOME_Notebook::GetNewId()
{
return ++myMaxId;
virtual SALOME::StringArray* GetParameters( const char* theParamName );
virtual SALOME::StringArray* GetAttributeParameters( const char* theStringAttribute );
+ virtual SALOMEDS::Study_ptr GetStudy();
+
SALOME_Parameter* GetParameterPtr( const char* theParamName ) const;
void Update( bool theOnlyParameters );
void UpdateAnonymous( const std::string& theOldName, const std::string& theNewName );
#include <SALOME_ParameterizedObject.hxx>
+SALOME_ParameterizedObject::SALOME_ParameterizedObject()
+{
+}
+
SALOME_ParameterizedObject::SALOME_ParameterizedObject( SALOME::Notebook_ptr theNotebook )
{
myNotebook = theNotebook;
if( !CORBA::is_nil( myNotebook ) )
myNotebook->RemoveObject( _this() );
}
+
+void SALOME_ParameterizedObject::SetNotebook( SALOME::Notebook_ptr theNotebook )
+{
+ myNotebook = theNotebook;
+}
+
+SALOME::Notebook_ptr SALOME_ParameterizedObject::GetNotebook()
+{
+ return myNotebook.in();
+}
class SALOME_ParameterizedObject : public virtual POA_SALOME::ParameterizedObject, public virtual SALOME::GenericObj_i
{
public:
+ SALOME_ParameterizedObject();
SALOME_ParameterizedObject( SALOME::Notebook_ptr theNotebook );
- virtual void BeforeDeactivate();
+ virtual void BeforeDeactivate();
+
+ void SetNotebook( SALOME::Notebook_ptr theNotebook );
+ SALOME::Notebook_ptr GetNotebook();
private:
SALOME::Notebook_var myNotebook;
SALOMEDS::SComponent_ptr aNotebookComponent = Study->FindComponent( "NOTEBOOK" );
- SALOMEDS::StudyBuilder_var aBuilder = Study->NewBuilder();
- aBuilder->LoadWith( aNotebookComponent, SALOME_NotebookDriver::getInstance() );
-
+ if(!CORBA::is_nil(aNotebookComponent)) {
+ SALOMEDS::StudyBuilder_var aBuilder = Study->NewBuilder();
+ aBuilder->LoadWith( aNotebookComponent, SALOME_NotebookDriver::getInstance() );
+ }
// Notebook creation
//SALOME::Notebook_var aNotebookVar = Study->GetNotebook();