13 #ifndef FM_MODEL_MEMBER_BASE_H
14 #define FM_MODEL_MEMBER_BASE_H
99 void printID(FILE* myFile,
bool withBaseID =
true)
const;
110 bool isTagged(
const std::string& tag)
const;
Base class for list view items.
Base parent class for the model data structure entries.
#define Fmd_DB_HEADER_INIT()
Macro enabling type checking for a class.
Definition: FmTypeCheck.H:24
bool erase()
Deletes *this assuming it is heap-allocated.
Definition: FFaFieldContainer.C:39
bool setValue(const ValueT &newData, bool checkChanged=true)
Assigns a new value to the field.
Definition: FFaField.H:66
const ValueT & getValue() const
Returns a const reference to myData.
Definition: FFaField.H:56
Base class for list view items.
Definition: FFaListViewItem.H:31
Base class for every class that want to send or recieve.
Definition: FFaSwitchBoard.H:83
Base parent class for the model data structure entries.
Definition: FmBase.H:37
int getID() const
Returns the user ID of this object.
Definition: FmBase.H:66
virtual std::string getUserDescription(size_t maxLength=0) const
Returns the user-defined description of this object.
Definition: FmBase.C:371
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmBase.C:409
Base class for all model data objects.
Definition: FmModelMemberBase.H:34
int getItemID() const final
Returns the user ID of this item.
Definition: FmModelMemberBase.H:64
void getItemAssemblyPath(std::vector< int > &assID) const final
Returns the sub-assembly ID path of this item.
Definition: FmModelMemberBase.C:57
Signal
Enumerator for database signals.
Definition: FmModelMemberBase.H:49
@ MODEL_MEMBER_FINISHED_DISCONNECTED
Definition: FmModelMemberBase.H:52
@ MODEL_MEMBER_DISCONNECTED
Definition: FmModelMemberBase.H:51
@ MODEL_MEMBER_CONNECTED
Definition: FmModelMemberBase.H:50
@ MODEL_MEMBER_CHANGED
Definition: FmModelMemberBase.H:53
void onMainDisconnected() final
Invokes call-backs after this object is removed from the database.
Definition: FmModelMemberBase.C:138
virtual void changedEvent()
Hook for class-dependent tasks when the object is updated.
Definition: FmModelMemberBase.H:45
static void resolveBaseIDProblems()
Resolves the conflicting base ID issues for baseIdProblems.
Definition: FmModelMemberBase.C:276
const char * getItemName() const override
Returns the name of this item.
Definition: FmModelMemberBase.H:62
bool cloneLocal(FmBase *obj, int depth) override
Clones the data fields of *obj into *this.
Definition: FmModelMemberBase.C:188
bool eraseOptions() override
Hook for class-specific tasks before deleting *this in erase().
Definition: FmModelMemberBase.C:167
FmModelMemberBase(bool isDummy=false)
Default constructor.
Definition: FmModelMemberBase.C:38
void sendSignal(Signal sig)
Broadcasts a database signal to trigger call-back invokations.
Definition: FmModelMemberBase.C:182
FFaField< std::string > myTag
Text string used for grouping objects.
Definition: FmModelMemberBase.H:119
const std::string & getTag() const
Returns a const reference to the tag assigned to this object.
Definition: FmModelMemberBase.H:112
void onMainConnected() final
Invokes call-backs after this object is inserted into the database.
Definition: FmModelMemberBase.C:79
std::string getItemDescr() const override
Returns the description of this item.
Definition: FmModelMemberBase.H:63
int getBaseID() const
Returns the base ID of this object.
Definition: FmModelMemberBase.H:102
static std::vector< FmModelMemberBase * > baseIdProblems
Objects with conflicting base ID encountered during model file parsing.
Definition: FmModelMemberBase.H:126
virtual FmBase * duplicate() const
Returns a connected copy of this object.
Definition: FmModelMemberBase.H:88
bool setTag(const std::string &tag)
Assigns a tag to this object.
Definition: FmModelMemberBase.H:108
void onMainAboutToDisconnect() final
Invokes call-backs before this object is removed from the database.
Definition: FmModelMemberBase.C:119
virtual bool interactiveErase()
Hook for class-dependent tasks for interactive deleting an object.
Definition: FmModelMemberBase.H:94
static bool inInteractiveErase
Set to true when interactive delete.
Definition: FmModelMemberBase.H:130
int getItemBaseID() const final
Returns the base ID of this item.
Definition: FmModelMemberBase.H:65
bool moveTo(FmSubAssembly *newAss)
Moves this object to another sub-assembly.
Definition: FmModelMemberBase.C:323
virtual void mainConnectedEvent()
Hook for class-dependent tasks when the object is connected.
Definition: FmModelMemberBase.H:41
void setBaseID(int id)
Assigns the base ID to this object.
Definition: FmModelMemberBase.H:123
void printID(FILE *myFile, bool withBaseID=true) const
Prints the ID of this object in the solver input file format.
Definition: FmModelMemberBase.C:63
static bool ignoreBaseID
Set to true when importing sub-assembly.
Definition: FmModelMemberBase.H:129
static FFaSwitchBoardConnector * getSignalConnector()
Returns the model database signal connector.
Definition: FmModelMemberBase.C:51
virtual void mainDisconnectedEvent()
Hook for class-dependent tasks when the object is disconnected.
Definition: FmModelMemberBase.H:43
virtual int printSolverEntry(FILE *)
Hoook for printing the solver input file entry for this object.
Definition: FmModelMemberBase.H:97
FFaNoCopyField< int > myBaseID
Base ID, unique over all object types.
Definition: FmModelMemberBase.H:118
void onChanged()
Invokes call-backs when this object updated.
Definition: FmModelMemberBase.C:149
bool isTagged(const std::string &tag) const
Returns true if this object has a tag assigned to it.
Definition: FmModelMemberBase.C:345
Base class for all sub-assembly objects.
Definition: FmSubAssembly.H:28