Version: 8.3.0
SALOMEDSImpl_IParameters Class Reference

Class which an interface to store the parameters of the objects. More...

#include <SALOMEDSImpl_IParameters.hxx>

Public Member Functions

 SALOMEDSImpl_IParameters (SALOMEDSImpl_AttributeParameter *ap)
 Constructor. More...
 
virtual ~SALOMEDSImpl_IParameters ()
 
virtual int append (const std::string &listName, const std::string &value)
 Appends a string value to a named list. More...
 
virtual int nbValues (const std::string &listName)
 Returns a number elements in the list. More...
 
virtual std::vector< std::string > getValues (const std::string &listName)
 Returns a list of values in the list. More...
 
virtual std::string getValue (const std::string &listName, int index)
 Returns a value with given index, where index is in range [0:nbValues-1]. More...
 
virtual std::vector< std::string > getLists ()
 Returns a list all entries lists. More...
 
virtual void setParameter (const std::string &entry, const std::string &parameterName, const std::string &value)
 Sets a new named parameter value for the given entry. More...
 
virtual std::string getParameter (const std::string &entry, const std::string &parameterName)
 Gets a named parameter value for the given entry. More...
 
virtual void setIdParameter (const std::string &entry, const std::string &value)
 Sets an id parameter value for the given entry. More...
 
virtual std::string getIdParameter (const std::string &entry)
 Gets an id parameter value for the given entry. More...
 
virtual std::vector< std::string > getAllParameterNames (const std::string &entry)
 Returns all parameter names of the given entry. More...
 
virtual std::vector< std::string > getAllParameterValues (const std::string &entry)
 Returns all parameter values of the given entry. More...
 
virtual int getNbParameters (const std::string &entry)
 Returns a number of parameters of the given entry. More...
 
virtual std::vector< std::string > getEntries ()
 Returns a list all entries. More...
 
virtual void setProperty (const std::string &name, const std::string &value)
 Sets a global named property value. More...
 
virtual std::string getProperty (const std::string &name)
 Gets a value of global named property. More...
 
virtual std::vector< std::string > getProperties ()
 Returns a list all properties. More...
 
virtual std::string decodeEntry (const std::string &entry)
 Returns decoded entry that is an absolute entry. More...
 

Static Public Member Functions

static bool isDumpPython (SALOMEDSImpl_Study *study, const std::string &theID="")
 Returns whether there is the dumping visual parameters. More...
 
static int getLastSavePoint (SALOMEDSImpl_Study *study, const std::string &theID="")
 Returns an ID of the last save point. More...
 
static std::string getStudyScript (SALOMEDSImpl_Study *study, int savePoint, const std::string &theID="")
 Returns a Python script for the study, which sets up visual parameters. More...
 
static std::string getDefaultScript (SALOMEDSImpl_Study *study, const std::string &moduleName, const std::string &shift, const std::string &theID="")
 Returns a default Python script that set ups visual parameters for the given module shift is a string that contain spaces to make valid Python script indentaion. More...
 
static std::string getDefaultVisualComponent ()
 Returns a default name of the component where the visula parameters are stored. More...
 

Private Attributes

SALOMEDSImpl_AttributeParameter_ap
 
SALOMEDSImpl_Study_study
 
std::map< std::string,
std::string > 
_compNames
 

Detailed Description

Class which an interface to store the parameters of the objects.

Constructor & Destructor Documentation

SALOMEDSImpl_IParameters::SALOMEDSImpl_IParameters ( SALOMEDSImpl_AttributeParameter ap)
SALOMEDSImpl_IParameters::~SALOMEDSImpl_IParameters ( )
virtual

References _compNames.

Member Function Documentation

int SALOMEDSImpl_IParameters::append ( const std::string &  listName,
const std::string &  value 
)
virtual

Appends a string value to a named list.

Returns a number of the added value. Note: the name of the list MUST be unique

References _ap, _AP_ENTRIES_LIST_, _AP_LISTS_LIST_, _AP_PROPERTIES_LIST_, SALOMEDSImpl_AttributeParameter::GetStrArray(), SALOMEDSImpl_AttributeParameter::IsSet(), PT_STRARRAY, and SALOMEDSImpl_AttributeParameter::SetStrArray().

Referenced by setIdParameter(), setParameter(), and setProperty().

std::string SALOMEDSImpl_IParameters::decodeEntry ( const std::string &  entry)
virtual

Returns decoded entry that is an absolute entry.

References _compNames, _study, SALOMEDSImpl_Study::FindComponent(), and SALOMEDSImpl_SObject::GetID().

Referenced by getDefaultScript().

std::vector< std::string > SALOMEDSImpl_IParameters::getAllParameterNames ( const std::string &  entry)
virtual

Returns all parameter names of the given entry.

References _ap, SALOMEDSImpl_AttributeParameter::GetStrArray(), SALOMEDSImpl_AttributeParameter::IsSet(), and PT_STRARRAY.

Referenced by getDefaultScript().

std::vector< std::string > SALOMEDSImpl_IParameters::getAllParameterValues ( const std::string &  entry)
virtual

Returns all parameter values of the given entry.

References _ap, SALOMEDSImpl_AttributeParameter::GetStrArray(), SALOMEDSImpl_AttributeParameter::IsSet(), and PT_STRARRAY.

Referenced by getDefaultScript().

std::string SALOMEDSImpl_IParameters::getDefaultScript ( SALOMEDSImpl_Study study,
const std::string &  moduleName,
const std::string &  shift,
const std::string &  theID = "" 
)
static
std::string SALOMEDSImpl_IParameters::getDefaultVisualComponent ( )
static

Returns a default name of the component where the visula parameters are stored.

Referenced by getDefaultScript(), SALOMEDS_DriverFactory_i::GetDriverByType(), getLastSavePoint(), getStudyScript(), isDumpPython(), and SALOMEDSImpl_StudyManager::Open().

std::vector< std::string > SALOMEDSImpl_IParameters::getEntries ( )
virtual
std::string SALOMEDSImpl_IParameters::getIdParameter ( const std::string &  entry)
virtual

Gets an id parameter value for the given entry.

References _ap, _PT_ID_, SALOMEDSImpl_AttributeParameter::GetStrArray(), SALOMEDSImpl_AttributeParameter::IsSet(), and PT_STRARRAY.

std::vector< std::string > SALOMEDSImpl_IParameters::getLists ( )
virtual
int SALOMEDSImpl_IParameters::getNbParameters ( const std::string &  entry)
virtual

Returns a number of parameters of the given entry.

References _ap, SALOMEDSImpl_AttributeParameter::GetStrArray(), SALOMEDSImpl_AttributeParameter::IsSet(), and PT_STRARRAY.

std::string SALOMEDSImpl_IParameters::getParameter ( const std::string &  entry,
const std::string &  parameterName 
)
virtual

Gets a named parameter value for the given entry.

References _ap, SALOMEDSImpl_AttributeParameter::GetStrArray(), SALOMEDSImpl_AttributeParameter::IsSet(), and PT_STRARRAY.

std::vector< std::string > SALOMEDSImpl_IParameters::getProperties ( )
virtual
std::string SALOMEDSImpl_IParameters::getProperty ( const std::string &  name)
virtual
std::string SALOMEDSImpl_IParameters::getStudyScript ( SALOMEDSImpl_Study study,
int  savePoint,
const std::string &  theID = "" 
)
static

Returns a Python script for the study, which sets up visual parameters.

References SALOMEDSImpl_Study::GetCommonParameters(), getDefaultVisualComponent(), getLists(), getProperties(), getProperty(), and getValues().

Referenced by SALOMEDSImpl_Study::DumpStudy().

std::string SALOMEDSImpl_IParameters::getValue ( const std::string &  listName,
int  index 
)
virtual

Returns a value with given index, where index is in range [0:nbValues-1].

References _ap, SALOMEDSImpl_AttributeParameter::GetStrArray(), SALOMEDSImpl_AttributeParameter::IsSet(), and PT_STRARRAY.

std::vector< std::string > SALOMEDSImpl_IParameters::getValues ( const std::string &  listName)
virtual
bool SALOMEDSImpl_IParameters::isDumpPython ( SALOMEDSImpl_Study study,
const std::string &  theID = "" 
)
static
int SALOMEDSImpl_IParameters::nbValues ( const std::string &  listName)
virtual
void SALOMEDSImpl_IParameters::setIdParameter ( const std::string &  entry,
const std::string &  value 
)
virtual
void SALOMEDSImpl_IParameters::setParameter ( const std::string &  entry,
const std::string &  parameterName,
const std::string &  value 
)
virtual
void SALOMEDSImpl_IParameters::setProperty ( const std::string &  name,
const std::string &  value 
)
virtual

Field Documentation

std::map<std::string, std::string> SALOMEDSImpl_IParameters::_compNames
private
SALOMEDSImpl_Study* SALOMEDSImpl_IParameters::_study
private