FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmIsControlledBase.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 /***************************************************************************
9  * CLASS: FmIsControlledBase
10  * AUTHOR: Jens LIEN
11  * LAST MODIFIED: 14 jun 1995
12  *
13  * DESCRIPTION:
14  * Parent class for the database entries.
15  * Has an additional element for the controlled ring.
16  **************************************************************************/
17 
18 #ifndef FM_IS_CONTROLLED_BASE_H
19 #define FM_IS_CONTROLLED_BASE_H
20 
21 #include "vpmDB/FmIsPlottedBase.H"
22 #include "vpmDB/FmEngine.H"
24 
25 
27 {
29 
30 public:
31  FmEngine* getEngine() const { return myEngine.getPointer(); }
32  bool setEngine(FmEngine* ctrl) { myEngine.setRef(ctrl); return true; }
33 
34  virtual FmModelMemberBase* getActiveOwner() const { return const_cast<FmIsControlledBase*>(this); }
35 
36 protected:
38 
39  virtual bool cloneLocal(FmBase* obj, int depth);
40 
41 private:
44 };
45 
46 #endif
Classes representing guarded pointers.
bool setRef(FFaFieldContainer *ptr)
Sets the pointer value from a FFaFieldContainer pointer directly.
Definition: FFaReference.C:78
Type * getPointer() const
Returns the type-casted pointer this reference points to.
Definition: FFaReference.H:234
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Definition: FmEngine.H:28
Definition: FmIsControlledBase.H:27
FFaField< FFaReferenceBase * > myEngineField
Definition: FmIsControlledBase.H:43
FmIsControlledBase()
Definition: FmIsControlledBase.C:14
bool setEngine(FmEngine *ctrl)
Definition: FmIsControlledBase.H:32
virtual bool cloneLocal(FmBase *obj, int depth)
Clones the data fields of *obj into *this.
Definition: FmIsControlledBase.C:25
FmEngine * getEngine() const
Definition: FmIsControlledBase.H:31
FFaReference< FmEngine > myEngine
Definition: FmIsControlledBase.H:42
virtual FmModelMemberBase * getActiveOwner() const
Definition: FmIsControlledBase.H:34
Definition: FmIsPlottedBase.H:17
Base class for all model data objects.
Definition: FmModelMemberBase.H:34