The Gaudi Framework  v33r0 (d5ea422b)
IProperty.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_IPROPERTY_H
12 #define GAUDIKERNEL_IPROPERTY_H
13 
14 // Include Files
15 #include "GaudiKernel/IInterface.h"
17 #include <iostream>
18 #include <string>
19 #include <vector>
20 
30 class GAUDI_API IProperty : virtual public IInterface {
31 public:
34 
36  virtual StatusCode setProperty( const Gaudi::Details::PropertyBase& p // Reference to the input property
37  ) = 0;
39  virtual StatusCode setProperty( const std::string& s ) = 0;
41  virtual StatusCode setProperty( const std::string& n, const std::string& v ) = 0;
43  virtual StatusCode getProperty( Gaudi::Details::PropertyBase* p // Pointer to property to be set
44  ) const = 0;
46  virtual const Gaudi::Details::PropertyBase& getProperty( const std::string& name // Property name
47  ) const = 0;
49  virtual StatusCode getProperty( const std::string& n, std::string& v ) const = 0;
51  virtual const std::vector<Gaudi::Details::PropertyBase*>& getProperties() const = 0;
52 
54  virtual bool hasProperty( const std::string& name ) const = 0;
55 };
56 #endif // GAUDIKERNEL_IPROPERTY_H
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
Definition: Property.cpp:105
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:247
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
Definition of the basic interface.
Definition: IInterface.h:254
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:243
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:42
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:23
string s
Definition: gaudirun.py:328
The IProperty is the basic interface for all components which have properties that can be set or get.
Definition: IProperty.h:30
#define GAUDI_API
Definition: Kernel.h:81