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
|
C
C File: sort_SimpleCounter_Impl.f
C Symbol: sort.SimpleCounter-v0.1
C Symbol Type: class
C Babel Version: 0.10.2
C Description: Server-side implementation for sort.SimpleCounter
C
C WARNING: Automatically generated; only changes within splicers preserved
C
C babel-version = 0.10.2
C
C
C Symbol "sort.SimpleCounter" (version 0.1)
C
C Simple counter
C
C DO-NOT-DELETE splicer.begin(_miscellaneous_code_start)
C Insert extra code here...
C DO-NOT-DELETE splicer.end(_miscellaneous_code_start)
C
C Class constructor called when the class is created.
C
subroutine sort_SimpleCounter__ctor_fi(self)
implicit none
C in sort.SimpleCounter self
integer*8 self
C DO-NOT-DELETE splicer.begin(sort.SimpleCounter._ctor)
integer*8 data
integer*4 count
call sidl_int__array_create1d_f(1, data)
count = 0
call sidl_int__array_set1_f(data, 0, count)
call sort_SimpleCounter__set_data_f(self, data)
C DO-NOT-DELETE splicer.end(sort.SimpleCounter._ctor)
end
C
C Class destructor called when the class is deleted.
C
subroutine sort_SimpleCounter__dtor_fi(self)
implicit none
C in sort.SimpleCounter self
integer*8 self
C DO-NOT-DELETE splicer.begin(sort.SimpleCounter._dtor)
integer*8 data
call sort_SimpleCounter__get_data_f(self, data)
if (data .ne. 0) then
call sidl_int__array_deleteRef_f(data)
data = 0
call sort_SimpleCounter__set_data_f(self, data)
endif
C DO-NOT-DELETE splicer.end(sort.SimpleCounter._dtor)
end
C
C Static class initializer called exactly once before any user-defined method is dispatched
C
subroutine sort_SimpleCounter__load_fi()
implicit none
C DO-NOT-DELETE splicer.begin(sort.SimpleCounter._load)
C Insert the implementation here...
C DO-NOT-DELETE splicer.end(sort.SimpleCounter._load)
end
C
C Set the count to zero.
C
subroutine sort_SimpleCounter_reset_fi(self)
implicit none
C in sort.SimpleCounter self
integer*8 self
C DO-NOT-DELETE splicer.begin(sort.SimpleCounter.reset)
integer*8 data
Integer*4 zero
call sort_SimpleCounter__get_data_f(self, data)
if (data .ne. 0) then
zero = 0
call sidl_int__array_set1_f(data, 0, zero)
endif
C DO-NOT-DELETE splicer.end(sort.SimpleCounter.reset)
end
C
C Return the current count.
C
subroutine sort_SimpleCounter_getCount_fi(self, retval)
implicit none
C in sort.SimpleCounter self
integer*8 self
C out int retval
integer*4 retval
C DO-NOT-DELETE splicer.begin(sort.SimpleCounter.getCount)
integer*8 data
retval = 0
call sort_SimpleCounter__get_data_f(self, data)
if (data .ne. 0) then
call sidl_int__array_get1_f(data, 0, retval)
endif
C DO-NOT-DELETE splicer.end(sort.SimpleCounter.getCount)
end
C
C Increment the count (i.e. add one).
C
subroutine sort_SimpleCounter_inc_fi(self, retval)
implicit none
C in sort.SimpleCounter self
integer*8 self
C out int retval
integer*4 retval
C DO-NOT-DELETE splicer.begin(sort.SimpleCounter.inc)
integer*8 data
retval = 0
call sort_SimpleCounter__get_data_f(self, data)
if (data .ne. 0) then
call sidl_int__array_get1_f(data, 0, retval)
retval = retval + 1
call sidl_int__array_set1_f(data, 0, retval)
endif
C DO-NOT-DELETE splicer.end(sort.SimpleCounter.inc)
end
C DO-NOT-DELETE splicer.begin(_miscellaneous_code_end)
C Insert extra code here...
C DO-NOT-DELETE splicer.end(_miscellaneous_code_end)
|