source: Sophya/trunk/SophyaLib/BaseTools/ppftpointerio.cc@ 2790

Last change on this file since 2790 was 2704, checked in by ansari, 20 years ago

Ajout/suppression de DECL_TEMP_SPEC ds ppftpointerio.cc .h pour compil sur SGI-CC , Reza 27/04/2005

File size: 4.4 KB
Line 
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//----------------------------------------------------------------------
11namespace SOPHYA {
12
13// Specific implementation using table I/O in PPFBinaryIOStreams
14/* DECL_TEMP_SPEC equivalent a template <> , pour SGI-CC en particulier */
15void PPF_TPointer_IO<char>::Write(POutPersist & os, char const * arr, size_t n)
16 { os.PutBytes(arr,n); }
17void PPF_TPointer_IO<char>::Read(PInPersist & is, char * arr, size_t n)
18 { is.GetBytes(arr,n); }
19
20void PPF_TPointer_IO< int_1 >::Write(POutPersist & os, int_1 const * arr, size_t n)
21 { os.Put(arr,n); }
22void PPF_TPointer_IO< int_1 >::Read(PInPersist & is, int_1 * arr, size_t n)
23 { is.Get(arr,n); }
24
25void PPF_TPointer_IO< uint_1 >::Write(POutPersist & os, uint_1 const * arr, size_t n)
26 { os.Put(arr,n); }
27void PPF_TPointer_IO< uint_1 >::Read(PInPersist & is, uint_1 * arr, size_t n)
28 { is.Get(arr,n); }
29
30void PPF_TPointer_IO< int_2 >::Write(POutPersist & os, int_2 const * arr, size_t n)
31 { os.Put(arr,n); }
32void PPF_TPointer_IO< int_2 >::Read(PInPersist & is, int_2 * arr, size_t n)
33 { is.Get(arr,n); }
34
35void PPF_TPointer_IO< uint_2 >::Write(POutPersist & os, uint_2 const * arr, size_t n)
36 { os.Put(arr,n); }
37void PPF_TPointer_IO< uint_2 >::Read(PInPersist & is, uint_2 * arr, size_t n)
38 { is.Get(arr,n); }
39
40void PPF_TPointer_IO< int_4 >::Write(POutPersist & os, int_4 const * arr, size_t n)
41 { os.Put(arr,n); }
42void PPF_TPointer_IO< int_4 >::Read(PInPersist & is, int_4 * arr, size_t n)
43 { is.Get(arr,n); }
44
45void PPF_TPointer_IO< uint_4 >::Write(POutPersist & os, uint_4 const * arr, size_t n)
46 { os.Put(arr,n); }
47void PPF_TPointer_IO< uint_4 >::Read(PInPersist & is, uint_4 * arr, size_t n)
48 { is.Get(arr,n); }
49
50void PPF_TPointer_IO< int_8 >::Write(POutPersist & os, int_8 const * arr, size_t n)
51 { os.Put(arr,n); }
52void PPF_TPointer_IO< int_8 >::Read(PInPersist & is, int_8 * arr, size_t n)
53 { is.Get(arr,n); }
54
55void PPF_TPointer_IO< uint_8 >::Write(POutPersist & os, uint_8 const * arr, size_t n)
56 { os.Put(arr,n); }
57void PPF_TPointer_IO< uint_8 >::Read(PInPersist & is, uint_8 * arr, size_t n)
58 { is.Get(arr,n); }
59
60
61void PPF_TPointer_IO< r_4 >::Write(POutPersist & os, r_4 const * arr, size_t n)
62 { os.Put(arr,n); }
63void PPF_TPointer_IO< r_4 >::Read(PInPersist & is, r_4 * arr, size_t n)
64 { is.Get(arr,n); }
65
66void PPF_TPointer_IO< r_8 >::Write(POutPersist & os, r_8 const * arr, size_t n)
67 { os.Put(arr,n); }
68void PPF_TPointer_IO< r_8 >::Read(PInPersist & is, r_8 * arr, size_t n)
69 { is.Get(arr,n); }
70
71void PPF_TPointer_IO< complex<r_4> >::Write(POutPersist & os, complex<r_4> const * arr, size_t n)
72 { os.Put(arr,n); }
73void PPF_TPointer_IO< complex<r_4> >::Read(PInPersist & is, complex<r_4> * arr, size_t n)
74 { is.Get(arr,n); }
75
76void PPF_TPointer_IO< complex<r_8> >::Write(POutPersist & os, complex<r_8> const * arr, size_t n)
77 { os.Put(arr,n); }
78void PPF_TPointer_IO< complex<r_8> >::Read(PInPersist & is, complex<r_8> * arr, size_t n)
79 { is.Get(arr,n); }
80
81
82} // namespace SOPHYA
83/*
84#ifdef __CXX_PRAGMA_TEMPLATES__
85#pragma define_template PPF_TPointer_IO< char >
86#pragma define_template PPF_TPointer_IO< int_1 >
87#pragma define_template PPF_TPointer_IO< uint_1 >
88#pragma define_template PPF_TPointer_IO< int_2 >
89#pragma define_template PPF_TPointer_IO< uint_2 >
90#pragma define_template PPF_TPointer_IO< int_4 >
91#pragma define_template PPF_TPointer_IO< uint_4 >
92#pragma define_template PPF_TPointer_IO< int_8 >
93#pragma define_template PPF_TPointer_IO< uint_8 >
94#pragma define_template PPF_TPointer_IO< r_4 >
95#pragma define_template PPF_TPointer_IO< r_8 >
96#pragma define_template PPF_TPointer_IO< complex<r_4> >
97#pragma define_template PPF_TPointer_IO< complex<r_8> >
98#endif
99
100#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
101template class PPF_TPointer_IO< char >;
102template class PPF_TPointer_IO< int_1 >;
103template class PPF_TPointer_IO< uint_1 >;
104template class PPF_TPointer_IO< int_2 >;
105template class PPF_TPointer_IO< uint_2 >;
106template class PPF_TPointer_IO< int_4 >;
107template class PPF_TPointer_IO< uint_4 >;
108template class PPF_TPointer_IO< int_8 >;
109template class PPF_TPointer_IO< uint_8 >;
110template class PPF_TPointer_IO< r_4 >;
111template class PPF_TPointer_IO< r_8 >;
112template class PPF_TPointer_IO< complex<r_4> >;
113template class PPF_TPointer_IO< complex<r_8> >;
114#endif
115*/
Note: See TracBrowser for help on using the repository browser.