3 #ifndef GAUDIKERNEL_BOOSTARRAYASPROPERTY_H
4 #define GAUDIKERNEL_BOOSTARRAYASPROPERTY_H 1
14 #include "boost/array.hpp"
34 template <
class ITERATOR>
39 const std::string& open ,
40 const std::string& close ,
41 const std::string& delim ) ;
51 template <
class TYPE, std::
size_t N>
53 (
const boost::array<TYPE,N>& obj , std::ostream&
s )
56 ( obj.begin () , obj.end () ,
s ,
"( " ,
" )" ,
" , " ) ;
82 template <
class TYPE, std::
size_t N>
84 parse ( boost::array<TYPE,N>& result ,
const std::string& input )
86 typedef std::vector<TYPE> _Vct ;
92 if (
N != tmp.size() )
95 std::copy ( tmp.begin() , tmp.end() , result.begin() ) ;
122 template <
class T, std::
size_t N>
126 typedef boost::array<T,N>
TYPE ;
136 std::fill_n ( tmp->begin() ,
N , T() ) ;
143 assign ( *tmp , right ) ;
147 static void dele (
PVal right ,
const bool own )
148 {
if ( own ) {
delete right ; } }
152 if ( !own ) {
return right ; }
153 return new_ ( *right ) ;
157 { std::copy ( v2.begin() , v2.end() , v1.begin() ) ; }
159 static bool less (
const Type& v1 ,
const Type& v2 )
160 {
return std::lexicographical_compare
161 ( v1.begin() , v1.end () , v2.begin() , v2.end() ) ; }
171 #endif // GAUDIKERNEL_BOOSTARRAYASPROPERTY_H