The Gaudi Framework  v30r4 (9b837755)
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  setOwner( owner );
424  }
425 
428  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
429  Property( OWNER* owner, std::string name, T&& value, std::string doc = "" )
430  : Property( std::move( name ), std::forward<T>( value ), std::move( doc ) )
431  {
432  setOwner( owner );
433  }
434 
437  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
438  Property( OWNER* owner, std::string name, T&& value, std::function<void( PropertyBase& )> handler,
439  std::string doc = "" )
440  : Property( owner, std::move( name ), std::forward<T>( value ), std::move( doc ) )
441  {
442  declareUpdateHandler( std::move( handler ) );
443  }
444 
447  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
448  Property( OWNER* owner, std::string name, T&& value, void ( OWNER::*handler )( PropertyBase& ),
449  std::string doc = "" )
450  : Property( owner, std::move( name ), std::forward<T>( value ),
451  [owner, handler]( PropertyBase& p ) { ( owner->*handler )( p ); }, std::move( doc ) )
452  {
453  }
456  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
457  Property( OWNER* owner, std::string name, T&& value, void ( OWNER::*handler )(), std::string doc = "" )
458  : Property( owner, std::move( name ), std::forward<T>( value ),
459  [owner, handler]( PropertyBase& ) { ( owner->*handler )(); }, std::move( doc ) )
460  {
461  }
462 
465  template <class OWNER, class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
466  Property( OWNER* owner, std::string name, T&& value, std::function<void( PropertyBase& )> handler,
468  : Property( owner, std::move( name ), std::forward<T>( value ), std::move( handler ), std::move( doc ) )
469  {
470  if ( invoke ) useUpdateHandler();
471  }
472 
476  template <typename T, typename = not_copying<T>>
477  Property( T&& v ) : Details::PropertyBase( typeid( ValueType ), "", "" ), m_value( std::forward<T>( v ) )
478  {
479  }
480 
483  template <typename T = StorageType, typename = std::enable_if_t<!std::is_reference<T>::value>>
484  Property() : Details::PropertyBase( typeid( ValueType ), "", "" ), m_value()
485  {
486  }
487 
490 
492  template <class OWNER, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
493  void setOwner( OWNER* owner )
494  {
495  owner->declareProperty( *this );
496  setOwnerType<OWNER>();
497  }
498 
501  {
502  m_handlers.setReadHandler( std::move( fun ) );
503  return *this;
504  }
507  {
508  m_handlers.setUpdateHandler( std::move( fun ) );
509  return *this;
510  }
511 
514  {
515  return m_handlers.getReadHandler();
516  }
519  {
520  return m_handlers.getUpdateHandler();
521  }
522 
524  bool useUpdateHandler() override
525  {
526  m_handlers.useUpdateHandler( *this );
527  return true;
528  }
529 
531  operator const ValueType&() const
532  {
533  m_handlers.useReadHandler( *this );
534  return m_value;
535  }
536  // /// Automatic conversion to value (reference).
537  // operator ValueType& () {
538  // useReadHandler();
539  // return m_value;
540  // }
541 
543  template <class T>
544  bool operator==( const T& other ) const
545  {
546  return m_value == other;
547  }
548 
550  template <class T>
551  bool operator!=( const T& other ) const
552  {
553  return m_value != other;
554  }
555 
557  template <class T>
558  bool operator<( const T& other ) const
559  {
560  return m_value < other;
561  }
562 
564  template <class T>
565  decltype( auto ) operator+( const T& other ) const
566  {
567  return m_value + other;
568  }
569 
571  template <class T = ValueType>
572  Property& operator=( T&& v )
573  {
574  m_verifier( v );
575  m_value = std::forward<T>( v );
576  m_handlers.useUpdateHandler( *this );
577  return *this;
578  }
579 
581  const VerifierType& verifier() const { return m_verifier; }
583  VerifierType& verifier() { return m_verifier; }
584 
587  const ValueType& value() const { return *this; }
588  ValueType& value() { return const_cast<ValueType&>( (const ValueType&)*this ); }
589  bool setValue( const ValueType& v )
590  {
591  *this = v;
592  return true;
593  }
594  bool set( const ValueType& v )
595  {
596  *this = v;
597  return true;
598  }
599  Details::PropertyBase* clone() const override { return new Property( *this ); }
601 
605  template <class T = const ValueType>
606  decltype( auto ) size() const
607  {
608  return value().size();
609  }
610  template <class T = const ValueType>
611  decltype( auto ) length() const
612  {
613  return value().length();
614  }
615  template <class T = const ValueType>
616  decltype( auto ) empty() const
617  {
618  return value().empty();
619  }
620  template <class T = ValueType>
621  decltype( auto ) clear()
622  {
623  value().clear();
624  }
625  template <class T = const ValueType>
626  decltype( auto ) begin() const
627  {
628  return value().begin();
629  }
630  template <class T = const ValueType>
631  decltype( auto ) end() const
632  {
633  return value().end();
634  }
635  template <class T = ValueType>
636  decltype( auto ) begin()
637  {
638  return value().begin();
639  }
640  template <class T = ValueType>
641  decltype( auto ) end()
642  {
643  return value().end();
644  }
645  template <class ARG>
646  decltype( auto ) operator[]( const ARG& arg ) const
647  {
648  return value()[arg];
649  }
650  template <class ARG>
651  decltype( auto ) operator[]( const ARG& arg )
652  {
653  return value()[arg];
654  }
655  template <class T = const ValueType>
656  decltype( auto ) find( const typename T::key_type& key ) const
657  {
658  return value().find( key );
659  }
660  template <class T = ValueType>
661  decltype( auto ) find( const typename T::key_type& key )
662  {
663  return value().find( key );
664  }
665  template <class ARG, class T = ValueType>
666  decltype( auto ) erase( ARG arg )
667  {
668  return value().erase( arg );
669  }
670  template <class = ValueType>
672  {
673  ++value();
674  return *this;
675  }
676  template <class = ValueType>
678  {
679  return m_value++;
680  }
681  template <class = ValueType>
683  {
684  --value();
685  return *this;
686  }
687  template <class = ValueType>
689  {
690  return m_value--;
691  }
692  template <class T = ValueType>
693  Property& operator+=( const T& other )
694  {
695  m_value += other;
696  return *this;
697  }
698  template <class T = ValueType>
699  Property& operator-=( const T& other )
700  {
701  m_value -= other;
702  return *this;
703  }
705  template <class T = const ValueType>
706  decltype( auto ) targetKey() const
707  {
708  return value().targetKey();
709  }
710  template <class ARG, class T = ValueType>
711  decltype( auto ) setTargetKey( const ARG& arg )
712  {
713  return value().setTargetKey( arg );
714  }
715  template <class T = const ValueType>
716  decltype( auto ) metadata() const
717  {
718  return value().metadata();
719  }
720  template <class T = const ValueType>
721  decltype( auto ) key() const
722  {
723  return value().key();
724  }
725  template <class T = const ValueType>
726  decltype( auto ) objKey() const
727  {
728  return value().objKey();
729  }
730  template <class T = const ValueType>
731  decltype( auto ) fullKey() const
732  {
733  return value().fullKey();
734  }
735  template <class T = ValueType>
736  decltype( auto ) initialize()
737  {
738  return value().initialize();
739  }
740  template <class T = ValueType>
741  decltype( auto ) makeHandles() const
742  {
743  return value().makeHandles();
744  }
745  template <class ARG, class T = ValueType>
746  decltype( auto ) makeHandles( const ARG& arg ) const
747  {
748  return value().makeHandles( arg );
749  }
751  // ==========================================================================
752 
753  // Delegate operator() to the value
754  template <class... Args>
755  decltype( std::declval<ValueType>()( std::declval<Args&&>()... ) ) operator()( Args&&... args ) const
756  noexcept( noexcept( std::declval<ValueType>()( std::declval<Args&&>()... ) ) )
757  {
758  return value()( std::forward<Args>( args )... );
759  }
760 
761  public:
763  bool assign( const Details::PropertyBase& source ) override
764  {
765  // Check if the property of is of "the same" type, except for strings
766  const Property* p =
767  ( std::is_same<ValueType, std::string>::value ) ? nullptr : dynamic_cast<const Property*>( &source );
768  if ( p ) {
769  *this = p->value();
770  } else {
771  this->fromString( source.toString() ).ignore();
772  }
773  return true;
774  }
776  bool load( Details::PropertyBase& dest ) const override
777  {
778  // delegate to the 'opposite' method
779  return dest.assign( *this );
780  }
782  StatusCode fromString( const std::string& source ) override
783  {
784  using Converter = Details::Property::StringConverter<ValueType>;
785  *this = Converter().fromString( m_value, source );
786  return StatusCode::SUCCESS;
787  }
789  std::string toString() const override
790  {
791  using Converter = Details::Property::StringConverter<ValueType>;
792  return Converter().toString( *this );
793  }
795  void toStream( std::ostream& out ) const override
796  {
797  m_handlers.useReadHandler( *this );
798  using Utils::toStream;
799  toStream( m_value, out );
800  }
801  };
802 
804  template <class T, class TP, class V, class H>
805  bool operator==( const T& v, const Property<TP, V, H>& p )
806  {
807  return p == v;
808  }
809 
811  template <class T, class TP, class V, class H>
812  bool operator!=( const T& v, const Property<TP, V, H>& p )
813  {
814  return p != v;
815  }
816 
818  template <class T, class TP, class V, class H>
819  decltype( auto ) operator+( const T& v, const Property<TP, V, H>& p )
820  {
821  return v + p.value();
822  }
823 
824  template <class TYPE, class HANDLERS = Details::Property::UpdateHandler>
826 
827  template <class TYPE>
830 
831 } // namespace Gaudi
832 
833 template <class TYPE>
835 
836 template <class TYPE>
838 
839 // Typedef Properties for built-in types
855 
857 
858 // Typedef PropertyRefs for built-in types
874 
876 
877 // Typedef "Arrays" of Properties for built-in types
893 
895 
896 // Typedef "Arrays" of PropertyRefs for built-in types
912 
914 
917 template <typename Handler = typename Gaudi::Details::Property::UpdateHandler>
919 {
920  Handler m_handlers;
921 
922 public:
924 
926  PropertyBase& declareReadHandler( std::function<void( PropertyBase& )> fun ) override
927  {
928  m_handlers.setReadHandler( std::move( fun ) );
929  return *this;
930  }
932  PropertyBase& declareUpdateHandler( std::function<void( PropertyBase& )> fun ) override
933  {
934  m_handlers.setUpdateHandler( std::move( fun ) );
935  return *this;
936  }
937 
939  const std::function<void( PropertyBase& )> readCallBack() const override { return m_handlers.getReadHandler(); }
941  const std::function<void( PropertyBase& )> updateCallBack() const override { return m_handlers.getUpdateHandler(); }
942 
944  void useReadHandler() const { m_handlers.useReadHandler( *this ); }
945 
947  bool useUpdateHandler() override
948  {
949  m_handlers.useUpdateHandler( *this );
950  return true;
951  }
952 };
953 
954 // forward-declaration is sufficient here
955 class GaudiHandleBase;
956 
957 // implementation in header file only where the GaudiHandleBase class
958 // definition is not needed. The rest goes into the .cpp file.
959 // The goal is to decouple the header files, to avoid that the whole
960 // world depends on GaudiHandle.h
962 {
963 public:
965 
967  {
968  setValue( value );
969  return *this;
970  }
971 
972  GaudiHandleProperty* clone() const override { return new GaudiHandleProperty( *this ); }
973 
974  bool load( PropertyBase& destination ) const override { return destination.assign( *this ); }
975 
976  bool assign( const PropertyBase& source ) override { return fromString( source.toString() ).isSuccess(); }
977 
978  std::string toString() const override;
979 
980  void toStream( std::ostream& out ) const override;
981 
982  StatusCode fromString( const std::string& s ) override;
983 
984  const GaudiHandleBase& value() const
985  {
986  useReadHandler();
987  return *m_pValue;
988  }
989 
990  bool setValue( const GaudiHandleBase& value );
991 
992 private:
996 };
997 
998 // forward-declaration is sufficient here
1000 
1002 {
1003 public:
1005 
1007  {
1008  setValue( value );
1009  return *this;
1010  }
1011 
1012  GaudiHandleArrayProperty* clone() const override { return new GaudiHandleArrayProperty( *this ); }
1013 
1014  bool load( PropertyBase& destination ) const override { return destination.assign( *this ); }
1015 
1016  bool assign( const PropertyBase& source ) override { return fromString( source.toString() ).isSuccess(); }
1017 
1018  std::string toString() const override;
1019 
1020  void toStream( std::ostream& out ) const override;
1021 
1022  StatusCode fromString( const std::string& s ) override;
1023 
1025  {
1026  useReadHandler();
1027  return *m_pValue;
1028  }
1029 
1030  bool setValue( const GaudiHandleArrayBase& value );
1031 
1032 private:
1036 };
1037 
1038 namespace Gaudi
1039 {
1040  namespace Utils
1041  {
1042  // ========================================================================
1060  GAUDI_API bool hasProperty( const IProperty* p, const std::string& name );
1061  // ========================================================================
1079  GAUDI_API bool hasProperty( const IInterface* p, const std::string& name );
1080  // ========================================================================
1099  // ========================================================================
1118  // ========================================================================
1142  // ========================================================================
1167  // ========================================================================
1191  template <class TYPE>
1192  StatusCode setProperty( IProperty* component, const std::string& name, const TYPE& value, const std::string& doc );
1193  // ========================================================================
1216  template <class TYPE>
1217  StatusCode setProperty( IProperty* component, const std::string& name, const TYPE& value )
1218  {
1219  return setProperty( component, name, value, std::string() );
1220  }
1221  // ========================================================================
1235  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name, const std::string& value,
1236  const std::string& doc = "" );
1237  // ========================================================================
1251  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name, const char* value,
1252  const std::string& doc = "" );
1253  // ========================================================================
1267  template <unsigned N>
1268  StatusCode setProperty( IProperty* component, const std::string& name, const char ( &value )[N],
1269  const std::string& doc = "" )
1270  {
1271  return component ? setProperty( component, name, std::string( value, value + N ), doc ) : StatusCode::FAILURE;
1272  }
1273  // ========================================================================
1304  template <class TYPE>
1305  StatusCode setProperty( IProperty* component, const std::string& name, const TYPE& value, const std::string& doc )
1306  {
1307  using Gaudi::Utils::toString;
1308  return component && hasProperty( component, name )
1309  ? Gaudi::Utils::setProperty( component, name, toString( value ), doc )
1311  }
1312  // ========================================================================
1334  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name,
1335  const Gaudi::Details::PropertyBase* property, const std::string& doc = "" );
1336  // ========================================================================
1358  GAUDI_API StatusCode setProperty( IProperty* component, const std::string& name,
1359  const Gaudi::Details::PropertyBase& property, const std::string& doc = "" );
1360  // ========================================================================
1383  template <class TYPE>
1384  StatusCode setProperty( IProperty* component, const std::string& name, const Gaudi::Property<TYPE>& value,
1385  const std::string& doc = "" )
1386  {
1387  return setProperty( component, name, &value, doc );
1388  }
1389  // ========================================================================
1410  template <class TYPE>
1411  StatusCode setProperty( IInterface* component, const std::string& name, const TYPE& value,
1412  const std::string& doc = "" )
1413  {
1414  if ( !component ) {
1415  return StatusCode::FAILURE;
1416  }
1417  auto property = SmartIF<IProperty>{component};
1418  return property ? setProperty( property, name, value, doc ) : StatusCode::FAILURE;
1419  }
1420  // ========================================================================
1433  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name, const std::string& value,
1434  const std::string& doc = "" );
1435  // ========================================================================
1448  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name, const char* value,
1449  const std::string& doc = "" );
1450  // ========================================================================
1464  template <unsigned N>
1465  StatusCode setProperty( IInterface* component, const std::string& name, const char ( &value )[N],
1466  const std::string& doc = "" )
1467  {
1468  if ( 0 == component ) {
1469  return StatusCode::FAILURE;
1470  }
1471  return setProperty( component, name, std::string{value, value + N}, doc );
1472  }
1473  // ========================================================================
1495  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name,
1496  const Gaudi::Details::PropertyBase* property, const std::string& doc = "" );
1497  // ========================================================================
1519  GAUDI_API StatusCode setProperty( IInterface* component, const std::string& name,
1520  const Gaudi::Details::PropertyBase& property, const std::string& doc = "" );
1521  // ========================================================================
1544  template <class TYPE>
1545  StatusCode setProperty( IInterface* component, const std::string& name, const Gaudi::Property<TYPE>& value,
1546  const std::string& doc = "" )
1547  {
1548  return setProperty( component, name, &value, doc );
1549  }
1550  // ========================================================================
1551  } // end of namespace Gaudi::Utils
1552 } // end of namespace Gaudi
1553 // ============================================================================
1554 // The END
1555 // ============================================================================
1556 #endif // GAUDIKERNEL_PROPERTY_H
1557 // ============================================================================
Gaudi::Property< std::vector< float > & > FloatArrayPropertyRef
Definition: Property.h:909
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:1305
Gaudi::Property< signed char & > SignedCharPropertyRef
Definition: Property.h:861
Details::Property::NullVerifier VerifierType
Definition: Property.h:390
Gaudi::Property< std::vector< signed char > & > SignedCharArrayPropertyRef
Definition: Property.h:899
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:866
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:466
T empty(T...args)
bool operator!=(const T &v, const Property< TP, V, H > &p)
delegate (value != property) to property operator!=
Definition: Property.h:812
GaudiHandleProperty * clone() const override
clones the current property
Definition: Property.h:972
bool setValue(const ValueType &v)
Definition: Property.h:589
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:883
Gaudi::Property< TYPE > SimpleProperty
Definition: Property.h:834
Gaudi::Property< long long & > LongLongPropertyRef
Definition: Property.h:869
PropertyBase & declareReadHandler(void(HT::*MF)(PropertyBase &), HT *instance)
Definition: Property.h:74
Gaudi::Property< std::vector< int > > IntegerArrayProperty
Definition: Property.h:884
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:805
bool useUpdateHandler() override
manual trigger for callback for update
Definition: Property.h:524
void setDocumentation(std::string value)
set the documentation string
Definition: Property.h:91
Gaudi::Property< long long > LongLongProperty
Definition: Property.h:850
const std::function< void(PropertyBase &)> readCallBack() const override
get a reference to the readCallBack
Definition: Property.h:939
Implementation of property with value of concrete type.
Definition: Property.h:383
void setOwner(OWNER *owner)
Set the owner of this property.
Definition: Property.h:493
Gaudi::Property< long & > LongPropertyRef
Definition: Property.h:867
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:910
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:974
const std::string name() const
property name
Definition: Property.h:39
Property & operator=(T &&v)
Assignment from value.
Definition: Property.h:572
Gaudi::Property< float > FloatProperty
Definition: Property.h:852
Gaudi::Property< int > IntegerProperty
Definition: Property.h:846
Gaudi::Property< std::vector< unsigned long long > & > UnsignedLongLongArrayPropertyRef
Definition: Property.h:908
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:1012
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:851
Gaudi::Property< float & > FloatPropertyRef
Definition: Property.h:871
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:789
Gaudi::Property< std::vector< std::string > > StringArrayProperty
Definition: Property.h:894
Gaudi::Property< std::vector< unsigned short > & > UnsignedShortArrayPropertyRef
Definition: Property.h:902
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:457
Gaudi::Property< std::vector< unsigned char > > UnsignedCharArrayProperty
Definition: Property.h:881
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:845
const std::function< void(Details::PropertyBase &)> updateCallBack() const override
get a reference to the updateCallBack
Definition: Property.h:518
T end(T...args)
Gaudi::Property< unsigned long > UnsignedLongProperty
Definition: Property.h:849
Gaudi::Property< std::string & > StringPropertyRef
Definition: Property.h:875
StorageType m_value
Storage.
Definition: Property.h:396
Gaudi::Property< char & > CharPropertyRef
Definition: Property.h:860
Gaudi::Property< std::vector< bool > & > BooleanArrayPropertyRef
Definition: Property.h:897
Gaudi::Property< std::vector< long double > > LongDoubleArrayProperty
Definition: Property.h:892
Gaudi::Property< std::vector< long long > > LongLongArrayProperty
Definition: Property.h:888
Gaudi::Property< std::vector< double > > DoubleArrayProperty
Definition: Property.h:891
bool operator<(const T &other) const
"less" comparison
Definition: Property.h:558
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:882
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:906
Gaudi::Property< std::vector< unsigned int > > UnsignedIntegerArrayProperty
Definition: Property.h:885
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:506
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:484
Helper class to simplify the migration old properties deriving directly from PropertyBase.
Definition: Property.h:918
PropertyMgr & operator=(const PropertyMgr &)=delete
STL class.
Property & operator+=(const T &other)
Definition: Property.h:693
Gaudi::Property< std::vector< long > > LongArrayProperty
Definition: Property.h:886
typename std::remove_reference< StorageType >::type ValueType
Definition: Property.h:389
Gaudi::Property< std::vector< long > & > LongArrayPropertyRef
Definition: Property.h:905
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:842
Gaudi::Property< char > CharProperty
Definition: Property.h:841
int N
Definition: IOTest.py:101
Property & operator-=(const T &other)
Definition: Property.h:699
const VerifierType & verifier() const
Accessor to verifier.
Definition: Property.h:581
Gaudi::Property< int & > IntegerPropertyRef
Definition: Property.h:865
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:995
Gaudi::Property< unsigned long & > UnsignedLongPropertyRef
Definition: Property.h:868
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:448
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:671
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:911
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:847
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:879
virtual PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for reading
const GaudiHandleBase & value() const
Definition: Property.h:984
Gaudi::Property< bool > BooleanProperty
Definition: Property.h:840
PropertyBase & declareUpdateHandler(std::function< void(PropertyBase &)> fun) override
set new callback for update
Definition: Property.h:932
Gaudi::Property< std::vector< unsigned long long > > UnsignedLongLongArrayProperty
Definition: Property.h:889
VerifierType & verifier()
Accessor to verifier.
Definition: Property.h:583
PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun) override
set new callback for reading
Definition: Property.h:926
const GaudiHandleArrayBase & value() const
Definition: Property.h:1024
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:853
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:903
T move(T...args)
bool assign(const PropertyBase &source) override
Definition: Property.h:1016
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
Property & operator--()
Definition: Property.h:682
void operator()(const TYPE &) const
Definition: Property.h:241
Gaudi::Property< std::vector< long long > & > LongLongArrayPropertyRef
Definition: Property.h:907
std::enable_if_t<!is_this_type< T >::value > not_copying
Definition: Property.h:404
Gaudi::Property< double & > DoublePropertyRef
Definition: Property.h:872
std::function< void(PropertyBase &)> getUpdateHandler() const
Definition: Property.h:332
bool operator==(const T &other) const
equality comparison
Definition: Property.h:544
Gaudi::Property< std::vector< unsigned char > & > UnsignedCharArrayPropertyRef
Definition: Property.h:900
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:776
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:873
ValueType & value()
Definition: Property.h:588
STL class.
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:944
Helper class to enable ADL for parsers.
Definition: InputData.h:10
Gaudi::Property< std::vector< signed char > > SignedCharArrayProperty
Definition: Property.h:880
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:947
Gaudi::Property< std::string > StringProperty
Definition: Property.h:856
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:854
GaudiHandleArrayProperty & operator=(const GaudiHandleArrayBase &value)
Definition: Property.h:1006
SwapCall(callback_t &input)
Definition: Property.h:315
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:1035
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26
Gaudi::Property< short > ShortProperty
Definition: Property.h:844
decltype(auto) operator+(const T &v, const Property< TP, V, H > &p)
implemantation of (value + property)
Definition: Property.h:819
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:887
Details::PropertyBase * clone() const override
clones the current property
Definition: Property.h:599
Gaudi::Property< TYPE & > SimplePropertyRef
Definition: Property.h:837
string s
Definition: gaudirun.py:253
Gaudi::Property< unsigned long long & > UnsignedLongLongPropertyRef
Definition: Property.h:870
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:1545
std::function< void(PropertyBase &)> getReadHandler() const
Definition: Property.h:343
Gaudi::Property< std::vector< std::string > & > StringArrayPropertyRef
Definition: Property.h:913
bool assign(const Details::PropertyBase &source) override
get the value from another property
Definition: Property.h:763
bool assign(const PropertyBase &source) override
Definition: Property.h:976
bool operator!=(const T &other) const
inequality comparison
Definition: Property.h:551
Gaudi::Property< long > LongProperty
Definition: Property.h:848
void setUpdateHandler(std::function< void(PropertyBase &)>)
Definition: Property.h:328
Gaudi::Property< std::vector< char > & > CharArrayPropertyRef
Definition: Property.h:898
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:587
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:438
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:477
Gaudi::Property< unsigned short & > UnsignedShortPropertyRef
Definition: Property.h:864
Gaudi::Property< std::vector< float > > FloatArrayProperty
Definition: Property.h:890
ValueType operator++(int)
Definition: Property.h:677
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:1014
#define GAUDI_API
Definition: Kernel.h:71
GaudiHandleProperty & operator=(const GaudiHandleBase &value)
Definition: Property.h:966
Gaudi::Property< std::vector< short > & > ShortArrayPropertyRef
Definition: Property.h:901
STL class.
Property(OWNER *owner, std::string name, T &&value, std::string doc="")
Autodeclaring constructor with property name, value and documentation.
Definition: Property.h:429
const std::function< void(PropertyBase &)> updateCallBack() const override
get a reference to the updateCallBack
Definition: Property.h:941
Details::PropertyBase & declareReadHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for reading
Definition: Property.h:500
Helper functions to set/get the application return code.
Definition: __init__.py:1
Gaudi::Property< unsigned char > UnsignedCharProperty
Definition: Property.h:843
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:513
Gaudi::Property< short & > ShortPropertyRef
Definition: Property.h:863
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:862
ValueType operator--(int)
Definition: Property.h:688
void useReadHandler(const PropertyBase &) const
Definition: Property.h:321
Gaudi::Property< std::vector< bool > > BooleanArrayProperty
Definition: Property.h:878
const std::type_info * type_info() const
property type-info
Definition: Property.h:43
Gaudi::Property< std::vector< unsigned int > & > UnsignedIntegerArrayPropertyRef
Definition: Property.h:904
StatusCode fromString(const std::string &source) override
string -> value
Definition: Property.h:782
void toStream(std::ostream &out) const override
value -> stream
Definition: Property.h:795
Gaudi::Property< bool & > BooleanPropertyRef
Definition: Property.h:859
void useUpdateHandler(PropertyBase &p)
Definition: Property.h:347