|
| ServiceHandle (const std::string &serviceName, const std::string &theParentName) |
| Create a handle ('smart pointer') to a service.
|
|
template<typename CT = T, typename NCT = std::remove_const_t<T>>
requires ( std::is_const_v<CT> && !std::is_same_v<CT, NCT> ) |
| ServiceHandle (const ServiceHandle< NCT > &other) |
| Copy constructor from a non const T to const T service handle.
|
|
template<std::derived_from< IProperty > OWNER> |
| ServiceHandle (OWNER *owner, std::string PropName, const std::string &svcName, std::string doc="") |
| Autodeclaring constructor with property name, service type/name and documentation.
|
|
StatusCode | initialize (const std::string &serviceName, const std::string &theParentName) |
|
T * | get () const |
| Allow non const access to the service, even from a const handle...
|
|
T * | operator-> () const |
| Allow non const access to the service, even from a const handle...
|
|
T & | operator* () const |
|
Public Member Functions inherited from GaudiHandle< T > |
template<typename CT = T, typename NCT = std::remove_const_t<T>>
requires ( std::is_const_v<CT> && !std::is_same_v<CT, NCT> ) |
| GaudiHandle (const GaudiHandle< NCT > &other) |
| Copy constructor needed for correct ref-counting.
|
|
| GaudiHandle (const GaudiHandle &other) |
| Copy constructor needed for correct ref-counting.
|
|
template<typename CT = T, typename NCT = std::remove_const_t<T>>
requires ( std::is_const_v<CT> && !std::is_same_v<CT, NCT> ) |
GaudiHandle & | operator= (const GaudiHandle< NCT > &other) |
| Assignment operator for correct ref-counting.
|
|
GaudiHandle & | operator= (const GaudiHandle &other) |
| Assignment operator for correct ref-counting.
|
|
StatusCode | retrieve () const |
| Retrieve the component.
|
|
StatusCode | release () const |
| Release the component.
|
|
bool | isValid () const |
| Check if the handle is valid (try to retrive the object is not done yet).
|
|
| operator bool () const |
| For testing if handle has component.
|
|
T * | get () |
| Return the wrapped pointer, not calling retrieve() if null.
|
|
std::add_const_t< T > * | get () const |
| Return the wrapped pointer, not calling retrieve() if null.
|
|
bool | isSet () const |
| True if the wrapped pointer is not null.
|
|
T & | operator* () |
|
T * | operator-> () |
|
std::add_const_t< T > & | operator* () const |
|
std::add_const_t< T > * | operator-> () const |
|
std::string | getDefaultType () |
| Helper function to get default type string from the class type.
|
|
std::string | getDefaultName () |
|
Public Member Functions inherited from GaudiHandleBase |
const std::string & | typeAndName () const |
| The full type and name: "type/name".
|
|
std::string | type () const |
| The concrete component class name: the part before the '/'.
|
|
std::string | name () const |
| The instance name: the part after the '/'.
|
|
bool | empty () const |
| Check if the handle has been set to empty string (i.e.
|
|
void | setTypeAndName (std::string myTypeAndName) |
| The component "type/name" string.
|
|
void | setName (std::string_view myName) |
| Set the instance name (part after the '/') without changing the class type.
|
|
std::string | pythonPropertyClassName () const override |
| Name of the componentType with "Handle" appended.
|
|
std::string | messageName () const |
| name used for printing messages
|
|
std::string | pythonRepr () const override |
| Python representation of handle, i.e.
|
|
Public Member Functions inherited from GaudiHandleInfo |
virtual | ~GaudiHandleInfo () |
| virtual destructor so that derived class destructor is called.
|
|
const std::string & | componentType () const |
|
const std::string & | propertyName () const |
| name as used in declareProperty(name,gaudiHandle)
|
|
void | setPropertyName (std::string propName) |
| set name as used in declareProperty(name,gaudiHandle).
|
|
const std::string & | parentName () const |
| The name of the parent.
|
|
|
StatusCode | retrieve (T *&service) const override |
| Do the real retrieval of the Service.
|
|
Protected Member Functions inherited from GaudiHandle< T > |
| GaudiHandle (std::string myTypeAndName, std::string myComponentType, std::string myParentName) |
|
virtual StatusCode | release (T *comp) const |
| Release the component.
|
|
Protected Member Functions inherited from GaudiHandleBase |
| GaudiHandleBase (std::string myTypeAndName, std::string myComponentType, std::string myParentName) |
| Create a handle ('smart pointer') to a gaudi component.
|
|
Protected Member Functions inherited from GaudiHandleInfo |
| GaudiHandleInfo (std::string myComponentType, std::string myParentName) |
| Some basic information and helper functions shared between various handles/arrays.
|
|
void | setComponentType (std::string componentType) |
| The component type.
|
|
void | setParentName (std::string parent) |
| The name of the parent.
|
|
template<
class T>
class ServiceHandle< T >
Handle to be used in lieu of naked pointers to services.
This allows better control through the framework of service loading and usage.
- Author
- Marti.nosp@m.n.Wo.nosp@m.udstr.nosp@m.a@ce.nosp@m.rn.ch
Definition at line 38 of file ServiceHandle.h.