GET library
GETProcessLink Class Reference

#include <GETProcessLink.hh>

Public Member Functions

Constructors, affectation, destructor
 GETProcessLink (GETProcess *proc=NULL, bool local=true)
 
virtual ~GETProcessLink ()
 
Associated data functions
virtual void SetProcess (GETProcess *proc, bool local=true)
 
virtual void SetLocalProcess (GETProcess *proc)
 
virtual void SetExternalProcess (GETProcess *proc)
 
const GETProcessGetProcess () const
 
GETProcessGetProcess ()
 
bool IsLocal () const
 
bool IsDefined () const
 
virtual void InitProcess (u_int n, double dt)
 
virtual void RemoveProcess ()
 
ROOT related functions
 ClassDef (GETProcessLink, 0)
 

Protected Attributes

bool is_local
 Indicate whether the data is defined locally or externally.
 
GETProcessprocess_ptr
 Pointer to associated data.
 

Private Member Functions

 GObject (GETProcessLink)
 

Detailed Description

This class is used to connect processes to GET core objects. It defines whether the process is defined individually (local data) or globally (external data).

If the data is defined externally, it is just a pointer to that data, and the corresponding object is fully managed by calling code (the data object should exist as long as it is used by the object it is associated to requires it...).

If the data is defined locally, then the pointer is adopted, and the data object is deleted when modified or when the class is deleted.

Constructor & Destructor Documentation

GETProcessLink::GETProcessLink ( GETProcess proc = NULL,
bool  local = true 
)

Constructor (see SetProcess function for arguments description).

Parameters
procassociated process pointer
localset whether the data is defined locally or externally

References is_local, process_ptr, and SetProcess().

GETProcessLink::~GETProcessLink ( )
virtual

Destructor.

References RemoveProcess().

Member Function Documentation

GETProcessLink::ClassDef ( GETProcessLink  ,
 
)

for use within ROOT.

const GETProcess * GETProcessLink::GetProcess ( ) const
inline
GETProcess * GETProcessLink::GetProcess ( )
inline

Return the associated process pointer.

References process_ptr.

GETProcessLink::GObject ( GETProcessLink  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
void GETProcessLink::InitProcess ( u_int  n,
double  dt 
)
inlinevirtual

Initialization of the process, to adapt it to sampling parameters (for internal result sample). It defines the internal sample dimension for the process.

Parameters
nsampling size of the function
dtsampling time step

References GETProcess::Init(), and process_ptr.

Referenced by GETObject::InitLocalData().

bool GETProcessLink::IsDefined ( ) const
inline
bool GETProcessLink::IsLocal ( ) const
inline

Return whether the associated process is defined locally.

References is_local.

Referenced by GETObject::InitLocalData().

void GETProcessLink::RemoveProcess ( )
virtual

Function that removes the associated data: if the data is local it is deleted, else the pointer is simply set to NULL.

References is_local, and process_ptr.

Referenced by GETObject::RemoveOutputCorrection(), SetProcess(), and ~GETProcessLink().

void GETProcessLink::SetExternalProcess ( GETProcess proc)
inlinevirtual
void GETProcessLink::SetLocalProcess ( GETProcess proc)
inlinevirtual
void GETProcessLink::SetProcess ( GETProcess proc,
bool  local = true 
)
inlinevirtual

Set associated process. If it is set locally, the pointer is adopted and will be deleted with current class instance. If previous data was defined, it is cleared first.

Parameters
procassociated process pointer
localset whether the data is defined locally or externally

References is_local, process_ptr, and RemoveProcess().

Referenced by GETProcessLink(), SetExternalProcess(), and SetLocalProcess().


The documentation for this class was generated from the following files: