FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmJointSpring.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FM_JOINT_SPRING_H
9 #define FM_JOINT_SPRING_H
10 
11 #include "vpmDB/FmSpringBase.H"
12 
13 class FmJointBase;
14 
15 
17 {
19 
20 public:
21  FmJointSpring();
22 
23  virtual bool disconnect();
24 
25  FmJointBase* getOwnerJoint() const;
26 
27  virtual FmModelMemberBase* getActiveOwner() const;
28 
29  virtual bool isListable() const { return false; }
30  virtual bool isMeasured() const;
31  virtual int getDOF() const;
32  virtual double getModelSpringLength() const;
33 
34  static bool readAndConnect(std::istream& is, std::ostream& os = std::cout);
35  virtual std::ostream& writeFMF(std::ostream& os = std::cout);
36 
37  virtual bool clone(FmBase* obj, int depth);
38 
39  virtual const char* getUITypeName() const { return "Joint spring"; }
40 
41  static int checkJointSprings();
42 
43 protected:
44  virtual ~FmJointSpring();
45 
46  virtual bool cloneLocal(FmBase* obj, int depth);
47 
48  virtual bool getSaveVar(unsigned int& nVar, IntVec& toggles) const;
49 };
50 
51 #endif
std::vector< int > IntVec
Convenience type alias.
Definition: FFaField.H:25
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Definition: FmJointBase.H:22
Definition: FmJointSpring.H:17
static int checkJointSprings()
Definition: FmJointSpring.C:164
virtual ~FmJointSpring()
Definition: FmJointSpring.C:30
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmJointSpring.H:39
virtual FmModelMemberBase * getActiveOwner() const
Definition: FmJointSpring.C:48
virtual double getModelSpringLength() const
Definition: FmJointSpring.C:98
virtual std::ostream & writeFMF(std::ostream &os=std::cout)
Writes out this object in the model database file format.
Definition: FmJointSpring.C:126
virtual bool getSaveVar(unsigned int &nVar, IntVec &toggles) const
Definition: FmJointSpring.C:187
virtual bool isMeasured() const
Definition: FmJointSpring.C:65
virtual bool cloneLocal(FmBase *obj, int depth)
Clones the data fields of *obj into *this.
Definition: FmJointSpring.C:158
static bool readAndConnect(std::istream &is, std::ostream &os=std::cout)
Definition: FmJointSpring.C:135
virtual bool isListable() const
Hook for list view filtering.
Definition: FmJointSpring.H:29
FmJointBase * getOwnerJoint() const
Definition: FmJointSpring.C:116
virtual int getDOF() const
Definition: FmJointSpring.C:107
virtual bool disconnect()
Removes this object from the model database.
Definition: FmJointSpring.C:36
FmJointSpring()
Definition: FmJointSpring.C:20
Base class for all model data objects.
Definition: FmModelMemberBase.H:34
virtual bool clone(FmBase *, int)
Copies the fields of another object into *this.
Definition: FmBase.H:109
Definition: FmSpringBase.H:27