$result = SWIG_NewPointerObj( (void*) ptr, $1_descriptor, 1 );
}
+// std::list -> []
+%template(SelectionList) std::list<ModelHighAPI_Selection>;
+%template(RefAttrList) std::list<ModelHighAPI_RefAttr>;
+
// all supported interfaces
%include "ModelHighAPI_Double.h"
%include "ModelHighAPI_Integer.h"
%include "ModelHighAPI_Selection.h"
%include "ModelHighAPI_Macro.h"
%include "ModelHighAPI_Tools.h"
-
-%template(SelectionList) std::list<ModelHighAPI_Selection>;
-%template(RefAttrList) std::list<ModelHighAPI_RefAttr>;
ParametersAPI_Parameter::ParametersAPI_Parameter(
const std::shared_ptr<ModelAPI_Feature> & theFeature,
const std::string & theName,
- const ModelHighAPI_Double & theExpression)
+ const std::string & theExpression,
+ const std::string & theComment)
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
fillAttribute(theName, name());
fillAttribute(theExpression, expression());
+ fillAttribute(theComment, comment());
execute();
}
//--------------------------------------------------------------------------------------
ParameterPtr addParameter(const std::shared_ptr<ModelAPI_Document> & theParameter,
const std::string & theName,
- const ModelHighAPI_Double & theExpression)
+ const std::string & theExpression,
+ const std::string & theComment)
{
// TODO(spo): check that theParameter is not empty
std::shared_ptr<ModelAPI_Feature> aFeature = theParameter->addFeature(ParametersAPI_Parameter::ID());
- return ParameterPtr(new ParametersAPI_Parameter(aFeature));
+ return ParameterPtr(new ParametersAPI_Parameter(aFeature, theName, theExpression, theComment));
}
PARAMETERSAPI_EXPORT
explicit ParametersAPI_Parameter(const std::shared_ptr<ModelAPI_Feature> & theFeature,
const std::string & theName,
- const ModelHighAPI_Double & theExpression);
+ const std::string & theExpression,
+ const std::string & theComment = std::string());
/// Destructor
PARAMETERSAPI_EXPORT
virtual ~ParametersAPI_Parameter();
- INTERFACE_2(ParametersPlugin_Parameter::ID(),
+ INTERFACE_3(ParametersPlugin_Parameter::ID(),
name, ParametersPlugin_Parameter::VARIABLE_ID(), ModelAPI_AttributeString, /** Name */,
- expression, ParametersPlugin_Parameter::EXPRESSION_ID(), ModelAPI_AttributeDouble, /** Expression */
+ expression, ParametersPlugin_Parameter::EXPRESSION_ID(), ModelAPI_AttributeString, /** Expression */,
+ comment, ParametersPlugin_Parameter::COMMENT_ID(), ModelAPI_AttributeString, /** Comment */
)
};
PARAMETERSAPI_EXPORT
ParameterPtr addParameter(const std::shared_ptr<ModelAPI_Document> & thePart,
const std::string & theName,
- const ModelHighAPI_Double & theExpression);
+ const std::string & theExpression,
+ const std::string & theComment = std::string());
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------