1 // Copyright (C) 2006 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef SALOMEDSClient_IParameters_H
20 #define SALOMEDSClient_IParameters_H
26 #include "SALOMEDSClient_definitions.hxx"
27 #include "SALOMEDSClient_AttributeParameter.hxx"
30 Class which an interface to store the parameters of the objects
32 class SALOMEDSClient_IParameters
36 virtual ~SALOMEDSClient_IParameters() {}
39 Appends a string value to a named list.
40 Returns a number of the added value.
41 Note: the name of the list MUST be unique
43 virtual int append(const std::string& listName, const std::string& value) = 0;
46 Returns a number elements in the list
48 virtual int nbValues(const std::string& listName) = 0;
51 Returns a list of values in the list
53 virtual std::vector<std::string> getValues(const std::string& listName) = 0;
56 Returns a value with given %index, where %index is in range [0:nbValues-1]
58 virtual std::string getValue(const std::string& listName, int index) = 0;
61 Returns a list all entries lists
63 virtual std::vector<std::string> getLists() = 0;
66 Sets a new named parameter value for the given entry
68 virtual void setParameter(const std::string& entry, const std::string& parameterName, const std::string& value) = 0;
71 Gets a named parameter value for the given entry
73 virtual std::string getParameter(const std::string& entry, const std::string& parameterName) = 0;
76 Returns all parameter names of the given entry
78 virtual std::vector<std::string> getAllParameterNames(const std::string& entry) = 0;
81 Returns all parameter values of the given entry
83 virtual std::vector<std::string> getAllParameterValues(const std::string& entry) = 0;
86 Returns a number of parameters of the given entry
88 virtual int getNbParameters(const std::string& entry) = 0;
91 Returns a list all entries
93 virtual std::vector<std::string> getEntries() = 0;
96 Sets a global named property value
98 virtual void setProperty(const std::string& name, const std::string& value) = 0;
101 Gets a value of global named property
103 virtual std::string getProperty(const std::string& name) = 0;
106 Returns a list all properties
108 virtual std::vector<std::string> getProperties() = 0;
111 Breaks a value string in two parts which is divided by %separator.
112 If fromEnd is True the search of separator starts from the end of the string
114 virtual std::vector<std::string> parseValue(const std::string& value, const char separator, bool fromEnd = true) = 0;
118 Returns encoded entry that is a relative entry for the component
120 virtual std::string encodeEntry(const std::string& entry, const std::string& compName) = 0;
123 Returns decoded entry that is an absolute entry
125 virtual std::string decodeEntry(const std::string& entry) = 0;
128 Enables/Disables the dumping visual parameters, static implementation is supposed
130 virtual void setDumpPython(_PTR(Study) study, const std::string& theID = "") = 0;
133 Returns whether there is the dumping visual parameters, static implementation is supposed
135 virtual bool isDumpPython(_PTR(Study) study, const std::string& theID = "") = 0;
138 Returns a default name of the component where the visula parameters are stored.
139 Static implementation is supposed
141 virtual std::string getDefaultVisualComponent() = 0;