Version: 9.12.0
SALOMEDS_IParameters Class Reference

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 (const std::string &theID="")
 Enables/Disables the dumping visual parameters. More...
 
virtual bool isDumpPython (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...
 

Private Member Functions

 _PTR (AttributeParameter) _ap
 

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::SALOMEDS_IParameters ( const _PTR(AttributeParameter)&  ap)

Constructor.

◆ ~SALOMEDS_IParameters()

SALOMEDS_IParameters::~SALOMEDS_IParameters ( )
virtual

References _compNames.

Member Function Documentation

◆ _PTR()

SALOMEDS_IParameters::_PTR ( AttributeParameter  )
private

◆ append()

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

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References _AP_ENTRIES_LIST_, _AP_LISTS_LIST_, _AP_PROPERTIES_LIST_, and PT_STRARRAY.

Referenced by KERNEL_PY.iparameters.IParameters::append(), setIdParameter(), setParameter(), KERNEL_PY.iparameters.IParameters::setParameter(), setProperty(), and KERNEL_PY.iparameters.IParameters::setProperty().

◆ decodeEntry()

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

Returns decoded entry that is an absolute entry.

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References _compNames, _PTR(), KERNEL::getStudyServant(), and ClientFactory::Study().

◆ encodeEntry()

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.

◆ getAllParameterNames()

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

Returns all parameter names of the given entry.

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

◆ getAllParameterValues()

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

Returns all parameter values of the given entry.

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

◆ getDefaultVisualComponent()

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().

◆ getEntries()

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

Returns a list all entries.

Implements SALOMEDSClient_IParameters.

References _AP_ENTRIES_LIST_, and PT_STRARRAY.

◆ getIdParameter()

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

Gets an id parameter value for the given entry.

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References _PT_ID_, and PT_STRARRAY.

◆ getLists()

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

Returns a list all entries lists.

Implements SALOMEDSClient_IParameters.

References _AP_LISTS_LIST_, and PT_STRARRAY.

◆ getNbParameters()

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

Returns a number of parameters of the given entry.

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

◆ getParameter()

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

Gets a named parameter value for the given entry.

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

◆ getProperties()

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

Returns a list all properties.

Implements SALOMEDSClient_IParameters.

References _AP_PROPERTIES_LIST_, and PT_STRARRAY.

◆ getProperty()

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

Gets a value of global named property.

Implements SALOMEDSClient_IParameters.

References pythfilter::name, and PT_STRING.

◆ getValue()

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 python_test_driver::index, and PT_STRARRAY.

◆ getValues()

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.

◆ isDumpPython()

bool SALOMEDS_IParameters::isDumpPython ( const std::string &  theID = "")
virtual

Returns whether there is the dumping visual parameters.

Implements SALOMEDSClient_IParameters.

References _AP_DUMP_PYTHON_, _PTR(), getDefaultVisualComponent(), KERNEL::getStudyServant(), PT_BOOLEAN, and ClientFactory::Study().

Referenced by setDumpPython().

◆ nbValues()

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

Returns a number elements in the list.

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

References PT_STRARRAY.

◆ parseValue()

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

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

Implements SALOMEDSClient_IParameters.

◆ setDumpPython()

void SALOMEDS_IParameters::setDumpPython ( const std::string &  theID = "")
virtual

◆ setIdParameter()

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.

◆ setParameter()

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.

◆ setProperty()

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(), pythfilter::name, and PT_STRING.

Field Documentation

◆ _compNames

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