FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmFileReference.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_FILE_REFERENCE_H
9 #define FM_FILE_REFERENCE_H
10 
12 
13 typedef std::pair< std::string,std::vector<std::string> > FmFileRefExt;
14 
15 
17 {
19 
20 public:
22 
23  virtual bool isListable() const { return true; }
24 
25  virtual const char* getUITypeName() const { return "File reference"; }
26 
27  virtual bool clone(FmBase* obj, int depth);
28  static bool readAndConnect(std::istream& is, std::ostream& os = std::cout);
29  virtual std::ostream& writeFMF(std::ostream& os = std::cout);
30 
31  static const std::vector<FmFileRefExt>& getExtensions();
32 
33 protected:
34  virtual ~FmFileReference();
35 
36  virtual bool cloneLocal(FmBase* obj, int depth);
37 
38 public:
40 
41 private:
42  static std::vector<FmFileRefExt> extensions;
43 };
44 
45 #endif
std::pair< std::string, std::vector< std::string > > FmFileRefExt
Definition: FmFileReference.H:13
Base class for all objects that affect the simulation model.
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Definition: FmFileReference.H:17
virtual bool isListable() const
Hook for list view filtering.
Definition: FmFileReference.H:23
static bool readAndConnect(std::istream &is, std::ostream &os=std::cout)
Definition: FmFileReference.C:74
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmFileReference.H:25
FmFileReference()
Definition: FmFileReference.C:19
virtual ~FmFileReference()
Definition: FmFileReference.C:27
static const std::vector< FmFileRefExt > & getExtensions()
Definition: FmFileReference.C:37
FFaField< std::string > fileName
Definition: FmFileReference.H:39
static std::vector< FmFileRefExt > extensions
Definition: FmFileReference.H:42
virtual bool cloneLocal(FmBase *obj, int depth)
Clones the data fields of *obj into *this.
Definition: FmFileReference.C:68
virtual std::ostream & writeFMF(std::ostream &os=std::cout)
Writes out this object in the model database file format.
Definition: FmFileReference.C:53
Base class for all objects that affect the simulation model.
Definition: FmSimulationModelBase.H:28
virtual bool clone(FmBase *, int)
Copies the fields of another object into *this.
Definition: FmBase.H:109