Version: 8.3.0
SALOMEDS_IParameters Class Referenceabstract

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

#include <SALOMEDS_IParameters.hxx>

Inheritance diagram for SALOMEDS_IParameters:

Public Member Functions

 SALOMEDS_IParameters (const _PTR(AttributeParameter)&ap)
 Constructor. More...
 
virtual ~SALOMEDS_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::vector< std::string > parseValue (const std::string &value, const char separator, bool fromEnd=true)
 Breaks a value string in two parts which is divided by separator. More...
 
virtual std::string encodeEntry (const std::string &entry, const std::string &compName)
 Returns encoded entry that is a relative entry for the component. More...
 
virtual std::string decodeEntry (const std::string &entry)
 Returns decoded entry that is an absolute entry. More...
 
virtual void setDumpPython (_PTR(Study) study, const std::string &theID="")
 Enables/Disables the dumping visual parameters. More...
 
virtual bool isDumpPython (_PTR(Study) study, const std::string &theID="")
 Returns whether there is the dumping visual parameters. More...
 
virtual std::string getDefaultVisualComponent ()
 Returns a default name of the component where the visula parameters are stored. More...
 
virtual void setDumpPython (clt_shared_ptr< SALOMEDSClient_Study > study, const std::string &theID="")=0
 Enables/Disables the dumping visual parameters, static implementation is supposed. More...
 
virtual bool isDumpPython (clt_shared_ptr< SALOMEDSClient_Study > study, const std::string &theID="")=0
 Returns whether there is the dumping visual parameters, static implementation is supposed. More...
 

Private Member Functions

 _PTR (AttributeParameter) _ap
 
 _PTR (Study) _study
 

Private Attributes

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

Detailed Description

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

Constructor & Destructor Documentation

SALOMEDS_IParameters::SALOMEDS_IParameters ( const _PTR(AttributeParameter)&  ap)

Constructor.

References _PTR().

SALOMEDS_IParameters::~SALOMEDS_IParameters ( )
virtual

References _compNames.

Member Function Documentation

SALOMEDS_IParameters::_PTR ( AttributeParameter  )
private
SALOMEDS_IParameters::_PTR ( Study  )
private
int SALOMEDS_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

Implements SALOMEDSClient_IParameters.

References _AP_ENTRIES_LIST_, _AP_LISTS_LIST_, _AP_PROPERTIES_LIST_, and PT_STRARRAY.

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

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

Returns decoded entry that is an absolute entry.

Implements SALOMEDSClient_IParameters.

References _compNames, and _PTR().

std::string SALOMEDS_IParameters::encodeEntry ( const std::string &  entry,
const std::string &  compName 
)
virtual

Returns encoded entry that is a relative entry for the component.

Implements SALOMEDSClient_IParameters.

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

Returns all parameter names of the given entry.

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

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

Returns all parameter values of the given entry.

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

std::string SALOMEDS_IParameters::getDefaultVisualComponent ( )
virtual

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

Implements SALOMEDSClient_IParameters.

Referenced by isDumpPython(), and setDumpPython().

std::vector< std::string > SALOMEDS_IParameters::getEntries ( )
virtual

Returns a list all entries.

Implements SALOMEDSClient_IParameters.

References _AP_ENTRIES_LIST_, and PT_STRARRAY.

std::string SALOMEDS_IParameters::getIdParameter ( const std::string &  entry)
virtual

Gets an id parameter value for the given entry.

Implements SALOMEDSClient_IParameters.

References _PT_ID_, and PT_STRARRAY.

std::vector< std::string > SALOMEDS_IParameters::getLists ( )
virtual

Returns a list all entries lists.

Implements SALOMEDSClient_IParameters.

References _AP_LISTS_LIST_, and PT_STRARRAY.

int SALOMEDS_IParameters::getNbParameters ( const std::string &  entry)
virtual

Returns a number of parameters of the given entry.

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

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

Gets a named parameter value for the given entry.

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

std::vector< std::string > SALOMEDS_IParameters::getProperties ( )
virtual

Returns a list all properties.

Implements SALOMEDSClient_IParameters.

References _AP_PROPERTIES_LIST_, and PT_STRARRAY.

std::string SALOMEDS_IParameters::getProperty ( const std::string &  name)
virtual

Gets a value of global named property.

Implements SALOMEDSClient_IParameters.

References PT_STRING.

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

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

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

std::vector< std::string > SALOMEDS_IParameters::getValues ( const std::string &  listName)
virtual

Returns a list of values in the list.

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

virtual bool SALOMEDSClient_IParameters::isDumpPython ( clt_shared_ptr< SALOMEDSClient_Study study,
const std::string &  theID = "" 
)
pure virtualinherited

Returns whether there is the dumping visual parameters, static implementation is supposed.

bool SALOMEDS_IParameters::isDumpPython ( _PTR(Study)  study,
const std::string &  theID = "" 
)
virtual

Returns whether there is the dumping visual parameters.

References _AP_DUMP_PYTHON_, _PTR(), getDefaultVisualComponent(), and PT_BOOLEAN.

Referenced by setDumpPython().

int SALOMEDS_IParameters::nbValues ( const std::string &  listName)
virtual

Returns a number elements in the list.

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

std::vector< std::string > SALOMEDS_IParameters::parseValue ( const std::string &  value,
const char  separator,
bool  fromEnd = true 
)
virtual

Breaks a value string in two parts which is divided by separator.

If fromEnd is True the search of separator starts from the end of the string

Implements SALOMEDSClient_IParameters.

virtual void SALOMEDSClient_IParameters::setDumpPython ( clt_shared_ptr< SALOMEDSClient_Study study,
const std::string &  theID = "" 
)
pure virtualinherited

Enables/Disables the dumping visual parameters, static implementation is supposed.

void SALOMEDS_IParameters::setDumpPython ( _PTR(Study)  study,
const std::string &  theID = "" 
)
virtual

Enables/Disables the dumping visual parameters.

References _AP_DUMP_PYTHON_, _PTR(), getDefaultVisualComponent(), and isDumpPython().

void SALOMEDS_IParameters::setIdParameter ( const std::string &  entry,
const std::string &  value 
)
virtual

Sets an id parameter value for the given entry.

Implements SALOMEDSClient_IParameters.

References _AP_ENTRIES_LIST_, _PT_ID_, append(), and PT_STRARRAY.

void SALOMEDS_IParameters::setParameter ( const std::string &  entry,
const std::string &  parameterName,
const std::string &  value 
)
virtual

Sets a new named parameter value for the given entry.

Implements SALOMEDSClient_IParameters.

References _AP_ENTRIES_LIST_, append(), and PT_STRARRAY.

void SALOMEDS_IParameters::setProperty ( const std::string &  name,
const std::string &  value 
)
virtual

Sets a global named property value.

Implements SALOMEDSClient_IParameters.

References _AP_PROPERTIES_LIST_, append(), and PT_STRING.

Field Documentation

std::map<std::string, std::string> SALOMEDS_IParameters::_compNames
private