GET library
GETProcessLink.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETProcessLink.hh
3  *
4  * Include file for the GETProcessLink class.
5  */
6 //======================================================================
7 
8 #ifndef GET_PROCESS_LINK_HH
9 #define GET_PROCESS_LINK_HH
10 
11 //----------------------------------------------------------------------
12 
13 #include "GETCommon.hh"
14 #include "GETProcess.hh"
15 
16 //======================================================================
17 /*! \class GETProcessLink
18  *
19  * This class is used to connect processes to GET core objects.
20  * It defines whether the process is defined individually (local data) or
21  * globally (external data).
22  *
23  * If the data is defined externally, it is just a pointer to that data,
24  * and the corresponding object is fully managed by calling code (the data
25  * object should exist as long as it is used by the object it is associated
26  * to requires it...).
27  *
28  * If the data is defined locally, then the pointer is adopted, and the
29  * data object is deleted when modified or when the class is deleted.
30  *
31  */
33 {
34  //------------------------------------------------------------
35  /*! \object_doc */
37  //------------------------------------------------------------
38 
39  protected:
40  GETProcess * process_ptr; ///< Pointer to associated data
41  bool is_local; ///< Indicate whether the data is defined locally or externally
42 
43  public:
44  //----------------------------------------------------------
45  /** @name Constructors, affectation, destructor */
46  //@{
47  GETProcessLink ( GETProcess * proc = NULL, bool local = true );
48  virtual ~GETProcessLink ( );
49  //@}
50 
51 
52  //----------------------------------------------------------
53  /** @name Associated data functions */
54  //@{
55  virtual void SetProcess ( GETProcess * proc, bool local = true ); // inline
56  virtual void SetLocalProcess ( GETProcess * proc ); // inline
57  virtual void SetExternalProcess ( GETProcess * proc ); // inline
58 
59  const GETProcess * GetProcess ( ) const; // inline
60  GETProcess * GetProcess ( ); // inline
61 
62  bool IsLocal ( ) const; // inline
63  bool IsDefined ( ) const; // inline
64 
65  virtual void InitProcess ( u_int n, double dt ); // inline
66  virtual void RemoveProcess ( );
67  //@}
68 
69 
70  //----------------------------------------------------------
71  /** @name ROOT related functions */
72  //@{
73  public:
74 
75  /*! for use within ROOT.*/
77  //@}
78 };
79 
80 
81 //----------------------------------------------------------------------
82 // Inline functions
83 #include "icc/GETProcessLink.icc"
84 
85 
86 //======================================================================
87 #endif
Definition: GETProcess.hh:32