Globally implement Copy() function for deep copy of detector objects

This commit is contained in:
2025-02-10 16:10:53 +01:00
parent be607e8a2e
commit ea288a1939
2 changed files with 31 additions and 0 deletions

View File

@ -222,6 +222,15 @@ template <class dataType> class analogDetector {
*/
virtual analogDetector *Clone() = 0;
/**
Deep copy. Must be virtual!
This is a new addition because of multithreaded storage cell data (where each sc has its own mutex).
If the pure virtual function exists here, EVERY derived class has to overwrite it!
That means a Copy() function must also be implemented in any derived class.
\returns a deep copy of the original analog detector
*/
virtual analogDetector *Copy() = 0;
/**
Gives an id to the structure. For debugging purposes in case of
multithreading. \param i is to be set \returns current id