1 #ifndef GAUDIKERNEL_STDARRAYASPROPERTY_H
2 #define GAUDIKERNEL_STDARRAYASPROPERTY_H 1
31 template <
class ITERATOR>
36 const std::string& open ,
37 const std::string& close ,
38 const std::string& delim ) ;
48 template <
class TYPE, std::
size_t N>
50 (
const std::array<TYPE,N>& obj , std::ostream&
s )
53 ( obj.begin () , obj.end () ,
s ,
" ( " ,
" )" ,
" , " ) ;
64 #include "GaudiKernel/Parsers.h"
79 template <
class TYPE, std::
size_t N>
81 parse ( std::array<TYPE,N>& result ,
const std::string& input )
83 typedef std::vector<TYPE> _Vct ;
89 if (
N != tmp.size() )
92 std::copy ( tmp.begin() , tmp.end() , result.begin() ) ;
105 #include "GaudiKernel/PropertyTypeTraits.h"
119 template <
class T, std::
size_t N>
120 struct PropertyTypeTraits<
std::
array<T,N> >
123 typedef std::array<T,N> TYPE ;
125 typedef const TYPE&
PRef ;
127 typedef const TYPE*
CVal ;
132 PVal tmp =
new Type ;
133 std::fill_n ( tmp->begin() ,
N , T() ) ;
137 static PVal
new_ (
const Type& right )
139 PVal tmp =
new Type ;
144 static void dele ( PVal right ,
const bool own )
145 {
if ( own ) {
delete right ; } }
147 static PVal
copy ( PVal right ,
const bool own )
149 if ( !own ) {
return right ; }
150 return new_ ( *right ) ;
153 static void assign ( Type& v1 ,
const Type& v2 )
154 { std::copy ( v2.begin() , v2.end() , v1.begin() ) ; }
156 static bool less (
const Type& v1 ,
const Type& v2 )
157 {
return std::lexicographical_compare
158 ( v1.begin() , v1.end () , v2.begin() , v2.end() ) ; }
168 #endif // GAUDIKERNEL_STDARRAYASPROPERTY_H
static PVal new_()
some kind of default constructor
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
bool isFailure() const
Test for a status code of FAILURE.
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
static void assign(Type &v1, PRef v2)
assignment
This class is used for returning status codes from appropriate routines.
static bool less(const Type &v1, const Type &v2)
comparison (needed for bounded verifier)
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
static void dele(PVal right, const bool own)
"smart" destructor
static PVal copy(PVal *right, const bool own)
"smart" copy-constructor
Helper functions to set/get the application return code.