1 #ifndef GAUDIKERNEL_CARRAYASPROPERTY_H
2 #define GAUDIKERNEL_CARRAYASPROPERTY_H 1
42 template <
class T,
unsigned int N>
47 typedef T(&PRef) [
N] ;
48 typedef T(*PVal) [
N] ;
49 typedef const T(&CRef) [
N] ;
50 typedef const T(*CVal) [
N] ;
55 static PVal
new_ () {
return new T[
N] ; }
60 assign ( tmp , right ) ;
64 static PVal
copy ( PVal* right ,
const bool own )
66 if ( !own ) {
return right ; }
67 return new_ ( *right ) ;
70 static void dele ( PVal right ,
const bool own )
71 {
if ( own ) {
delete[] right ; } }
81 static bool less ( CRef v1 , CRef v2 )
89 template <
class T,
unsigned int N>
94 template <
class T,
unsigned int N>
98 template <
unsigned int N>
109 template<
class T,
unsigned int N>
178 #endif // GAUDIKERNEL_CARRAYASPROPERTY_H
static void dele(PVal right, const bool own)
"smart" pseudo-destructor
Templated Verifier base class.
helper structure to define the types for properties
~BoundedVerifier() override=default
Destructor.
static bool less(Type v1, CRef v2)
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
void clearBounds()
Clear both bounds (lower and upper) at the same time.
static bool less(Type v1, Type v2)
comparison (needed for bounded verifier)
void clearUpper()
Clear upper bound value.
void clearLower()
Clear lower bound value.
void clearLower()
Clear lower bound value.
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
void setLower(const T &value)
Set lower bound value.
void clearUpper()
Clear upper bound value.
Traits::CRef upper() const
Return the upper bound value.
void setBounds(typename Traits::CRef lower, typename Traits::CRef upper)
Set both bounds (lower and upper) at the same time.
static PVal new_(Type right)
some kind of "copy" constructor
const T & lower() const
Return the lower bound value.
static void assign(Type v1, CRef v2)
static void assign(Type v1, PRef v2)
void setLower(typename Traits::CRef value)
Set lower bound value.
static PVal new_()
some kind of "default" constructor
bool isValid(const typename Traits::CVal value) const
Check if the value is within bounds.
static bool less(CRef v1, CRef v2)
T lexicographical_compare(T...args)
const T & upper() const
Return the upper bound value.
static PVal copy(PVal *right, const bool own)
some kind of "smart"-pseudo-constructor
bool hasLower() const
Return if it has a lower bound.
void setUpper(const T &value)
Set upper bound value.
bool hasUpper() const
Return if it has a lower bound.
Gaudi::Utils::PropertyTypeTraits< T[N]> Traits
Type
the list of available types for ntuples
void setUpper(typename Traits::CRef value)
Set upper bound value.
Helper functions to set/get the application return code.
Traits::CRef lower() const
Return the lower bound value.
BoundedVerifier()
Constructors.
static bool less(CRef v1, Type v2)