1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Author : Anthony Geay (EDF R&D)
25 def _raiseNow(strCont):
26 raise Exception("The method %s has been called whereas it is an interface !"%strCont)
28 class WrappedType(object):
29 """ Here definition of an interface in python."""
30 __metaclass__=abc.ABCMeta
36 _raiseNow("local_copy")
41 class List(WrappedType):
43 def __getitem__(self,*args):
44 _raiseNow("__getitem__")
46 def __setitem__(self,*args):
47 _raiseNow("__setitem__")
49 def __delitem__(self,*args):
50 _raiseNow("__delitem__")
52 def append(self,*args):
55 def extend(self,*args):
58 def insert(self,*args):
64 def remove(self,*args):
67 def reverse(self,*args):
74 def count(self,*args):
77 def index(self,*args):
84 class Dict(WrappedType):
86 def __getitem__(self,*args):
87 _raiseNow("__getitem__")
89 def __setitem__(self,*args):
90 _raiseNow("__setitem__")
92 def __delitem__(self,*args):
93 _raiseNow("__delitem__")
95 def clear(self,*args):
101 def items(self,*args):
107 def popitem(self,*args):
110 def setdefault(self,*args):
111 _raiseNow("setdefault")
113 def update(self,*args):
116 def values(self,*args):
120 def __contains__(self,*args):
121 _raiseNow("__contains__")
123 def has_key(self,*args):
126 def keys(self,*args):
129 def copy(self,*args):
136 class Tuple(WrappedType):
138 def __getitem__(self,*args):
139 _raiseNow("__getitem__")
142 def count(self,*args):
145 def index(self,*args):
152 class Float(WrappedType):
154 def __iadd__(self,*args):
155 _raiseNow("__iadd__")
157 def __isub__(self,*args):
158 _raiseNow("__isub__")
160 def __imul__(self,*args):
161 _raiseNow("__imul__")
163 def __idiv__(self,*args):
164 _raiseNow("__idiv__")
166 def __add__(self,*args):
169 def __sub__(self,*args):
172 def __mul__(self,*args):
175 def __div__(self,*args):
178 def __pow__(self,*args):
181 def as_integer_ratio(self,*args):
182 _raiseNow("as_integer_ratio")
184 def conjugate(self,*args):
185 _raiseNow("conjugate")
187 def fromhex(self,*args):
193 def imag(self,*args):
196 def is_integer(self,*args):
197 _raiseNow("is_integer")
199 def real(self,*args):
203 class Int(WrappedType):
205 def __iadd__(self,*args):
206 _raiseNow("__iadd__")
208 def __isub__(self,*args):
209 _raiseNow("__isub__")
211 def __imul__(self,*args):
212 _raiseNow("__imul__")
214 def __imod__(self,*args):
215 _raiseNow("__imod__")
217 def __idiv__(self,*args):
218 _raiseNow("__idiv__")
220 def __add__(self,*args):
223 def __sub__(self,*args):
226 def __mul__(self,*args):
229 def __mod__(self,*args):
232 def __div__(self,*args):
235 def __pow__(self,*args):
238 def bit_length(self,*args):
239 _raiseNow("bit_length")
241 def conjugate(self,*args):
242 _raiseNow("conjugate")
244 def denominator(self,*args):
245 _raiseNow("denominator")
247 def imag(self,*args):
250 def numerator(self,*args):
251 _raiseNow("numerator")
253 def real(self,*args):
257 class String(WrappedType):
259 def __add__(self,*args):
262 def __iadd__(self,*args):
263 _raiseNow("__iadd__")
265 def __getitem__(self,*args):
266 _raiseNow("__getitem__")
268 def capitalize(self,*args):
269 _raiseNow("capitalize")
271 def center(self,*args):
274 def count(self,*args):
277 def decode(self,*args):
280 def encode(self,*args):
283 def endswith(self,*args):
284 _raiseNow("endswith")
286 def expandtabs(self,*args):
287 _raiseNow("expandtabs")
289 def find(self,*args):
292 def format(self,*args):
295 def index(self,*args):
298 def isalnum(self,*args):
301 def isalpha(self,*args):
304 def isdigit(self,*args):
307 def islower(self,*args):
310 def isspace(self,*args):
313 def istitle(self,*args):
316 def isupper(self,*args):
319 def join(self,*args):
322 def ljust(self,*args):
325 def lower(self,*args):
328 def lstrip(self,*args):
331 def partition(self,*args):
332 _raiseNow("partition")
334 def replace(self,*args):
337 def rfind(self,*args):
340 def rindex(self,*args):
343 def rjust(self,*args):
346 def rpartition(self,*args):
347 _raiseNow("rpartition")
349 def rsplit(self,*args):
352 def rstrip(self,*args):
355 def split(self,*args):
358 def splitlines(self,*args):
359 _raiseNow("splitlines")
361 def startswith(self,*args):
362 _raiseNow("startswith")
364 def strip(self,*args):
367 def swapcase(self,*args):
368 _raiseNow("swapcase")
370 def title(self,*args):
373 def translate(self,*args):
374 _raiseNow("translate")
376 def upper(self,*args):
379 def zfill(self,*args):