3 #ifndef GAUDIKERNEL_CARRAYASPROPERTY_H
4 #define GAUDIKERNEL_CARRAYASPROPERTY_H 1
45 template <
class T,
unsigned int N>
50 typedef T(&PRef) [
N] ;
51 typedef T(*PVal) [
N] ;
52 typedef const T(&CRef) [
N] ;
53 typedef const T(*CVal) [
N] ;
58 static PVal
new_ () {
return new T[
N] ; }
60 static PVal new_ (
Type right )
63 assign ( tmp , right ) ;
67 static PVal copy ( PVal* right ,
const bool own )
69 if ( !own ) {
return right ; }
70 return new_ ( *right ) ;
73 static void dele ( PVal right ,
const bool own )
74 {
if ( own ) {
delete[] right ; } }
77 static void assign (
Type v1 , PRef v2 ) { std::copy ( v2 , v2 +
N , v1 ) ; }
78 static void assign (
Type v1 , CRef v2 ) { std::copy ( v2 , v2 +
N , v1 ) ; }
81 {
return std::lexicographical_compare ( v1 , v1 +
N , v2 , v2 +
N ) ; }
82 static bool less (
Type v1 , CRef v2 )
83 {
return std::lexicographical_compare ( v1 , v1 +
N , v2 , v2 +
N ) ; }
84 static bool less ( CRef v1 , CRef v2 )
85 {
return std::lexicographical_compare ( v1 , v1 +
N , v2 , v2 +
N ) ; }
86 static bool less ( CRef v1 ,
Type v2 )
87 {
return std::lexicographical_compare ( v1 , v1 +
N , v2 , v2 +
N ) ; }
92 template <
class T,
unsigned int N>
97 template <
class T,
unsigned int N>
101 template <
unsigned int N>
112 template<
class T,
unsigned int N>
116 typedef Gaudi::Utils::PropertyTypeTraits<T[N]>
Traits ;
129 bool isValid (
const typename Traits::CVal value )
const
181 #endif // GAUDIKERNEL_CARRAYASPROPERTY_H