5 #ifndef _ARRAYWRITER_H_
6 #define _ARRAYWRITER_H_
16 const int atypeComponent):
25 void writeFloats(FILE *fp,
const T *data,
const int count,
const int stride,
30 for(
int n=0,i=0; n<count; i+=stride,n++)
32 fprintf(fp,
"%12.5e\n",data[i]);
36 for(
int n=0,i=0; n<count; i+=stride,n++)
37 fprintf(fp,
"%12.5e\n",data[i]);
56 const int atypeComponent) :
61 const int iBeg,
int count,
67 else if (count+iBeg > length)
76 #ifdef USING_ATYPE_TANGENT
83 throw CException(
"invalid component for Tangent");
91 template<
class T,
int N>
101 const int atypeComponent) :
106 const int iBeg,
int count,
112 else if (count+iBeg > length)
127 #ifdef USING_ATYPE_TANGENT
134 throw CException(
"invalid component for Tangent");
137 throw CException(
"masked write not implemented");
159 for(
int nd=ndBeg; nd<ndEnd; nd++)
163 #ifdef USING_ATYPE_TANGENT
170 throw CException(
"invalid component for Tangent");
Vector< T, N > ElementType
virtual void write(FILE *fp, const ArrayType &array, const int iBeg, int count, const Array< bool > *mask=0)
NumTypeTraits< T >::T_BuiltIn T_BuiltIn
Array< ElementType > ArrayType
void write(FILE *fp, const Array< T > &array, const int iBeg, int count, const Array< bool > *mask=0)
void writeFloats(FILE *fp, const T *data, const int count, const int stride, const Array< bool > *mask=0)
const int _atypeComponent
NumTypeTraits< T >::T_Scalar T_Scalar
ArrayWriter(const bool binary, const int vectorComponent, const int atypeComponent)
virtual void * getData() const
Array< ElementType > ArrayType
ScalarArrayWriter(const bool binary, const int vectorComponent, const int atypeComponent)
const int _vectorComponent
VectorArrayWriter(const bool binary, const int vectorComponent, const int atypeComponent)
NumTypeTraits< T >::T_BuiltIn T_BuiltIn