Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/__casac__/tablerow.py: 38%

110 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-10-31 19:53 +0000

1# This file was automatically generated by SWIG (http://www.swig.org). 

2# Version 3.0.12 

3# 

4# Do not make changes to this file unless you know what you are doing--modify 

5# the SWIG interface file instead. 

6 

7from sys import version_info as _swig_python_version_info 

8if _swig_python_version_info >= (2, 7, 0): 

9 def swig_import_helper(): 

10 import importlib 

11 pkg = __name__.rpartition('.')[0] 

12 mname = '.'.join((pkg, '_tablerow')).lstrip('.') 

13 try: 

14 return importlib.import_module(mname) 

15 except ImportError: 

16 return importlib.import_module('_tablerow') 

17 _tablerow = swig_import_helper() 

18 del swig_import_helper 

19elif _swig_python_version_info >= (2, 6, 0): 

20 def swig_import_helper(): 

21 from os.path import dirname 

22 import imp 

23 fp = None 

24 try: 

25 fp, pathname, description = imp.find_module('_tablerow', [dirname(__file__)]) 

26 except ImportError: 

27 import _tablerow 

28 return _tablerow 

29 try: 

30 _mod = imp.load_module('_tablerow', fp, pathname, description) 

31 finally: 

32 if fp is not None: 

33 fp.close() 

34 return _mod 

35 _tablerow = swig_import_helper() 

36 del swig_import_helper 

37else: 

38 import _tablerow 

39del _swig_python_version_info 

40 

41try: 

42 _swig_property = property 

43except NameError: 

44 pass # Python < 2.2 doesn't have 'property'. 

45 

46try: 

47 import builtins as __builtin__ 

48except ImportError: 

49 import __builtin__ 

50 

51def _swig_setattr_nondynamic(self, class_type, name, value, static=1): 

52 if (name == "thisown"): 

53 return self.this.own(value) 

54 if (name == "this"): 

55 if type(value).__name__ == 'SwigPyObject': 

56 self.__dict__[name] = value 

57 return 

58 method = class_type.__swig_setmethods__.get(name, None) 

59 if method: 

60 return method(self, value) 

61 if (not static): 

62 if _newclass: 

63 object.__setattr__(self, name, value) 

64 else: 

65 self.__dict__[name] = value 

66 else: 

67 raise AttributeError("You cannot add attributes to %s" % self) 

68 

69 

70def _swig_setattr(self, class_type, name, value): 

71 return _swig_setattr_nondynamic(self, class_type, name, value, 0) 

72 

73 

74def _swig_getattr(self, class_type, name): 

75 if (name == "thisown"): 

76 return self.this.own() 

77 method = class_type.__swig_getmethods__.get(name, None) 

78 if method: 

79 return method(self) 

80 raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) 

81 

82 

83def _swig_repr(self): 

84 try: 

85 strthis = "proxy of " + self.this.__repr__() 

86 except __builtin__.Exception: 

87 strthis = "" 

88 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 

89 

90try: 

91 _object = object 

92 _newclass = 1 

93except __builtin__.Exception: 

94 class _object: 

95 pass 

96 _newclass = 0 

97 

98class tablerow(_object): 

99 """Proxy of C++ casac::tablerow class.""" 

100 

101 __swig_setmethods__ = {} 

102 __setattr__ = lambda self, name, value: _swig_setattr(self, tablerow, name, value) 

103 __swig_getmethods__ = {} 

104 __getattr__ = lambda self, name: _swig_getattr(self, tablerow, name) 

105 __repr__ = _swig_repr 

106 

107 def __init__(self, *args, **kwargs): 

108 """__init__(self, _table=None, _columnnames, _exclude) -> tablerow""" 

109 this = _tablerow.new_tablerow(*args, **kwargs) 

110 try: 

111 self.this.append(this) 

112 except __builtin__.Exception: 

113 self.this = this 

114 

115 def _iswritable(self): 

116 """ 

117 _iswritable(self) -> bool 

118 

119 

120 

121 Summary: 

122 check to see if row can be modified 

123 

124 Description: 

125 

126 

127 check to see if row can be modified 

128 

129 

130 -------------------------------------------------------------------------------- 

131 

132 """ 

133 return _tablerow.tablerow__iswritable(self) 

134 

135 

136 def iswritable(self): 

137 """ 

138 iswritable(self) -> bool 

139 

140 

141 

142 Summary: 

143 check to see if row can be modified 

144 

145 Description: 

146 

147 

148 check to see if row can be modified 

149 

150 

151 -------------------------------------------------------------------------------- 

152 

153 """ 

154 return _tablerow.tablerow_iswritable(self) 

155 

156 

157 def _get(self, *args, **kwargs): 

158 """ 

159 _get(self, _rownr) -> record * 

160 

161 

162 

163 Summary: 

164 get a single row 

165 

166 Description: 

167 

168 

169 get a single row specified by rownr 

170 

171 

172 Input Parameters: 

173 rownr row number to retrieve 

174 

175 -------------------------------------------------------------------------------- 

176 

177 """ 

178 return _tablerow.tablerow__get(self, *args, **kwargs) 

179 

180 

181 def get(self, *args, **kwargs): 

182 """ 

183 get(self, _rownr) -> record * 

184 

185 

186 

187 Summary: 

188 get a single row 

189 

190 Description: 

191 

192 

193 get a single row specified by rownr 

194 

195 

196 Input Parameters: 

197 rownr row number to retrieve 

198 

199 -------------------------------------------------------------------------------- 

200 

201 """ 

202 return _tablerow.tablerow_get(self, *args, **kwargs) 

203 

204 

205 def _put(self, *args, **kwargs): 

206 """ 

207 _put(self, _rownr, _value, _matchingfields) -> bool 

208 

209 

210 

211 Summary: 

212 put a single row 

213 

214 Description: 

215 

216 

217 put a single row specified by rownr 

218 

219 

220 Input Parameters: 

221 rownr row number to store 

222 value row record to store 

223 matchingfields If true, this means that the value may contain more fields and only fields matching a column name will be used.  

224 

225 -------------------------------------------------------------------------------- 

226 

227 """ 

228 return _tablerow.tablerow__put(self, *args, **kwargs) 

229 

230 

231 def put(self, *args, **kwargs): 

232 """ 

233 put(self, _rownr, _value, _matchingfields) -> bool 

234 

235 

236 

237 Summary: 

238 put a single row 

239 

240 Description: 

241 

242 

243 put a single row specified by rownr 

244 

245 

246 Input Parameters: 

247 rownr row number to store 

248 value row record to store 

249 matchingfields If true, this means that the value may contain more fields and only fields matching a column name will be used.  

250 

251 -------------------------------------------------------------------------------- 

252 

253 """ 

254 return _tablerow.tablerow_put(self, *args, **kwargs) 

255 

256 

257 def __len__(self): 

258 """ 

259 __len__(self) -> long 

260 

261 

262 

263 Summary: 

264 number of rows available 

265 

266 Description: 

267 

268 

269 return the number of available rows for use in subscription 

270 

271 

272 -------------------------------------------------------------------------------- 

273 

274 """ 

275 return _tablerow.tablerow___len__(self) 

276 

277 

278 def __getitem__(self, _rownr=None): 

279 """ 

280 __getitem__(self, _rownr=None) -> PyObj * 

281 

282 

283 

284 Summary: 

285 get row from table 

286 

287 Description: 

288 

289 

290 get one row from the referenced table used in subscription 

291 

292 

293 Input Parameters: 

294 rownr Row number to return  

295 

296 -------------------------------------------------------------------------------- 

297 

298 """ 

299 return _tablerow.tablerow___getitem__(self, _rownr) 

300 

301 

302 def done(self): 

303 """ 

304 done(self) 

305 

306 

307 

308 Summary: 

309 release references to the table resources 

310 

311 Description: 

312 

313 

314 Release the table resources. After this call, the tablerow object will no longer 

315 be useful. 

316 

317 

318 -------------------------------------------------------------------------------- 

319 

320 """ 

321 return _tablerow.tablerow_done(self) 

322 

323 __swig_destroy__ = _tablerow.delete_tablerow 

324 __del__ = lambda self: None 

325tablerow_swigregister = _tablerow.tablerow_swigregister 

326tablerow_swigregister(tablerow) 

327 

328# This file is compatible with both classic and new-style classes. 

329 

330