Version: 8.3.0
SALOME_StudyEditor Class Reference

#include <SALOME_StudyEditor.hxx>

Public Types

typedef std::vector
< SALOMEDS::SObject_ptr > 
SObjectList
 

Public Member Functions

 SALOME_StudyEditor (int studyId)
 
 SALOME_StudyEditor (SALOMEDS::Study_ptr study)
 
SALOMEDS::SComponent_ptr newRoot (const char *moduleName)
 
SALOMEDS::SComponent_ptr findRoot (const char *moduleName)
 
bool bindEngine (SALOMEDS::SComponent_var studyRoot, Engines::EngineComponent_var engine)
 
SALOMEDS::SObject_ptr newObject (SALOMEDS::SObject_ptr parent)
 
SALOMEDS::SObject_ptr findObject (const char *entry)
 
void setName (SALOMEDS::SObject_var sobject, const char *value)
 
const chargetName (SALOMEDS::SObject_var sobject)
 
void setIcon (SALOMEDS::SObject_var sobject, const char *resourcename)
 This function specifies which resource file is to be used to associate an icon to the specified object. More...
 
void setParameterInt (SALOMEDS::SObject_var sobject, const char *name, int value)
 Add a parameter attribute of type integer or simply set its value if it already exists. More...
 
int getParameterInt (SALOMEDS::SObject_var sobject, const char *name)
 
void setParameterBool (SALOMEDS::SObject_var sobject, const char *name, bool value)
 Add a parameter attribute of type boolean or simply set its value if it already exists. More...
 
bool getParameterBool (SALOMEDS::SObject_var sobject, const char *name)
 

Static Public Attributes

static const int UNDEFINED = -1
 

Protected Member Functions

 SALOME_StudyEditor ()
 Canonic constructor. More...
 
void setStudy (SALOMEDS::Study_ptr study)
 
void setStudyById (int studyId)
 
int getStudyId ()
 

Protected Attributes

SALOMEDS::Study_var _study
 

Private Attributes

SALOMEDS::StudyBuilder_var _sbuilder
 

Member Typedef Documentation

typedef std::vector<SALOMEDS::SObject_ptr> SALOME_StudyEditor::SObjectList

Constructor & Destructor Documentation

SALOME_StudyEditor::SALOME_StudyEditor ( int  studyId)

References setStudyById().

SALOME_StudyEditor::SALOME_StudyEditor ( SALOMEDS::Study_ptr  study)

References setStudy().

SALOME_StudyEditor::SALOME_StudyEditor ( )
protected

Canonic constructor.

The object can't be used without a setStudy()

Member Function Documentation

bool SALOME_StudyEditor::bindEngine ( SALOMEDS::SComponent_var  studyRoot,
Engines::EngineComponent_var  engine 
)

References _sbuilder.

SALOMEDS::SObject_ptr SALOME_StudyEditor::findObject ( const char entry)

References _study.

SALOMEDS::SComponent_ptr SALOME_StudyEditor::findRoot ( const char moduleName)

References _study.

Referenced by newRoot().

const char * SALOME_StudyEditor::getName ( SALOMEDS::SObject_var  sobject)
bool SALOME_StudyEditor::getParameterBool ( SALOMEDS::SObject_var  sobject,
const char name 
)
int SALOME_StudyEditor::getParameterInt ( SALOMEDS::SObject_var  sobject,
const char name 
)

References UNDEFINED.

int SALOME_StudyEditor::getStudyId ( )
protected

References _study, and UNDEFINED.

SALOMEDS::SObject_ptr SALOME_StudyEditor::newObject ( SALOMEDS::SObject_ptr  parent)

References _sbuilder.

SALOMEDS::SComponent_ptr SALOME_StudyEditor::newRoot ( const char moduleName)

References _sbuilder, and findRoot().

void SALOME_StudyEditor::setIcon ( SALOMEDS::SObject_var  sobject,
const char resourcename 
)

This function specifies which resource file is to be used to associate an icon to the specified object.

Note that even if the icon as no sens outside the GUI context, it can be defined here because only the resource name is provided. The effective rendering is done in the object browser of course, and use this string attribute. WARN: note that the resource name is supposed to be the base name of a file managed by the SALOME resource manager (i.e. a file located in the directory specified in the SalomeApp.xml).

References _sbuilder.

void SALOME_StudyEditor::setName ( SALOMEDS::SObject_var  sobject,
const char value 
)

References _sbuilder.

void SALOME_StudyEditor::setParameterBool ( SALOMEDS::SObject_var  sobject,
const char name,
bool  value 
)

Add a parameter attribute of type boolean or simply set its value if it already exists.

References _sbuilder.

void SALOME_StudyEditor::setParameterInt ( SALOMEDS::SObject_var  sobject,
const char name,
int  value 
)

Add a parameter attribute of type integer or simply set its value if it already exists.

References _sbuilder.

void SALOME_StudyEditor::setStudy ( SALOMEDS::Study_ptr  study)
protected

References _sbuilder, and _study.

Referenced by SALOME_StudyEditor(), and setStudyById().

void SALOME_StudyEditor::setStudyById ( int  studyId)
protected

Field Documentation

SALOMEDS::StudyBuilder_var SALOME_StudyEditor::_sbuilder
private
SALOMEDS::Study_var SALOME_StudyEditor::_study
protected
const int SALOME_StudyEditor::UNDEFINED = -1
static

Referenced by getParameterInt(), and getStudyId().