diff --git a/src/Mod/Fem/App/FemAnalysis.h b/src/Mod/Fem/App/FemAnalysis.h index 2c9458c2dd74..360e003d4361 100644 --- a/src/Mod/Fem/App/FemAnalysis.h +++ b/src/Mod/Fem/App/FemAnalysis.h @@ -20,30 +20,51 @@ * * ***************************************************************************/ - #ifndef Fem_FemAnalysis_H #define Fem_FemAnalysis_H - #include #include #include - -namespace Fem -{ - -class AppFemExport FemAnalysis : public App::DocumentObjectGroup -{ +namespace Fem { + +/** + * @brief Container of objects relevant to one simulation. + * + * @detailed + * A Analysis contains all objects nessesary for a complete specification + * of a simulation. After computing it also contains the result of the + * simulation. The Analysis object is just a container. It is not reponsible + * for anything else like executing the simulation. + * + * The Analysis class is essentially a DocumentObjectGroup. It handles all + * the container stuff. The difference is that the Analysis document object + * uses a different ViewProvider, has a Uid property and does some + * compability handling via handleChangedPropertyName. + * + * This implies that it is not checked which objects are put into the + * Analsis object. Every document object of FreeCAD can be part of a + * Analysis. + */ +class AppFemExport FemAnalysis : public App::DocumentObjectGroup { PROPERTY_HEADER(Fem::FemAnalysis); public: - /// Constructor - FemAnalysis(void); + /* + * Uses Base::Uuid to initialize the Uid property to a newly generated + * unique id because PropertyUUID doesn't initialize itself. + */ + FemAnalysis(); virtual ~FemAnalysis(); - /// unique identifier of the Analysis + /** + * A unique identifier for each Analysis object. Useful when doing + * filesystem operations because it can provide a unique file or + * directory name for an analysis. Retains its value across save/load + * cycles. + */ App::PropertyUUID Uid; virtual const char* getViewProviderName() const { @@ -51,10 +72,17 @@ class AppFemExport FemAnalysis : public App::DocumentObjectGroup } protected: - /// Support of backward compatibility - virtual void handleChangedPropertyName(Base::XMLReader &reader, - const char * TypeName, - const char *PropName); + /** + * @brief Retain compability with old "Member" property. + * + * @detail + * In an older version of FreeCAD FemAnalysis handles it's member itself + * in a property called "Member". Now this is handled in the "Group" + * property of DocumentObjectGroup. This methods translates old files + * still using the "Member" property. + */ + virtual void handleChangedPropertyName( + Base::XMLReader &reader, const char * TypeName, const char *PropName); }; class AppFemExport DocumentObject : public App::DocumentObject