Skip to content

Commit

Permalink
FEM: Add documentation to Analysis.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Hovorka committed Jun 12, 2019
1 parent 1a244a8 commit e7b3bc2
Showing 1 changed file with 43 additions and 15 deletions.
58 changes: 43 additions & 15 deletions src/Mod/Fem/App/FemAnalysis.h
Expand Up @@ -20,41 +20,69 @@
* *
***************************************************************************/


#ifndef Fem_FemAnalysis_H
#define Fem_FemAnalysis_H


#include <App/DocumentObjectGroup.h>
#include <App/PropertyLinks.h>
#include <App/FeaturePython.h>



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 {
return "FemGui::ViewProviderFemAnalysis";
}

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
Expand Down

0 comments on commit e7b3bc2

Please sign in to comment.