The Gaudi Framework  v30r3 (a5ef0a68)
IProperty.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IPROPERTY_H
2 #define GAUDIKERNEL_IPROPERTY_H
3 
4 // Include Files
7 #include <iostream>
8 #include <string>
9 #include <vector>
10 
20 class GAUDI_API IProperty : virtual public IInterface
21 {
22 public:
25 
27  virtual StatusCode setProperty( const Gaudi::Details::PropertyBase& p // Reference to the input property
28  ) = 0;
30  virtual StatusCode setProperty( const std::string& s ) = 0;
32  virtual StatusCode setProperty( const std::string& n, const std::string& v ) = 0;
34  virtual StatusCode getProperty( Gaudi::Details::PropertyBase* p // Pointer to property to be set
35  ) const = 0;
37  virtual const Gaudi::Details::PropertyBase& getProperty( const std::string& name // Property name
38  ) const = 0;
40  virtual StatusCode getProperty( const std::string& n, std::string& v ) const = 0;
43 
45  virtual bool hasProperty( const std::string& name ) const = 0;
46 };
47 #endif // GAUDIKERNEL_IPROPERTY_H
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1243
STL class.
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:13
Definition of the basic interface.
Definition: IInterface.h:277
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
string s
Definition: gaudirun.py:253
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:20
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
#define GAUDI_API
Definition: Kernel.h:104
GAUDI_API Gaudi::Details::PropertyBase * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:223