/**\class Model_BodyBuilder
* \ingroup DataModel
- * \brief The body (shape) result of a feature.
+ * \brief Extra API for the ResultBody that allows to work with naming.
*/
class Model_BodyBuilder : public ModelAPI_BodyBuilder
{
/// Request for initialization of data model of the result: adding all attributes
virtual void initAttributes();
- // Retuns the parameters of color definition in the resources config manager
+ /// Retuns the parameters of color definition in the resources config manager
MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
std::string& theDefault);
/// Request for initialization of data model of the result: adding all attributes
virtual void initAttributes();
- // Retuns the parameters of color definition in the resources config manager
+ /// Retuns the parameters of color definition in the resources config manager
MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
std::string& theDefault);
MODEL_EXPORT virtual void closeAll();
//! Starts a new operation (opens a transaction)
+ //! \param theId string-identifier of the started transaction
//! \param theAttachedToNested if it is true, it means that this transaction is attached to the nested
//! where it is located and will be committed on the next commit with the nested
MODEL_EXPORT virtual void startOperation(
/// On operation start/end/abort the "Just" fileds must be cleared and processed in the right way
/// \param theTotalUpdate force to updates everything that has been changed in this operation
+ /// \param theFinish is true for start, close or abort transaction: all objects must be processed
void processOperation(const bool theTotalUpdate, const bool theFinish = false);
/// Performs the feature execution
class ModelAPI_AttributeValidator : public ModelAPI_Validator
{
public:
- //! returns true if attribute is valid
+ //! \returns true if attribute is valid
//! \param theAttribute the checked attribute
//! \param theArguments arguments of the attribute
+ //! \param theError the error string message if validation fails
virtual bool isValid(const AttributePtr& theAttribute,
const std::list<std::string>& theArguments,
std::string& theError) const = 0;
/**\class ModelAPI_BodyBuilder
* \ingroup DataModel
+ * \brief Extra API for the ResultBody that allows to work with naming.
*/
class ModelAPI_BodyBuilder
{
MODELAPI_EXPORT virtual std::shared_ptr<ModelAPI_Document> document() const;
protected:
+ /// Deafult constructor accessible only from Model_Object
MODELAPI_EXPORT ModelAPI_BodyBuilder(ModelAPI_Object* theOwner);
- ModelAPI_Object* myOwner;
+ ModelAPI_Object* myOwner; ///< the owner object this builder belongs to
};
//! Pointer on feature object
//! To virtually destroy the fields of successors
MODELAPI_EXPORT virtual ~ModelAPI_Document();
- //! Creates a construction cresults
+ //! Creates a construction cresult
virtual std::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
- //! Creates a body results
+ //! Creates a body result
virtual std::shared_ptr<ModelAPI_ResultBody> createBody(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
- //! Creates a part results
+ //! Creates a part result
virtual std::shared_ptr<ModelAPI_ResultPart> createPart(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
//! Copies a part result, keeping the reference to the origin
virtual std::shared_ptr<ModelAPI_ResultPart> copyPart(
const std::shared_ptr<ModelAPI_ResultPart>& theOrigin,
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
- //! Creates a group results
+ //! Creates a group result
virtual std::shared_ptr<ModelAPI_ResultGroup> createGroup(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
-
+ //! Creates a parameter result
virtual std::shared_ptr<ModelAPI_ResultParameter> createParameter(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
/// Returns true if feature and/or attributes are valid
/// \param theFeature the validated feature
/// \param theArguments list of string, feature attribute names: dependent attributes
+ /// \param theError the error string message if validation fails
virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
const std::list<std::string>& theArguments,
std::string& theError) const = 0;
/// Returns the result is disabled or not.
MODELAPI_EXPORT virtual bool isDisabled();
- // Returns the parameters of color definition in the resources config manager
+ /// Returns the parameters of color definition in the resources config manager
virtual void colorConfigInfo(std::string& theSection, std::string& theName,
std::string& theDefault) {}
const std::string& theName,int& theTag);
protected:
+ /// Default constructor accessible only from Model_Objects
MODELAPI_EXPORT ModelAPI_ResultBody();
- ModelAPI_BodyBuilder* myBuilder; /// provide the body processing in naming shape
+ ModelAPI_BodyBuilder* myBuilder; ///< provides the body processing in naming shape
};
//! Pointer on feature object
static std::string MY_GROUP = "Parameters";
return MY_GROUP;
}
-
+ /// The computed value attribute Id
inline static const std::string& VALUE()
{
static const std::string MY_VALUE_ID("Value");
return MY_VALUE_ID;
}
+ /// The computational error attribute Id
inline static const std::string& STATE()
{
static const std::string MY_VALUE_ID("State");
return MY_VALUE_ID;
}
+ /// The generic initialization of attributes
virtual void initAttributes() = 0;
+ /// Destructor
MODELAPI_EXPORT ~ModelAPI_ResultParameter();
};