The Gaudi Framework  v30r5 (c7afbd0d)
Property.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_PROPERTY_H
2 #define GAUDIKERNEL_PROPERTY_H
3 // ============================================================================
4 // STD & STL
5 // ============================================================================
6 #include <boost/utility/string_ref.hpp>
7 #include <stdexcept>
8 #include <string>
9 #include <typeinfo>
10 // ============================================================================
11 // Application C++ Class Headers
12 // ============================================================================
13 #include "GaudiKernel/IProperty.h"
14 #include "GaudiKernel/Kernel.h"
16 #include "GaudiKernel/SmartIF.h"
17 #include "GaudiKernel/TaggedBool.h"
18 #include "GaudiKernel/ToStream.h"
21 
22 namespace Gaudi
23 {
24  namespace Details
25  {
26  // ============================================================================
35  {
36 
37  public:
39  const std::string name() const { return m_name.to_string(); }
41  std::string documentation() const { return m_documentation.to_string(); }
43  const std::type_info* type_info() const { return m_typeinfo; }
45  std::string type() const { return m_typeinfo->name(); }
47  virtual bool load( PropertyBase& dest ) const = 0;
49  virtual bool assign( const PropertyBase& source ) = 0;
50 
51  public:
53  virtual std::string toString() const = 0;
55  virtual void toStream( std::ostream& out ) const = 0;
57  virtual StatusCode fromString( const std::string& value ) = 0;
58 
59  public:
61  virtual PropertyBase& declareReadHandler( std::function<void( PropertyBase& )> fun ) = 0;
63  virtual PropertyBase& declareUpdateHandler( std::function<void( PropertyBase& )> fun ) = 0;
64 
66  virtual const std::function<void( PropertyBase& )> readCallBack() const = 0;
68  virtual const std::function<void( PropertyBase& )> updateCallBack() const = 0;
69 
71  virtual bool useUpdateHandler() = 0;
72 
73  template <class HT>
74  PropertyBase& declareReadHandler( void ( HT::*MF )( PropertyBase& ), HT* instance )
75  {
76  return declareReadHandler( [=]( PropertyBase& p ) { ( instance->*MF )( p ); } );
77  }
78 
79  template <class HT>
80  PropertyBase& declareUpdateHandler( void ( HT::*MF )( PropertyBase& ), HT* instance )
81  {
82  return declareUpdateHandler( [=]( PropertyBase& p ) { ( instance->*MF )( p ); } );
83  }
84 
85  public:
87  virtual ~PropertyBase() = default;
89  void setName( std::string value ) { m_name = to_view( std::move( value ) ); }
91  void setDocumentation( std::string value ) { m_documentation = to_view( std::move( value ) ); }
93  virtual std::ostream& fillStream( std::ostream& ) const;
95  virtual PropertyBase* clone() const = 0;
96 
98  void setOwnerType( const std::type_info& ownerType ) { m_ownerType = &ownerType; }
99 
101  template <class OWNER>
103  {
104  setOwnerType( typeid( OWNER ) );
105  }
106 
108  const std::type_info* ownerType() const { return m_ownerType; }
109 
112  {
113  return m_ownerType ? System::typeinfoName( *m_ownerType ) : std::string( "unknown owner type" );
114  }
115 
116  protected:
119  : m_name( to_view( std::move( name ) ) ), m_documentation( to_view( std::move( doc ) ) ), m_typeinfo( &type )
120  {
121  }
124  : m_name( to_view( std::move( name ) ) ), m_documentation( m_name ), m_typeinfo( &type )
125  {
126  }
128  PropertyBase( const PropertyBase& ) = default;
130  PropertyBase& operator=( const PropertyBase& ) = default;
131 
132  private:
134  static boost::string_ref to_view( std::string str );
136  boost::string_ref m_name;
138  boost::string_ref m_documentation;
142  const std::type_info* m_ownerType = nullptr;
143  };
144 
145  inline std::ostream& operator<<( std::ostream& stream, const PropertyBase& prop )
146  {
147  return prop.fillStream( stream );
148  }
149 
150  namespace Property
151  {
152  using ImmediatelyInvokeHandler = Gaudi::tagged_bool<class ImmediatelyInvokeHandler_tag>;
153 
154  // ==========================================================================
155  // The following code is going to be a bit unpleasant, but as far as its
156  // author can tell, it is as simple as the design constraints and C++'s
157  // implementation constraints will allow. If you disagree, please submit
158  // a patch which simplifies it. Here is the underlying design rationale:
159  //
160  // - For any given type T used in a Property, we want to have an
161  // associated StringConverter<T> struct which explains how to convert a
162  // value of that type into a string (toString) and parse that string
163  // back (fromString).
164  // - There is a default implementation, called DefaultStringConverter<T>,
165  // which is based on the overloadable parse() and toStream() global
166  // methods of Gaudi. Its exact behaviour varies depending on whether T
167  // is default-constructible or only copy-constructible, which requires a
168  // layer of SFINAE indirection.
169  // - Some people want to be able to specialize StringConverter as an
170  // alternative to defining parse/toStream overloads. This interferes
171  // with the SFINAE tricks used by DefaultStringConverter, so we cannot
172  // just call a DefaultStringConverter a StringConverter and must add one
173  // more layer to the StringConverter type hierarchy.
174 
175  // This class factors out commonalities between DefaultStringConverters
176  template <class TYPE>
178  public:
179  std::string toString( const TYPE& v )
180  {
182  return toString( v );
183  }
184 
185  // Implementation of fromString depends on whether TYPE is default-
186  // constructible (fastest, easiest) or only copy-constructible (still
187  // doable as long as the caller can provide a valid value of TYPE)
188  virtual TYPE fromString( const TYPE& ref_value, const std::string& s ) = 0;
189 
190  protected:
191  void fromStringImpl( TYPE& buffer, const std::string& s )
192  {
194  if ( !parse( buffer, InputData{s} ).isSuccess() ) {
195  throw std::invalid_argument( "cannot parse '" + s + "' to " + System::typeinfoName( typeid( TYPE ) ) );
196  }
197  }
198  };
199  // Specialization of toString for strings (identity function)
200  template <>
202  {
203  return v;
204  }
205 
206  // This class provides a default implementation of StringConverter based
207  // on the overloadable parse() and toStream() global Gaudi methods.
208  //
209  // It leverages the fact that TYPE is default-constructible if it can, and
210  // falls back fo a requirement of copy-constructibility if it must. So
211  // here is the "default" implementation for copy-constructible types...
212  //
213  template <typename TYPE, typename Enable = void>
215  TYPE fromString( const TYPE& ref_value, const std::string& s ) final override
216  {
217  TYPE buffer = ref_value;
218  this->fromStringImpl( buffer, s );
219  return buffer;
220  }
221  };
222  // ...and here is the preferred impl for default-constructible types:
223  template <class TYPE>
224  struct DefaultStringConverter<TYPE, std::enable_if_t<std::is_default_constructible<TYPE>::value>>
226  TYPE fromString( const TYPE& /* ref_value */, const std::string& s ) final override
227  {
228  TYPE buffer{};
229  this->fromStringImpl( buffer, s );
230  return buffer;
231  }
232  };
233 
234  // Specializable StringConverter struct with a default implementation
235  template <typename TYPE>
236  struct StringConverter : DefaultStringConverter<TYPE> {
237  };
238 
239  struct NullVerifier {
240  template <class TYPE>
241  void operator()( const TYPE& ) const
242  {
243  }
244  };
245  template <class TYPE>
247  void operator()( const TYPE& value ) const
248  {
250  // throw the exception if the limit is defined and value is outside
251  if ( ( m_hasLowerBound && ( value < m_lowerBound ) ) || ( m_hasUpperBound && ( m_upperBound < value ) ) )
252  throw std::out_of_range( "value " + toString( value ) + " outside range" );
253  }
254 
256  bool hasLower() const { return m_hasLowerBound; }
258  bool hasUpper() const { return m_hasUpperBound; }
260  const TYPE& lower() const { return m_lowerBound; }
262  const TYPE& upper() const { return m_upperBound; }
263 
265  void setLower( const TYPE& value )
266  {
267  m_hasLowerBound = true;
268  m_lowerBound = value;
269  }
271  void setUpper( const TYPE& value )
272  {
273  m_hasUpperBound = true;
274  m_upperBound = value;
275  }
277  void clearLower()
278  {
279  m_hasLowerBound = false;
280  m_lowerBound = TYPE();
281  }
283  void clearUpper()
284  {
285  m_hasUpperBound = false;
286  m_upperBound = TYPE();
287  }
288 
290  void setBounds( const TYPE& lower, const TYPE& upper )
291  {
292  setLower( lower );
293  setUpper( upper );
294  }
295 
297  void clearBounds()
298  {
299  clearLower();
300  clearUpper();
301  }
302 
303  private:
305  bool m_hasLowerBound{false};
306  bool m_hasUpperBound{false};
307  TYPE m_lowerBound{};
308  TYPE m_upperBound{};
309  };
310 
312  struct SwapCall {
314  callback_t tmp, &orig;
315  SwapCall( callback_t& input ) : orig( input ) { tmp.swap( orig ); }
316  ~SwapCall() { orig.swap( tmp ); }
317  void operator()( PropertyBase& p ) const { tmp( p ); }
318  };
319 
320  struct NoHandler {
321  void useReadHandler( const PropertyBase& ) const {}
323  {
324  throw std::logic_error( "setReadHandler not implemented for this class" );
325  }
327  void useUpdateHandler( const PropertyBase& ) const {}
329  {
330  throw std::logic_error( "setUpdateHandler not implemented for this class" );
331  }
333  };
336  void useReadHandler( const PropertyBase& p ) const
337  {
338  if ( m_readCallBack ) {
339  SwapCall{m_readCallBack}( const_cast<PropertyBase&>( p ) );
340  }
341  }
342  void setReadHandler( std::function<void( PropertyBase& )> fun ) { m_readCallBack = std::move( fun ); }
343  std::function<void( PropertyBase& )> getReadHandler() const { return m_readCallBack; }
344  };
348  {
349  if ( m_updateCallBack ) {
350  try {
351  SwapCall{m_updateCallBack}( p );
352  } catch ( const std::exception& x ) {
353  throw std::invalid_argument( "failure in update handler of '" + p.name() + "': " + x.what() );
354  }
355  }
356  }
357  void setUpdateHandler( std::function<void( PropertyBase& )> fun ) { m_updateCallBack = std::move( fun ); }
358  std::function<void( PropertyBase& )> getUpdateHandler() const { return m_updateCallBack; }
359  };
361  using ReadHandler::useReadHandler;
362  using ReadHandler::setReadHandler;
363  using ReadHandler::getReadHandler;
364  using UpdateHandler::useUpdateHandler;
365  using UpdateHandler::setUpdateHandler;
366  using UpdateHandler::getUpdateHandler;
367  };
368  }
369 
370  } // namespace Details
371 
372  // ============================================================================
380  // ============================================================================
381  template <class TYPE, class VERIFIER = Details::Property::NullVerifier,
382  class HANDLERS = Details::Property::UpdateHandler>
384  {
385  public:
386  // ==========================================================================
388  using StorageType = TYPE;
390  using VerifierType = VERIFIER;
391  using HandlersType = HANDLERS;
392  // ==========================================================================
393 
394  private:
401  template <class T>
403  template <class T>
404  using not_copying = std::enable_if_t<!is_this_type<T>::value>;
406  public:
407  // ==========================================================================
409  template <class T = StorageType>
410  Property( std::string name, T&& value, std::string doc = "" )
411  : Details::PropertyBase( typeid( ValueType ), std::move( name ), std::move( doc ) )
412  , m_value( std::forward<T>( value ) )
413  {
414  m_verifier( m_value );
415  }
418  template <typename OWNER, typename T = ValueType,
419  typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>,
420  typename = std::enable_if_t<std::is_default_constructible<T>::value>>
421  Property( OWNER* owner, std::string name ) : Property( std::move( name ), ValueType{}, "" )
422  {
423  owner->declareProperty( *this );
424  setOwnerType<OWNER>();
425  }
426 
429  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
430  Property( OWNER* owner, std::string name, T&& value, std::string doc = "" )
431  : Property( std::move( name ), std::forward<T>( value ), std::move( doc ) )
432  {
433  owner->declareProperty( *this );
434  setOwnerType<OWNER>();
435  }
436 
439  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
440  Property( OWNER* owner, std::string name, T&& value, std::function<void( PropertyBase& )> handler,
441  std::string doc = "" )
442  : Property( owner, std::move( name ), std::forward<T>( value ), std::move( doc ) )
443  {
444  declareUpdateHandler( std::move( handler ) );
445  }
446 
449  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
450  Property( OWNER* owner, std::string name, T&& value, void ( OWNER::*handler )( PropertyBase& ),
451  std::string doc = "" )
452  : Property( owner, std::move( name ), std::forward<T>( value ),
453  [owner, handler]( PropertyBase& p ) { ( owner->*handler )( p ); }, std::move( doc ) )
454  {
455  }
458  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
459  Property( OWNER* owner, std::string name, T&& value, void ( OWNER::*handler )(), std::string doc = "" )
460  : Property( owner, std::move( name ), std::forward<T>( value ),
461  [owner, handler]( PropertyBase& ) { ( owner->*handler )(); }, std::move( doc ) )
462  {
463  }
464 
467  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
468  Property( OWNER* owner, std::string name, T&& value, std::function<void( PropertyBase& )> handler,
470  : Property( owner, std::move( name ), std::forward<T>( value ), std::move( handler ), std::move( doc ) )
471  {
472  if ( invoke ) useUpdateHandler();
473  }
474 
478  template <typename T, typename = not_copying<T>>
479  Property( T&& v ) : Details::PropertyBase( typeid( ValueType ), "", "" ), m_value( std::forward<T>( v ) )
480  {
481  }
482 
485  template <typename T = StorageType, typename = std::enable_if_t<!std::is_reference<T>::value>>
486  Property() : Details::PropertyBase( typeid( ValueType ), "", "" ), m_value()
487  {
488  }
489 
492 
495  {
496  m_handlers.setReadHandler( std::move( fun ) );
497  return *this;
498  }
501  {
502  m_handlers.setUpdateHandler( std::move( fun ) );
503  return *this;
504  }
505 
508  {
509  return m_handlers.getReadHandler();
510  }
513  {
514  return m_handlers.getUpdateHandler();
515  }
516 
518  bool useUpdateHandler() override
519  {
520  m_handlers.useUpdateHandler( *this );
521  return true;
522  }
523 
525  operator const ValueType&() const
526  {
527  m_handlers.useReadHandler( *this );
528  return m_value;
529  }
530  // /// Automatic conversion to value (reference).
531  // operator ValueType& () {
532  // useReadHandler();
533  // return m_value;
534  // }
535 
537  template <class T>
538  bool operator==( const T& other ) const
539  {
540  return m_value == other;
541  }
542 
544  template <class T>
545  bool operator!=( const T& other ) const
546  {
547  return m_value != other;
548  }
549 
551  template <class T>
552  bool operator<( const T& other ) const
553  {
554  return m_value < other;
555  }
556 
558  template <class T>
559  decltype( auto ) operator+( const T& other ) const
560  {
561  return m_value + other;
562  }
563 
565  template <class T = ValueType>
566  Property& operator=( T&& v )
567  {
568  m_verifier( v );
569  m_value = std::forward<T>( v );
570  m_handlers.useUpdateHandler( *this );
571  return *this;
572  }
573 
575  const VerifierType& verifier() const { return m_verifier; }
577  VerifierType& verifier() { return m_verifier; }
578 
581  const ValueType& value() const { return *this; }
582  ValueType& value() { return const_cast<ValueType&>( (const ValueType&)*this ); }
583  bool setValue( const ValueType& v )
584  {
585  *this = v;
586  return true;
587  }
588  bool set( const ValueType& v )
589  {
590  *this = v;
591  return true;
592  }
593  Details::PropertyBase* clone() const override { return new Property( *this ); }
595 
599  template <class T = const ValueType>
600  decltype( auto ) size() const
601  {
602  return value().size();
603  }
604  template <class T = const ValueType>
605  decltype( auto ) length() const
606  {
607  return value().length();
608  }
609  template <class T = const ValueType>
610  decltype( auto ) empty() const
611  {
612  return value().empty();
613  }
614  template <class T = ValueType>
615  decltype( auto ) clear()
616  {
617  value().clear();
618  }
619  template <class T = const ValueType>
620  decltype( auto ) begin() const
621  {
622  return value().begin();
623  }
624  template <class T = const ValueType>
625  decltype( auto ) end() const
626  {
627  return value().end();
628  }
629  template <class T = ValueType>
630  decltype( auto ) begin()
631  {
632  return value().begin();
633  }
634  template <class T = ValueType>
635  decltype( auto ) end()
636  {
637  return value().end();
638  }
639  template <class ARG>
640  decltype( auto ) operator[]( const ARG& arg ) const
641  {
642  return value()[arg];
643  }
644  template <class ARG>
645  decltype( auto ) operator[]( const ARG& arg )
646  {
647  return value()[arg];
648  }
649  template <class T = const ValueType>
650  decltype( auto ) find( const typename T::key_type& key ) const
651  {
652  return value().find( key );
653  }
654  template <class T = ValueType>
655  decltype( auto ) find( const typename T::key_type& key )
656  {
657  return value().find( key );
658  }
659  template <class ARG, class T = ValueType>
660  decltype( auto ) erase( ARG arg )
661  {
662  return value().erase( arg );
663  }
664  template <class = ValueType>
666  {
667  ++value();
668  return *this;
669  }
670  template <class = ValueType>
672  {
673  return m_value++;
674  }
675  template <class = ValueType>
677  {
678  --value();
679  return *this;
680  }
681  template <class = ValueType>
683  {
684  return m_value--;
685  }
686  template <class T = ValueType>
687  Property& operator+=( const T& other )
688  {
689  m_value += other;
690  return *this;
691  }
692  template <class T = ValueType>
693  Property& operator-=( const T& other )
694  {
695  m_value -= other;
696  return *this;
697  }
699  template <class T = const ValueType>
700  decltype( auto ) key() const
701  {
702  return value().key();
703  }
704  template <class T = const ValueType>
705  decltype( auto ) objKey() const
706  {
707  return value().objKey();
708  }
709  template <class T = const ValueType>
710  decltype( auto ) fullKey() const
711  {
712  return value().fullKey();
713  }
714  template <class T = ValueType>
715  decltype( auto ) initialize()
716  {
717  return value().initialize();
718  }
719  template <class T = ValueType>
720  decltype( auto ) makeHandles() const
721  {
722  return value().makeHandles();
723  }
724  template <class ARG, class T = ValueType>
725  decltype( auto ) makeHandles( const ARG& arg ) const
726  {
727  return value().makeHandles( arg );
728  }
730  // ==========================================================================
731 
732  // Delegate operator() to the value
733  template <class... Args>
734  decltype( std::declval<ValueType>()( std::declval<Args&&>()... ) ) operator()( Args&&... args ) const
735  noexcept( noexcept( std::declval<ValueType>()( std::declval<Args&&>()... ) ) )
736  {
737  return value()( std::forward<Args>( args )... );
738  }
739 
740  public:
742  bool assign( const Details::PropertyBase& source ) override
743  {
744  // Check if the property of is of "the same" type, except for strings
745  const Property* p =
746  ( std::is_same<ValueType, std::string>::value ) ? nullptr : dynamic_cast<const Property*>( &source );
747  if ( p ) {
748  *this = p->value();
749  } else {
750  this->fromString( source.toString() ).ignore();
751  }
752  return true;
753  }
755  bool load( Details::PropertyBase& dest ) const override
756  {
757  // delegate to the 'opposite' method
758  return dest.assign( *this );
759  }
761  StatusCode fromString( const std::string& source ) override
762  {
763  using Converter = Details::Property::StringConverter<ValueType>;
764  *this = Converter().fromString( m_value, source );
765  return StatusCode::SUCCESS;
766  }
768  std::string toString() const override
769  {
770  using Converter = Details::Property::StringConverter<ValueType>;
771  return Converter().toString( *this );
772  }
774  void toStream( std::ostream& out ) const override
775  {
776  m_handlers.useReadHandler( *this );
777  using Utils::toStream;
778  toStream( m_value, out );
779  }
780  };
781 
783  template <class T, class TP, class V, class H>
784  bool operator==( const T& v, const Property<TP, V, H>& p )
785  {
786  return p == v;
787  }
788 
790  template <class T, class TP, class V, class H>
791  bool operator!=( const T& v, const Property<TP, V, H>& p )
792  {
793  return p != v;
794  }
795 
797  template <class T, class TP, class V, class H>
798  decltype( auto ) operator+( const T& v, const Property<TP, V, H>& p )
799  {
800  return v + p.value();
801  }
802 
803  template <class TYPE, class HANDLERS = Details::Property::UpdateHandler>
805 
806  template <class TYPE>
809 
810 } // namespace Gaudi
811 
812 template <class TYPE>
814 
815 template <class TYPE>
817 
818 // Typedef Properties for built-in types
834 
836 
837 // Typedef PropertyRefs for built-in types
853 
855 
856 // Typedef "Arrays" of Properties for built-in types
872 
874 
875 // Typedef "Arrays" of PropertyRefs for built-in types
891 
893 
896 template <typename Handler = typename Gaudi::Details::Property::UpdateHandler>
898 {
899  Handler m_handlers;
900 
901 public:
903 
905  PropertyBase& declareReadHandler( std::function<void( PropertyBase& )> fun ) override
906  {
907  m_handlers.setReadHandler( std::move( fun ) );
908  return *this;
909  }
911  PropertyBase& declareUpdateHandler( std::function<void( PropertyBase& )> fun ) override
912  {
913  m_handlers.setUpdateHandler( std::move( fun ) );
914  return *this;
915  }
916 
918  const std::function<void( PropertyBase& )> readCallBack() const override { return m_handlers.getReadHandler(); }
920  const std::function<void( PropertyBase& )> updateCallBack() const override { return m_handlers.getUpdateHandler(); }
921 
923  void useReadHandler() const { m_handlers.useReadHandler( *this ); }
924 
926  bool useUpdateHandler() override
927  {
928  m_handlers.useUpdateHandler( *this );
929  return true;
930  }
931 };
932 
933 // forward-declaration is sufficient here
934 class GaudiHandleBase;
935 
936 // implementation in header file only where the GaudiHandleBase class
937 // definition is not needed. The rest goes into the .cpp file.
938 // The goal is to decouple the header files, to avoid that the whole
939 // world depends on GaudiHandle.h
941 {
942 public:
944 
946  {
947  setValue( value );
948  return *this;
949  }
950 
951  GaudiHandleProperty* clone() const override { return new GaudiHandleProperty( *this ); }
952 
953  bool load( PropertyBase& destination ) const override { return destination.assign( *this ); }
954 
955  bool assign( const PropertyBase& source ) override { return fromString( source.toString() ).isSuccess(); }
956 
957  std::string toString() const override;
958 
959  void toStream( std::ostream& out ) const override;
960 
961  StatusCode fromString( const std::string& s ) override;
962 
963  const GaudiHandleBase& value() const
964  {
965  useReadHandler();
966  return *m_pValue;
967  }
968 
969  bool setValue( const GaudiHandleBase& value );
970 
971 private:
975 };
976 
977 // forward-declaration is sufficient here
979 
981 {
982 public:
984 
986  {
987  setValue( value );
988  return *this;
989  }
990 
991  GaudiHandleArrayProperty* clone() const override { return new GaudiHandleArrayProperty( *this ); }
992 
993  bool load( PropertyBase& destination ) const override { return destination.assign( *this ); }
994 
995  bool assign( const PropertyBase& source ) override { return fromString( source.toString() ).isSuccess(); }
996 
997  std::string toString() const override;
998 
999  void toStream( std::ostream& out ) const override;
1000 
1001  StatusCode fromString( const std::string& s ) override;
1002 
1004  {
1005  useReadHandler();
1006  return *m_pValue;
1007  }
1008 
1009  bool setValue( const GaudiHandleArrayBase& value );
1010 
1011 private:
1015 };
1016 
1017 namespace Gaudi
1018 {
1019  namespace Utils
1020  {
1021  // ========================================================================
1039  GAUDI_API bool hasProperty( const IProperty* p, const std::string& name );
1040  // ========================================================================
1058  GAUDI_API bool hasProperty( const IInterface* p, const std::string& name );
1059  // ========================================================================
1078  // ========================================================================
1097  // ========================================================================
1121  // ========================================================================
1146  // ========================================================================
1170  template <class TYPE>
1171  StatusCode setProperty( IProperty* component, const std::string& name, const TYPE& value, const std::string& doc );
1172  // ========================================================================
1195  template <class TYPE>
1196  StatusCode setProperty( IProperty* component, const std::string& name, const TYPE& value )
1197  {
1198  return setProperty( component, name, value, std::string() );
1199  }
1200  // ========================================================================
1214  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name, const std::string& value,
1215  const std::string& doc = "" );
1216  // ========================================================================
1230  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name, const char* value,
1231  const std::string& doc = "" );
1232  // ========================================================================
1246  template <unsigned N>
1247  StatusCode setProperty( IProperty* component, const std::string& name, const char ( &value )[N],
1248  const std::string& doc = "" )
1249  {
1250  return component ? setProperty( component, name, std::string( value, value + N ), doc ) : StatusCode::FAILURE;
1251  }
1252  // ========================================================================
1283  template <class TYPE>
1284  StatusCode setProperty( IProperty* component, const std::string& name, const TYPE& value, const std::string& doc )
1285  {
1286  using Gaudi::Utils::toString;
1287  return component && hasProperty( component, name )
1288  ? Gaudi::Utils::setProperty( component, name, toString( value ), doc )
1290  }
1291  // ========================================================================
1313  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name,
1314  const Gaudi::Details::PropertyBase* property, const std::string& doc = "" );
1315  // ========================================================================
1337  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name,
1338  const Gaudi::Details::PropertyBase& property, const std::string& doc = "" );
1339  // ========================================================================
1362  template <class TYPE>
1363  StatusCode setProperty( IProperty* component, const std::string& name, const Gaudi::Property<TYPE>& value,
1364  const std::string& doc = "" )
1365  {
1366  return setProperty( component, name, &value, doc );
1367  }
1368  // ========================================================================
1389  template <class TYPE>
1390  StatusCode setProperty( IInterface* component, const std::string& name, const TYPE& value,
1391  const std::string& doc = "" )
1392  {
1393  if ( !component ) {
1394  return StatusCode::FAILURE;
1395  }
1396  auto property = SmartIF<IProperty>{component};
1397  return property ? setProperty( property, name, value, doc ) : StatusCode::FAILURE;
1398  }
1399  // ========================================================================
1412  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name, const std::string& value,
1413  const std::string& doc = "" );
1414  // ========================================================================
1427  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name, const char* value,
1428  const std::string& doc = "" );
1429  // ========================================================================
1443  template <unsigned N>
1444  StatusCode setProperty( IInterface* component, const std::string& name, const char ( &value )[N],
1445  const std::string& doc = "" )
1446  {
1447  if ( 0 == component ) {
1448  return StatusCode::FAILURE;
1449  }
1450  return setProperty( component, name, std::string{value, value + N}, doc );
1451  }
1452  // ========================================================================
1474  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name,
1475  const Gaudi::Details::PropertyBase* property, const std::string& doc = "" );
1476  // ========================================================================
1498  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name,
1499  const Gaudi::Details::PropertyBase& property, const std::string& doc = "" );
1500  // ========================================================================
1523  template <class TYPE>
1524  StatusCode setProperty( IInterface* component, const std::string& name, const Gaudi::Property<TYPE>& value,
1525  const std::string& doc = "" )
1526  {
1527  return setProperty( component, name, &value, doc );
1528  }
1529  // ========================================================================
1530  } // end of namespace Gaudi::Utils
1531 } // end of namespace Gaudi
1532 // ============================================================================
1533 // The END
1534 // ============================================================================
1535 #endif // GAUDIKERNEL_PROPERTY_H
1536 // ============================================================================
Gaudi::Property< std::vector< float > & > FloatArrayPropertyRef
Definition: Property.h:888
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:1284
Gaudi::Property< signed char & > SignedCharPropertyRef
Definition: Property.h:840
Details::Property::NullVerifier VerifierType
Definition: Property.h:390
Gaudi::Property< std::vector< signed char > & > SignedCharArrayPropertyRef
Definition: Property.h:878
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Property(OWNER *owner, std::string name)
Autodeclaring constructor with property name, value and documentation.
Definition: Property.h:421
std::function< void(PropertyBase &)> m_readCallBack
Definition: Property.h:335
Gaudi::Property< unsigned int & > UnsignedIntegerPropertyRef
Definition: Property.h:845
TYPE fromString(const TYPE &ref_value, const std::string &s) final override
Definition: Property.h:215
Property(OWNER *owner, std::string name, T &&value, std::function< void(PropertyBase &)> handler, Details::Property::ImmediatelyInvokeHandler invoke, std::string doc="")
Autodeclaring constructor with property name, value, updateHandler and documentation.
Definition: Property.h:468
T empty(T...args)
bool operator!=(const T &v, const Property< TP, V, H > &p)
delegate (value != property) to property operator!=
Definition: Property.h:791
GaudiHandleProperty * clone() const override
clones the current property
Definition: Property.h:951
bool setValue(const ValueType &v)
Definition: Property.h:583
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:303
std::function< void(PropertyBase &)> getReadHandler() const
Definition: Property.h:326
void useUpdateHandler(const PropertyBase &) const
Definition: Property.h:327
Gaudi::Property< std::vector< unsigned short > > UnsignedShortArrayProperty
Definition: Property.h:862
Gaudi::Property< TYPE > SimpleProperty
Definition: Property.h:813
Gaudi::Property< long long & > LongLongPropertyRef
Definition: Property.h:848
PropertyBase & declareReadHandler(void(HT::*MF)(PropertyBase &), HT *instance)
Definition: Property.h:74
Gaudi::Property< std::vector< int > > IntegerArrayProperty
Definition: Property.h:863
std::ostream & operator<<(std::ostream &stream, const PropertyBase &prop)
Definition: Property.h:145
bool operator==(const T &v, const Property< TP, V, H > &p)
delegate (value == property) to property operator==
Definition: Property.h:784
bool useUpdateHandler() override
manual trigger for callback for update
Definition: Property.h:518
void setDocumentation(std::string value)
set the documentation string
Definition: Property.h:91
Gaudi::Property< long long > LongLongProperty
Definition: Property.h:829
const std::function< void(PropertyBase &)> readCallBack() const override
get a reference to the readCallBack
Definition: Property.h:918
Implementation of property with value of concrete type.
Definition: Property.h:383
Gaudi::Property< long & > LongPropertyRef
Definition: Property.h:846
std::function< void(PropertyBase &)> m_updateCallBack
Definition: Property.h:346
virtual PropertyBase & declareUpdateHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for update
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:332
Gaudi::Property< std::vector< double > & > DoubleArrayPropertyRef
Definition: Property.h:889
virtual bool assign(const PropertyBase &source)=0
import the property value form the source
T swap(T...args)
bool load(PropertyBase &destination) const override
Definition: Property.h:953
const std::string name() const
property name
Definition: Property.h:39
Property & operator=(T &&v)
Assignment from value.
Definition: Property.h:566
Gaudi::Property< float > FloatProperty
Definition: Property.h:831
Gaudi::Property< int > IntegerProperty
Definition: Property.h:825
Gaudi::Property< std::vector< unsigned long long > & > UnsignedLongLongArrayPropertyRef
Definition: Property.h:887
void setOwnerType()
set the type of the owner class (used for documentation)
Definition: Property.h:102
void clearUpper()
Clear upper bound value.
Definition: Property.h:283
const TYPE & upper() const
Return the upper bound value.
Definition: Property.h:262
GaudiHandleArrayProperty * clone() const override
clones the current property
Definition: Property.h:991
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:356
Gaudi::tagged_bool< class ImmediatelyInvokeHandler_tag > ImmediatelyInvokeHandler
Definition: Property.h:152
Gaudi::Property< unsigned long long > UnsignedLongLongProperty
Definition: Property.h:830
Gaudi::Property< float & > FloatPropertyRef
Definition: Property.h:850
vector< std::string > StorageType
Hosted type.
Definition: Property.h:388
Gaudi::Details::PropertyBase * property(const std::string &name) const
std::string ownerTypeName() const
get the string for the type of the owner class (used for documentation)
Definition: Property.h:111
STL namespace.
std::string toString() const override
value -> string
Definition: Property.h:768
Gaudi::Property< std::vector< std::string > > StringArrayProperty
Definition: Property.h:873
Gaudi::Property< std::vector< unsigned short > & > UnsignedShortArrayPropertyRef
Definition: Property.h:881
Property(OWNER *owner, std::string name, T &&value, void(OWNER::*handler)(), std::string doc="")
Autodeclaring constructor with property name, value, pointer to member function updateHandler and doc...
Definition: Property.h:459
Gaudi::Property< std::vector< unsigned char > > UnsignedCharArrayProperty
Definition: Property.h:860
void setLower(const TYPE &value)
Set lower bound value.
Definition: Property.h:265
HandlersType m_handlers
Definition: Property.h:398
Gaudi::Property< unsigned short > UnsignedShortProperty
Definition: Property.h:824
const std::function< void(Details::PropertyBase &)> updateCallBack() const override
get a reference to the updateCallBack
Definition: Property.h:512
T end(T...args)
Gaudi::Property< unsigned long > UnsignedLongProperty
Definition: Property.h:828
Gaudi::Property< std::string & > StringPropertyRef
Definition: Property.h:854
StorageType m_value
Storage.
Definition: Property.h:396
Gaudi::Property< char & > CharPropertyRef
Definition: Property.h:839
Gaudi::Property< std::vector< bool > & > BooleanArrayPropertyRef
Definition: Property.h:876
Gaudi::Property< std::vector< long double > > LongDoubleArrayProperty
Definition: Property.h:871
Gaudi::Property< std::vector< long long > > LongLongArrayProperty
Definition: Property.h:867
Gaudi::Property< std::vector< double > > DoubleArrayProperty
Definition: Property.h:870
bool operator<(const T &other) const
"less" comparison
Definition: Property.h:552
void setOwnerType(const std::type_info &ownerType)
set the type of the owner class (used for documentation)
Definition: Property.h:98
virtual std::string toString() const =0
value -> string
Gaudi::Property< std::vector< short > > ShortArrayProperty
Definition: Property.h:861
Gaudi::Details::PropertyBase Property
backward compatibility hack for old Property base class
Definition: PropertyFwd.h:28
Gaudi::Property< std::vector< unsigned long > & > UnsignedLongArrayPropertyRef
Definition: Property.h:885
Gaudi::Property< std::vector< unsigned int > > UnsignedIntegerArrayProperty
Definition: Property.h:864
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
PropertyBase(const std::type_info &type, std::string name="", std::string doc="")
constructor from the property name and the type
Definition: Property.h:118
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
Details::PropertyBase & declareUpdateHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for update
Definition: Property.h:500
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:486
Helper class to simplify the migration old properties deriving directly from PropertyBase.
Definition: Property.h:897
PropertyMgr & operator=(const PropertyMgr &)=delete
STL class.
Property & operator+=(const T &other)
Definition: Property.h:687
Gaudi::Property< std::vector< long > > LongArrayProperty
Definition: Property.h:865
typename std::remove_reference< StorageType >::type ValueType
Definition: Property.h:389
Gaudi::Property< std::vector< long > & > LongArrayPropertyRef
Definition: Property.h:884
void operator()(PropertyBase &p) const
Definition: Property.h:317
void operator()(const TYPE &value) const
Definition: Property.h:247
Gaudi::Property< signed char > SignedCharProperty
Definition: Property.h:821
Gaudi::Property< char > CharProperty
Definition: Property.h:820
int N
Definition: IOTest.py:101
Property & operator-=(const T &other)
Definition: Property.h:693
const VerifierType & verifier() const
Accessor to verifier.
Definition: Property.h:575
Gaudi::Property< int & > IntegerPropertyRef
Definition: Property.h:844
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:974
Gaudi::Property< unsigned long & > UnsignedLongPropertyRef
Definition: Property.h:847
Property(OWNER *owner, std::string name, T &&value, void(OWNER::*handler)(PropertyBase &), std::string doc="")
Autodeclaring constructor with property name, value, pointer to member function updateHandler and doc...
Definition: Property.h:450
const std::type_info * ownerType() const
get the type of the owner class (used for documentation)
Definition: Property.h:108
boost::string_ref m_name
property name
Definition: Property.h:136
Property & operator++()
Definition: Property.h:665
T what(T...args)
PropertyBase(std::string name, const std::type_info &type)
constructor from the property name and the type
Definition: Property.h:123
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
void setBounds(const TYPE &lower, const TYPE &upper)
Set both bounds (lower and upper) at the same time.
Definition: Property.h:290
Gaudi::Property< std::vector< long double > & > LongDoubleArrayPropertyRef
Definition: Property.h:890
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
Property(std::string name, T &&value, std::string doc="")
the constructor with property name, value and documentation.
Definition: Property.h:410
Definition of the basic interface.
Definition: IInterface.h:277
const std::type_info * m_typeinfo
property type
Definition: Property.h:140
Gaudi::Property< unsigned int > UnsignedIntegerProperty
Definition: Property.h:826
const TYPE & lower() const
Return the lower bound value.
Definition: Property.h:260
T erase(T...args)
Gaudi::Property< std::vector< char > > CharArrayProperty
Definition: Property.h:858
virtual PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for reading
const GaudiHandleBase & value() const
Definition: Property.h:963
Gaudi::Property< bool > BooleanProperty
Definition: Property.h:819
PropertyBase & declareUpdateHandler(std::function< void(PropertyBase &)> fun) override
set new callback for update
Definition: Property.h:911
Gaudi::Property< std::vector< unsigned long long > > UnsignedLongLongArrayProperty
Definition: Property.h:868
VerifierType & verifier()
Accessor to verifier.
Definition: Property.h:577
PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun) override
set new callback for reading
Definition: Property.h:905
const GaudiHandleArrayBase & value() const
Definition: Property.h:1003
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:34
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
Definition: Property.cpp:52
PropertyBase & declareUpdateHandler(void(HT::*MF)(PropertyBase &), HT *instance)
Definition: Property.h:80
void fromStringImpl(TYPE &buffer, const std::string &s)
Definition: Property.h:191
std::ostream & toStream(const DataObjID &d, std::ostream &os)
Definition: DataObjID.cpp:92
T clear(T...args)
bool hasLower() const
Return if it has a lower bound.
Definition: Property.h:256
Gaudi::Property< double > DoubleProperty
Definition: Property.h:832
Converter base class.
Definition: Converter.h:24
STL class.
void setName(std::string value)
set the new value for the property name
Definition: Property.h:89
Gaudi::Property< std::vector< int > & > IntegerArrayPropertyRef
Definition: Property.h:882
T move(T...args)
bool assign(const PropertyBase &source) override
Definition: Property.h:995
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
Property & operator--()
Definition: Property.h:676
void operator()(const TYPE &) const
Definition: Property.h:241
Gaudi::Property< std::vector< long long > & > LongLongArrayPropertyRef
Definition: Property.h:886
std::enable_if_t<!is_this_type< T >::value > not_copying
Definition: Property.h:404
Gaudi::Property< double & > DoublePropertyRef
Definition: Property.h:851
std::function< void(PropertyBase &)> getUpdateHandler() const
Definition: Property.h:332
bool operator==(const T &other) const
equality comparison
Definition: Property.h:538
Gaudi::Property< std::vector< unsigned char > & > UnsignedCharArrayPropertyRef
Definition: Property.h:879
void useReadHandler(const PropertyBase &p) const
Definition: Property.h:336
bool hasUpper() const
Return if it has a lower bound.
Definition: Property.h:258
T find(T...args)
bool load(Details::PropertyBase &dest) const override
set value to another property
Definition: Property.h:755
T size(T...args)
StatusCode parse(DataObjID &dest, const std::string &src)
Definition: DataObjID.cpp:52
Base class of array&#39;s of various gaudihandles.
Definition: GaudiHandle.h:354
std::function< void(PropertyBase &)> getUpdateHandler() const
Definition: Property.h:358
Gaudi::Property< long double & > LongDoublePropertyRef
Definition: Property.h:852
ValueType & value()
Definition: Property.h:582
STL class.
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:923
Helper class to enable ADL for parsers.
Definition: InputData.h:10
Gaudi::Property< std::vector< signed char > > SignedCharArrayProperty
Definition: Property.h:859
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:926
Gaudi::Property< std::string > StringProperty
Definition: Property.h:835
T begin(T...args)
STL class.
void setUpdateHandler(std::function< void(PropertyBase &)> fun)
Definition: Property.h:357
Gaudi::Property< long double > LongDoubleProperty
Definition: Property.h:833
GaudiHandleArrayProperty & operator=(const GaudiHandleArrayBase &value)
Definition: Property.h:985
SwapCall(callback_t &input)
Definition: Property.h:315
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:1014
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26
Gaudi::Property< short > ShortProperty
Definition: Property.h:823
decltype(auto) operator+(const T &v, const Property< TP, V, H > &p)
implemantation of (value + property)
Definition: Property.h:798
std::string type() const
property type
Definition: Property.h:45
std::string documentation() const
property documentation
Definition: Property.h:41
Gaudi::Property< std::vector< unsigned long > > UnsignedLongArrayProperty
Definition: Property.h:866
Details::PropertyBase * clone() const override
clones the current property
Definition: Property.h:593
Gaudi::Property< TYPE & > SimplePropertyRef
Definition: Property.h:816
string s
Definition: gaudirun.py:253
Gaudi::Property< unsigned long long & > UnsignedLongLongPropertyRef
Definition: Property.h:849
void clearBounds()
Clear both bounds (lower and upper) at the same time.
Definition: Property.h:297
void setReadHandler(std::function< void(PropertyBase &)> fun)
Definition: Property.h:342
GAUDI_API const Gaudi::Details::PropertyBase * getProperty(const std::vector< const Gaudi::Details::PropertyBase * > *p, const std::string &name)
get the property by name from the list of the properties
Definition: Property.cpp:320
StatusCode setProperty(IInterface *component, const std::string &name, const Gaudi::Property< TYPE > &value, const std::string &doc="")
simple function to set the property of the given object from another property
Definition: Property.h:1524
std::function< void(PropertyBase &)> getReadHandler() const
Definition: Property.h:343
Gaudi::Property< std::vector< std::string > & > StringArrayPropertyRef
Definition: Property.h:892
bool assign(const Details::PropertyBase &source) override
get the value from another property
Definition: Property.h:742
bool assign(const PropertyBase &source) override
Definition: Property.h:955
bool operator!=(const T &other) const
inequality comparison
Definition: Property.h:545
Gaudi::Property< long > LongProperty
Definition: Property.h:827
void setUpdateHandler(std::function< void(PropertyBase &)>)
Definition: Property.h:328
Gaudi::Property< std::vector< char > & > CharArrayPropertyRef
Definition: Property.h:877
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:581
Property(OWNER *owner, std::string name, T &&value, std::function< void(PropertyBase &)> handler, std::string doc="")
Autodeclaring constructor with property name, value, updateHandler and documentation.
Definition: Property.h:440
void clearLower()
Clear lower bound value.
Definition: Property.h:277
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:94
AttribStringParser::Iterator begin(const AttribStringParser &parser)
auto invoke(F &&f, ArgTypes &&...args) noexcept(noexcept(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))) -> decltype(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))
Definition: invoke.h:93
implementation of various functions for streaming.
Property(T &&v)
Construct an anonymous property from a value.
Definition: Property.h:479
Gaudi::Property< unsigned short & > UnsignedShortPropertyRef
Definition: Property.h:843
Gaudi::Property< std::vector< float > > FloatArrayProperty
Definition: Property.h:869
ValueType operator++(int)
Definition: Property.h:671
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:20
helper to disable a while triggering it, to avoid infinite recursion
Definition: Property.h:312
boost::string_ref m_documentation
property doc string
Definition: Property.h:138
bool load(PropertyBase &destination) const override
Definition: Property.h:993
#define GAUDI_API
Definition: Kernel.h:71
GaudiHandleProperty & operator=(const GaudiHandleBase &value)
Definition: Property.h:945
Gaudi::Property< std::vector< short > & > ShortArrayPropertyRef
Definition: Property.h:880
STL class.
Property(OWNER *owner, std::string name, T &&value, std::string doc="")
Autodeclaring constructor with property name, value and documentation.
Definition: Property.h:430
const std::function< void(PropertyBase &)> updateCallBack() const override
get a reference to the updateCallBack
Definition: Property.h:920
Details::PropertyBase & declareReadHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for reading
Definition: Property.h:494
Helper functions to set/get the application return code.
Definition: __init__.py:1
Gaudi::Property< unsigned char > UnsignedCharProperty
Definition: Property.h:822
VerifierType m_verifier
Definition: Property.h:397
const std::function< void(Details::PropertyBase &)> readCallBack() const override
get a reference to the readCallBack
Definition: Property.h:507
Gaudi::Property< short & > ShortPropertyRef
Definition: Property.h:842
std::string toString(const Type &)
void setUpper(const TYPE &value)
Set upper bound value.
Definition: Property.h:271
void setReadHandler(std::function< void(PropertyBase &)>)
Definition: Property.h:322
Details::Property::UpdateHandler HandlersType
Definition: Property.h:391
Gaudi::Property< unsigned char & > UnsignedCharPropertyRef
Definition: Property.h:841
ValueType operator--(int)
Definition: Property.h:682
void useReadHandler(const PropertyBase &) const
Definition: Property.h:321
Gaudi::Property< std::vector< bool > > BooleanArrayProperty
Definition: Property.h:857
const std::type_info * type_info() const
property type-info
Definition: Property.h:43
Gaudi::Property< std::vector< unsigned int > & > UnsignedIntegerArrayPropertyRef
Definition: Property.h:883
StatusCode fromString(const std::string &source) override
string -> value
Definition: Property.h:761
void toStream(std::ostream &out) const override
value -> stream
Definition: Property.h:774
Gaudi::Property< bool & > BooleanPropertyRef
Definition: Property.h:838
void useUpdateHandler(PropertyBase &p)
Definition: Property.h:347