File: Strings_Cstring_Impl.F90

package info (click to toggle)
babel 0.10.2-1
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 43,932 kB
  • ctags: 29,707
  • sloc: java: 74,695; ansic: 73,142; cpp: 40,649; sh: 18,411; f90: 10,062; fortran: 6,727; python: 6,406; makefile: 3,866; xml: 118; perl: 48
file content (279 lines) | stat: -rw-r--r-- 7,928 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
! 
! File:          Strings_Cstring_Impl.F90
! Symbol:        Strings.Cstring-v1.1
! Symbol Type:   class
! Babel Version: 0.10.2
! Description:   Server-side implementation for Strings.Cstring
! 
! WARNING: Automatically generated; only changes within splicers preserved
! 
! babel-version = 0.10.2
! 


! 
! Symbol "Strings.Cstring" (version 1.1)
! 
! Class to allow testing of string passing using every possible mode.
! 


#include "Strings_Cstring_fAbbrev.h"
#include "sidl_ClassInfo_fAbbrev.h"
#include "sidl_BaseInterface_fAbbrev.h"
#include "sidl_BaseClass_fAbbrev.h"
! DO-NOT-DELETE splicer.begin(_miscellaneous_code_start)
! Insert extra code here...
! DO-NOT-DELETE splicer.end(_miscellaneous_code_start)




! 
! Class constructor called when the class is created.
! 

recursive subroutine Strings_Cstring__ctor_mi(self)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring._ctor.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring._ctor.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in

! DO-NOT-DELETE splicer.begin(Strings.Cstring._ctor)
! Insert the implementation here...
! DO-NOT-DELETE splicer.end(Strings.Cstring._ctor)
end subroutine Strings_Cstring__ctor_mi


! 
! Class destructor called when the class is deleted.
! 

recursive subroutine Strings_Cstring__dtor_mi(self)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring._dtor.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring._dtor.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in

! DO-NOT-DELETE splicer.begin(Strings.Cstring._dtor)
! Insert the implementation here...
! DO-NOT-DELETE splicer.end(Strings.Cstring._dtor)
end subroutine Strings_Cstring__dtor_mi


! 
! Static class initializer called exactly once before any user-defined method is dispatched
! 

recursive subroutine Strings_Cstring__load_mi()
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring._load.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring._load.use)
  implicit none

! DO-NOT-DELETE splicer.begin(Strings.Cstring._load)
! Insert the implementation here...
! DO-NOT-DELETE splicer.end(Strings.Cstring._load)
end subroutine Strings_Cstring__load_mi


! 
! If <code>nonNull</code> is <code>true</code>, this will
! return "Three"; otherwise, it will return a NULL or empty string.
! 

recursive subroutine Strings_Cstring_returnback_mi(self, nonNull, retval)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring.returnback.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring.returnback.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in
  logical :: nonNull ! in
  character (len=*) :: retval ! out

! DO-NOT-DELETE splicer.begin(Strings.Cstring.returnback)
  if (nonNull) then
     retval = 'Three'
  else
     retval = ''
  endif
! DO-NOT-DELETE splicer.end(Strings.Cstring.returnback)
end subroutine Strings_Cstring_returnback_mi


! 
! This will return <code>true</code> iff <code>c</code> equals "Three".
! 

recursive subroutine Strings_Cstring_passin_mi(self, c, retval)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring.passin.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring.passin.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in
  character (len=*) :: c ! in
  logical :: retval ! out

! DO-NOT-DELETE splicer.begin(Strings.Cstring.passin)
  retval = (c .eq. 'Three')
! DO-NOT-DELETE splicer.end(Strings.Cstring.passin)
end subroutine Strings_Cstring_passin_mi


! 
! If <code>nonNull</code> is <code>true</code>, this will return
! "Three" in <code>c</code>; otherwise, it will return a null or
! empty string. The return value is <code>false</code> iff 
! the outgoing value of <code>c</code> is <code>null</code>.
! 

recursive subroutine Strings_Cstring_passout_mi(self, nonNull, c, retval)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring.passout.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring.passout.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in
  logical :: nonNull ! in
  character (len=*) :: c ! out
  logical :: retval ! out

! DO-NOT-DELETE splicer.begin(Strings.Cstring.passout)
  if (nonNull) then
     c = 'Three'
     retval = .true.
  else
     c = ''
     retval = .false.
  endif
! DO-NOT-DELETE splicer.end(Strings.Cstring.passout)
end subroutine Strings_Cstring_passout_mi


! 
! Method:  passinout[]
! 

recursive subroutine Strings_Cstring_passinout_mi(self, c, retval)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring.passinout.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring.passinout.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in
  character (len=*) :: c ! inout
  logical :: retval ! out

! DO-NOT-DELETE splicer.begin(Strings.Cstring.passinout)
  integer i
  retval = .false.
  if (len(c) .ge. 1) then
     do i = len(c), 1, -1
        if (c(i:i) .ne. ' ') then
           if (i .lt. len(c)) then
              c(i+1:i+1) = 's'
              retval = .true.
           endif
           goto 100
        endif
     end do
100  if (c(1:1) .ge. 'a' .and. c(1:1) .le. 'z') then
        c(1:1) = char(ichar(c(1:1)) - 32)
     else
        if (c(1:1) .ge. 'A' .and. c(1:1) .le. 'Z') then
           c(1:1) = char(ichar(c(1:1)) + 32)
        endif
     endif
  else
     retval = .false.
  endif
! DO-NOT-DELETE splicer.end(Strings.Cstring.passinout)
end subroutine Strings_Cstring_passinout_mi


! 
! Method:  passeverywhere[]
! 

recursive subroutine Cst_passeverywhere1q5fsozb7a_mi(self, c1, c2, c3, retval)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring.passeverywhere.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring.passeverywhere.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in
  character (len=*) :: c1 ! in
  character (len=*) :: c2 ! out
  character (len=*) :: c3 ! inout
  character (len=*) :: retval ! out

! DO-NOT-DELETE splicer.begin(Strings.Cstring.passeverywhere)
  integer i
  c2 = 'Three'
  if (c1 .eq. 'Three') then
     retval = 'Three'
  else
     retval = ''
  endif
  if (len(c3) .ge. 1) then
     do i = len(c3), 1, -1
        if (c3(i:i) .ne. ' ') then
           c3(i:i) = ' '
           goto 100
        endif
     end do
100  if (c3(1:1) .ge. 'a' .and. c3(1:1) .le. 'z') then
        c3(1:1) = char(ichar(c3(1:1)) - 32)
     else
        if (c3(1:1) .ge. 'A' .and. c3(1:1) .le. 'Z') then
           c3(1:1) = char(ichar(c3(1:1)) + 32)
        endif
     endif
  endif
! DO-NOT-DELETE splicer.end(Strings.Cstring.passeverywhere)
end subroutine Cst_passeverywhere1q5fsozb7a_mi


! 
! Method:  mixedarguments[]
! 

recursive subroutine Cst_mixedargumentsgdf1o24zbg_mi(self, s1, c1, s2, c2,     &
  retval)
  use Strings_Cstring
  use Strings_Cstring_impl
  ! DO-NOT-DELETE splicer.begin(Strings.Cstring.mixedarguments.use)
  ! Insert use statements here...
  ! DO-NOT-DELETE splicer.end(Strings.Cstring.mixedarguments.use)
  implicit none
  type(Strings_Cstring_t) :: self ! in
  character (len=*) :: s1 ! in
  character (len=1) :: c1 ! in
  character (len=*) :: s2 ! in
  character (len=1) :: c2 ! in
  logical :: retval ! out

! DO-NOT-DELETE splicer.begin(Strings.Cstring.mixedarguments)
  retval = ((c1 .eq. c2) .and. (s1 .eq. s2))
! DO-NOT-DELETE splicer.end(Strings.Cstring.mixedarguments)
end subroutine Cst_mixedargumentsgdf1o24zbg_mi


! DO-NOT-DELETE splicer.begin(_miscellaneous_code_end)
! Insert extra code here...
! DO-NOT-DELETE splicer.end(_miscellaneous_code_end)