1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | // Classe pour faciliter entree-sortie PPF pour des pointeurs
|
---|
3 | // Implementation specifique pour certains type de pointeurs
|
---|
4 | // R. Ansari - Mars 2005
|
---|
5 |
|
---|
6 | #include "machdefs.h"
|
---|
7 | #include "sopnamsp.h"
|
---|
8 | #include "ppftpointerio.h"
|
---|
9 |
|
---|
10 | //----------------------------------------------------------------------
|
---|
11 | namespace SOPHYA {
|
---|
12 | //! \cond
|
---|
13 | // Specific implementation using table I/O in PPFBinaryIOStreams
|
---|
14 | /* DECL_TEMP_SPEC equivalent a template <> , pour SGI-CC en particulier */
|
---|
15 | void PPF_TPointer_IO<char>::Write(POutPersist & os, char const * arr, size_t n)
|
---|
16 | { os.PutBytes(arr,n); }
|
---|
17 | void PPF_TPointer_IO<char>::Read(PInPersist & is, char * arr, size_t n)
|
---|
18 | { is.GetBytes(arr,n); }
|
---|
19 |
|
---|
20 | void PPF_TPointer_IO< int_1 >::Write(POutPersist & os, int_1 const * arr, size_t n)
|
---|
21 | { os.Put(arr,n); }
|
---|
22 | void PPF_TPointer_IO< int_1 >::Read(PInPersist & is, int_1 * arr, size_t n)
|
---|
23 | { is.Get(arr,n); }
|
---|
24 |
|
---|
25 | void PPF_TPointer_IO< uint_1 >::Write(POutPersist & os, uint_1 const * arr, size_t n)
|
---|
26 | { os.Put(arr,n); }
|
---|
27 | void PPF_TPointer_IO< uint_1 >::Read(PInPersist & is, uint_1 * arr, size_t n)
|
---|
28 | { is.Get(arr,n); }
|
---|
29 |
|
---|
30 | void PPF_TPointer_IO< int_2 >::Write(POutPersist & os, int_2 const * arr, size_t n)
|
---|
31 | { os.Put(arr,n); }
|
---|
32 | void PPF_TPointer_IO< int_2 >::Read(PInPersist & is, int_2 * arr, size_t n)
|
---|
33 | { is.Get(arr,n); }
|
---|
34 |
|
---|
35 | void PPF_TPointer_IO< uint_2 >::Write(POutPersist & os, uint_2 const * arr, size_t n)
|
---|
36 | { os.Put(arr,n); }
|
---|
37 | void PPF_TPointer_IO< uint_2 >::Read(PInPersist & is, uint_2 * arr, size_t n)
|
---|
38 | { is.Get(arr,n); }
|
---|
39 |
|
---|
40 | void PPF_TPointer_IO< int_4 >::Write(POutPersist & os, int_4 const * arr, size_t n)
|
---|
41 | { os.Put(arr,n); }
|
---|
42 | void PPF_TPointer_IO< int_4 >::Read(PInPersist & is, int_4 * arr, size_t n)
|
---|
43 | { is.Get(arr,n); }
|
---|
44 |
|
---|
45 | void PPF_TPointer_IO< uint_4 >::Write(POutPersist & os, uint_4 const * arr, size_t n)
|
---|
46 | { os.Put(arr,n); }
|
---|
47 | void PPF_TPointer_IO< uint_4 >::Read(PInPersist & is, uint_4 * arr, size_t n)
|
---|
48 | { is.Get(arr,n); }
|
---|
49 |
|
---|
50 | void PPF_TPointer_IO< int_8 >::Write(POutPersist & os, int_8 const * arr, size_t n)
|
---|
51 | { os.Put(arr,n); }
|
---|
52 | void PPF_TPointer_IO< int_8 >::Read(PInPersist & is, int_8 * arr, size_t n)
|
---|
53 | { is.Get(arr,n); }
|
---|
54 |
|
---|
55 | void PPF_TPointer_IO< uint_8 >::Write(POutPersist & os, uint_8 const * arr, size_t n)
|
---|
56 | { os.Put(arr,n); }
|
---|
57 | void PPF_TPointer_IO< uint_8 >::Read(PInPersist & is, uint_8 * arr, size_t n)
|
---|
58 | { is.Get(arr,n); }
|
---|
59 |
|
---|
60 |
|
---|
61 | void PPF_TPointer_IO< r_4 >::Write(POutPersist & os, r_4 const * arr, size_t n)
|
---|
62 | { os.Put(arr,n); }
|
---|
63 | void PPF_TPointer_IO< r_4 >::Read(PInPersist & is, r_4 * arr, size_t n)
|
---|
64 | { is.Get(arr,n); }
|
---|
65 |
|
---|
66 | void PPF_TPointer_IO< r_8 >::Write(POutPersist & os, r_8 const * arr, size_t n)
|
---|
67 | { os.Put(arr,n); }
|
---|
68 | void PPF_TPointer_IO< r_8 >::Read(PInPersist & is, r_8 * arr, size_t n)
|
---|
69 | { is.Get(arr,n); }
|
---|
70 |
|
---|
71 | void PPF_TPointer_IO< complex<r_4> >::Write(POutPersist & os, complex<r_4> const * arr, size_t n)
|
---|
72 | { os.Put(arr,n); }
|
---|
73 | void PPF_TPointer_IO< complex<r_4> >::Read(PInPersist & is, complex<r_4> * arr, size_t n)
|
---|
74 | { is.Get(arr,n); }
|
---|
75 |
|
---|
76 | void PPF_TPointer_IO< complex<r_8> >::Write(POutPersist & os, complex<r_8> const * arr, size_t n)
|
---|
77 | { os.Put(arr,n); }
|
---|
78 | void PPF_TPointer_IO< complex<r_8> >::Read(PInPersist & is, complex<r_8> * arr, size_t n)
|
---|
79 | { is.Get(arr,n); }
|
---|
80 |
|
---|
81 | //! \endcond
|
---|
82 |
|
---|
83 | } // namespace SOPHYA
|
---|
84 | /*
|
---|
85 | #ifdef __CXX_PRAGMA_TEMPLATES__
|
---|
86 | #pragma define_template PPF_TPointer_IO< char >
|
---|
87 | #pragma define_template PPF_TPointer_IO< int_1 >
|
---|
88 | #pragma define_template PPF_TPointer_IO< uint_1 >
|
---|
89 | #pragma define_template PPF_TPointer_IO< int_2 >
|
---|
90 | #pragma define_template PPF_TPointer_IO< uint_2 >
|
---|
91 | #pragma define_template PPF_TPointer_IO< int_4 >
|
---|
92 | #pragma define_template PPF_TPointer_IO< uint_4 >
|
---|
93 | #pragma define_template PPF_TPointer_IO< int_8 >
|
---|
94 | #pragma define_template PPF_TPointer_IO< uint_8 >
|
---|
95 | #pragma define_template PPF_TPointer_IO< r_4 >
|
---|
96 | #pragma define_template PPF_TPointer_IO< r_8 >
|
---|
97 | #pragma define_template PPF_TPointer_IO< complex<r_4> >
|
---|
98 | #pragma define_template PPF_TPointer_IO< complex<r_8> >
|
---|
99 | #endif
|
---|
100 |
|
---|
101 | #if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
|
---|
102 | namespace SOPHYA {
|
---|
103 | template class PPF_TPointer_IO< char >;
|
---|
104 | template class PPF_TPointer_IO< int_1 >;
|
---|
105 | template class PPF_TPointer_IO< uint_1 >;
|
---|
106 | template class PPF_TPointer_IO< int_2 >;
|
---|
107 | template class PPF_TPointer_IO< uint_2 >;
|
---|
108 | template class PPF_TPointer_IO< int_4 >;
|
---|
109 | template class PPF_TPointer_IO< uint_4 >;
|
---|
110 | template class PPF_TPointer_IO< int_8 >;
|
---|
111 | template class PPF_TPointer_IO< uint_8 >;
|
---|
112 | template class PPF_TPointer_IO< r_4 >;
|
---|
113 | template class PPF_TPointer_IO< r_8 >;
|
---|
114 | template class PPF_TPointer_IO< complex<r_4> >;
|
---|
115 | template class PPF_TPointer_IO< complex<r_8> >;
|
---|
116 | }
|
---|
117 | #endif
|
---|
118 | */
|
---|