Skip to content
Snippets Groups Projects
Commit 2a44c2dd authored by Marco Clemencic's avatar Marco Clemencic
Browse files

fixed problems with CArrayAsProperty in ROOT 6.08.00

parent 2baf2f86
No related branches found
No related tags found
1 merge request!230cleaning up last minute glitches
......@@ -43,6 +43,11 @@ if '__main__' == __name__ :
print __doc__ , __author__
# make sure cling can generate all required methods in Gaudi::Property
import cppyy
cppyy.gbl.gInterpreter.Declare('#define NO_C_ARRAY_AS_PROPERTY_WARNING')
cppyy.gbl.gInterpreter.Declare('#include "GaudiKernel/CArrayAsProperty.h"')
from GaudiPython.Bindings import AppMgr
gaudi = AppMgr()
......
......@@ -45,6 +45,12 @@ if '__main__' == __name__ :
print __doc__ , __author__
# make sure cling can generate all required methods in Gaudi::Property
import cppyy
for h in ("GaudiKernel/SVectorAsProperty.h",
"GaudiKernel/VectorsAsProperty.h"):
cppyy.gbl.gInterpreter.Declare('#include "%s"' % h)
from GaudiPython.Bindings import AppMgr
gaudi = AppMgr()
......
......@@ -8,7 +8,7 @@
namespace Gaudi
{
template <class TYPE, size_t N, class VERIFIER, class HANDLERS>
class Property<TYPE ( & )[N], VERIFIER, HANDLERS> : public Details::PropertyBase
class Property<TYPE [N], VERIFIER, HANDLERS> : public Details::PropertyBase
{
public:
// ==========================================================================
......@@ -33,28 +33,12 @@ namespace Gaudi
public:
// ==========================================================================
/// the constructor with property name, value and documentation.
template <class T = ValueType>
inline Property( std::string name, T&& value, std::string doc = "" )
: PropertyBase( typeid( ValueType ), std::move( name ), std::move( doc ) ), m_value( std::forward<T>( value ) )
inline Property( std::string name, StorageType value, std::string doc = "" )
: PropertyBase( typeid( ValueType ), std::move( name ), std::move( doc ) ), m_value( value )
{
m_verifier( m_value );
}
/// Construct an anonymous property from a value.
/// This constructor is not generated if T is the current type, so that the
/// compiler picks up the copy constructor instead of this one.
template <class T = ValueType, typename = typename not_copying<T>::type>
Property( T&& v ) : PropertyBase( typeid( ValueType ), "", "" ), m_value( std::forward<T>( v ) )
{
}
/// Construct an anonymous property with default constructed value.
/// Can be used only if StorageType is default constructible.
template <typename = void>
Property() : PropertyBase( typeid( ValueType ), "", "" ), m_value()
{
}
using PropertyBase::declareReadHandler;
using PropertyBase::declareUpdateHandler;
......@@ -192,5 +176,10 @@ namespace Gaudi
Utils::toStream( m_value, out );
}
};
template <class TYPE, size_t N, class VERIFIER, class HANDLERS>
class Property<TYPE (&) [N], VERIFIER, HANDLERS> : public Property<TYPE [N], VERIFIER, HANDLERS> {
public:
using Property<TYPE [N], VERIFIER, HANDLERS>::Property;
};
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment