Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:51:49

0001 #ifndef SERVICE_OBJECT_REGISTRY_H
0002 #define SERVICE_OBJECT_REGISTRY_H
0003 
0004 /**
0005  * @file ServiceObjectRegistry.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date 01 July 2015
0008  * @version 1.0
0009  */
0010 
0011 #include <string>
0012 
0013 namespace PARTONS {
0014 class AutomationService;
0015 class BaseObjectRegistry;
0016 class CollinearDistributionService;
0017 class CryptographicHashService;
0018 class DDVCSConvolCoeffFunctionService;
0019 class DDVCSObservableService;
0020 class DVCSConvolCoeffFunctionService;
0021 class DVCSObservableService;
0022 class DVMPConvolCoeffFunctionService;
0023 class DVMPObservableService;
0024 class GPDService;
0025 class ServiceObject;
0026 class TCSConvolCoeffFunctionService;
0027 class TCSObservableService;
0028 } /* namespace PARTONS */
0029 
0030 namespace PARTONS {
0031 
0032 /**
0033  * @class ServiceObjectRegistry
0034  *
0035  * @brief
0036  */
0037 class ServiceObjectRegistry {
0038 public:
0039     virtual ~ServiceObjectRegistry();
0040 
0041     ServiceObject* get(unsigned int classId) const;
0042     ServiceObject* get(const std::string &className) const;
0043 
0044     GPDService* getGPDService() const;
0045     CollinearDistributionService* getCollinearDistributionService() const;
0046     DVCSConvolCoeffFunctionService* getDVCSConvolCoeffFunctionService() const;
0047     TCSConvolCoeffFunctionService* getTCSConvolCoeffFunctionService() const;
0048     DVMPConvolCoeffFunctionService* getDVMPConvolCoeffFunctionService() const;
0049     DDVCSConvolCoeffFunctionService* getDDVCSConvolCoeffFunctionService() const;
0050     DVCSObservableService* getDVCSObservableService() const;
0051     TCSObservableService* getTCSObservableService() const;
0052     DVMPObservableService* getDVMPObservableService() const;
0053     DDVCSObservableService* getDDVCSObservableService() const;
0054     AutomationService* getAutomationService() const;
0055     CryptographicHashService* getCryptographicHashService() const;
0056 
0057 private:
0058     // To allow only Partons class to create a new instance of this class.
0059     // Used to avoid multiple singleton class and to avoid multithreading problem especially when getInstance() is called.
0060     // There is a bad behaviour with first instance initialization and mutex.
0061     friend class Partons;
0062 
0063     /**
0064      * Private default constructor to ensure the creation of a single instance of the class, managed by Parton's class.
0065      *
0066      * @param m_pBaseObjectRegistry
0067      */
0068     ServiceObjectRegistry(BaseObjectRegistry* m_pBaseObjectRegistry);
0069 
0070     BaseObjectRegistry* m_pBaseObjectRegistry;
0071 
0072     void checkBaseObjectRegistryNullPointer() const;
0073 };
0074 
0075 } /* namespace PARTONS */
0076 
0077 #endif /* SERVICE_OBJECT_REGISTRY_H */