stringto
1# This file was automatically generated by SWIG (https://www.swig.org). 2# Version 4.2.1 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 8from mock_rtems import _stringto as _stringto 9 10try: 11 import builtins as __builtin__ 12except ImportError: 13 import __builtin__ 14 15def _swig_repr(self): 16 try: 17 strthis = "proxy of " + self.this.__repr__() 18 except __builtin__.Exception: 19 strthis = "" 20 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 21 22 23def _swig_setattr_nondynamic_instance_variable(set): 24 def set_instance_attr(self, name, value): 25 if name == "this": 26 set(self, name, value) 27 elif name == "thisown": 28 self.this.own(value) 29 elif hasattr(self, name) and isinstance(getattr(type(self), name), property): 30 set(self, name, value) 31 else: 32 raise AttributeError("You cannot add instance attributes to %s" % self) 33 return set_instance_attr 34 35 36def _swig_setattr_nondynamic_class_variable(set): 37 def set_class_attr(cls, name, value): 38 if hasattr(cls, name) and not isinstance(getattr(cls, name), property): 39 set(cls, name, value) 40 else: 41 raise AttributeError("You cannot add class attributes to %s" % cls) 42 return set_class_attr 43 44 45def _swig_add_metaclass(metaclass): 46 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" 47 def wrapper(cls): 48 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) 49 return wrapper 50 51 52class _SwigNonDynamicMeta(type): 53 """Meta class to enforce nondynamic attributes (no new attributes) for a class""" 54 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) 55 56 57 58def rtems_string_to_pointer(s, n, endptr): 59 r""" 60 Convert String to Pointer (with validation). 61 62 This method converts a string to a pointer (void *) with 63 basic numeric validation. 64 65 :type s: string, in 66 :param s: is the string to convert 67 :type n: void, in 68 :param n: points to the variable to place the converted output in 69 :type endptr: string, in 70 :param endptr: is used to keep track of the position in the string 71 """ 72 return _stringto.rtems_string_to_pointer(s, n, endptr) 73 74def rtems_string_to_unsigned_char(s, n, endptr, base): 75 r""" 76 Convert String to Unsigned Character (with validation). 77 78 This method converts a string to an unsigned character with 79 range validation. 80 81 :type s: string, in 82 :param s: is the string to convert 83 :type n: unsigned char, in 84 :param n: points to the variable to place the converted output in 85 :type endptr: string, in 86 :param endptr: is used to keep track of the position in the string 87 :type base: int, in 88 :param base: is the expected base of the number 89 """ 90 return _stringto.rtems_string_to_unsigned_char(s, n, endptr, base) 91 92def rtems_string_to_int(s, n, endptr, base): 93 r""" 94 Convert String to Int (with validation). 95 96 This method converts a string to an int with range validation. 97 98 :type s: string, in 99 :param s: is the string to convert 100 :type n: int, in 101 :param n: points to the variable to place the converted output in 102 :type endptr: string, in 103 :param endptr: is used to keep track of the position in the string 104 :type base: int, in 105 :param base: is the expected base of the number 106 """ 107 return _stringto.rtems_string_to_int(s, n, endptr, base) 108 109def rtems_string_to_unsigned_int(s, n, endptr, base): 110 r""" 111 Convert String to Unsigned Int (with validation). 112 113 This method converts a string to an unsigned int with range validation. 114 115 :type s: string, in 116 :param s: is the string to convert 117 :type n: int, in 118 :param n: points to the variable to place the converted output in 119 :type endptr: string, in 120 :param endptr: is used to keep track of the position in the string 121 :type base: int, in 122 :param base: is the expected base of the number 123 """ 124 return _stringto.rtems_string_to_unsigned_int(s, n, endptr, base) 125 126def rtems_string_to_long(s, n, endptr, base): 127 r""" 128 Convert String to Long (with validation). 129 130 This method converts a string to a long with 131 range validation. 132 133 :type s: string, in 134 :param s: is the string to convert 135 :type n: int, in 136 :param n: points to the variable to place the converted output in 137 :type endptr: string, in 138 :param endptr: is used to keep track of the position in the string 139 :type base: int, in 140 :param base: is the expected base of the number 141 """ 142 return _stringto.rtems_string_to_long(s, n, endptr, base) 143 144def rtems_string_to_unsigned_long(s, n, endptr, base): 145 r""" 146 Convert String to Unsigned Long (with validation). 147 148 This method converts a string to an unsigned long with 149 range validation. 150 151 :type s: string, in 152 :param s: is the string to convert 153 :type n: int, in 154 :param n: points to the variable to place the converted output in 155 :type endptr: string, in 156 :param endptr: is used to keep track of the position in the string 157 :type base: int, in 158 :param base: is the expected base of the number 159 """ 160 return _stringto.rtems_string_to_unsigned_long(s, n, endptr, base) 161 162def rtems_string_to_long_long(s, n, endptr, base): 163 r""" 164 Convert String to Long Long (with validation). 165 166 This method converts a string to a long long with 167 range validation. 168 169 :type s: string, in 170 :param s: is the string to convert 171 :type n: int, in 172 :param n: points to the variable to place the converted output in 173 :type endptr: string, in 174 :param endptr: is used to keep track of the position in the string 175 :type base: int, in 176 :param base: is the expected base of the number 177 """ 178 return _stringto.rtems_string_to_long_long(s, n, endptr, base) 179 180def rtems_string_to_unsigned_long_long(s, n, endptr, base): 181 r""" 182 Convert String to Unsigned Long Long (with validation). 183 184 This method converts a string to an unsigned character with 185 range validation. 186 187 :type s: string, in 188 :param s: is the string to convert 189 :type n: int, in 190 :param n: points to the variable to place the converted output in 191 :type endptr: string, in 192 :param endptr: is used to keep track of the position in the string 193 :type base: int, in 194 :param base: is the expected base of the number 195 """ 196 return _stringto.rtems_string_to_unsigned_long_long(s, n, endptr, base) 197 198def rtems_string_to_float(s, n, endptr): 199 r""" 200 Convert String to Float (with validation). 201 202 This method converts a string to a float with range validation. 203 204 :type s: string, in 205 :param s: is the string to convert 206 :type n: float, in 207 :param n: points to the variable to place the converted output in 208 :type endptr: string, in 209 :param endptr: is used to keep track of the position in the string 210 """ 211 return _stringto.rtems_string_to_float(s, n, endptr) 212 213def rtems_string_to_double(s, n, endptr): 214 r""" 215 Convert String to Double (with validation). 216 217 This method converts a string to a double with range validation. 218 219 :type s: string, in 220 :param s: is the string to convert 221 :type n: float, in 222 :param n: points to the variable to place the converted output in 223 :type endptr: string, in 224 :param endptr: is used to keep track of the position in the string 225 """ 226 return _stringto.rtems_string_to_double(s, n, endptr) 227 228def rtems_string_to_long_double(s, n, endptr): 229 r""" 230 Convert String to long double (with validation). 231 232 This method converts a string to a long double with range validation. 233 234 :type s: string, in 235 :param s: is the string to convert 236 :type n: float, in 237 :param n: points to the variable to place the converted output in 238 :type endptr: string, in 239 :param endptr: is used to keep track of the position in the string 240 """ 241 return _stringto.rtems_string_to_long_double(s, n, endptr)
59def rtems_string_to_pointer(s, n, endptr): 60 r""" 61 Convert String to Pointer (with validation). 62 63 This method converts a string to a pointer (void *) with 64 basic numeric validation. 65 66 :type s: string, in 67 :param s: is the string to convert 68 :type n: void, in 69 :param n: points to the variable to place the converted output in 70 :type endptr: string, in 71 :param endptr: is used to keep track of the position in the string 72 """ 73 return _stringto.rtems_string_to_pointer(s, n, endptr)
Convert String to Pointer (with validation).
This method converts a string to a pointer (void *) with basic numeric validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
75def rtems_string_to_unsigned_char(s, n, endptr, base): 76 r""" 77 Convert String to Unsigned Character (with validation). 78 79 This method converts a string to an unsigned character with 80 range validation. 81 82 :type s: string, in 83 :param s: is the string to convert 84 :type n: unsigned char, in 85 :param n: points to the variable to place the converted output in 86 :type endptr: string, in 87 :param endptr: is used to keep track of the position in the string 88 :type base: int, in 89 :param base: is the expected base of the number 90 """ 91 return _stringto.rtems_string_to_unsigned_char(s, n, endptr, base)
Convert String to Unsigned Character (with validation).
This method converts a string to an unsigned character with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
- base: is the expected base of the number
93def rtems_string_to_int(s, n, endptr, base): 94 r""" 95 Convert String to Int (with validation). 96 97 This method converts a string to an int with range validation. 98 99 :type s: string, in 100 :param s: is the string to convert 101 :type n: int, in 102 :param n: points to the variable to place the converted output in 103 :type endptr: string, in 104 :param endptr: is used to keep track of the position in the string 105 :type base: int, in 106 :param base: is the expected base of the number 107 """ 108 return _stringto.rtems_string_to_int(s, n, endptr, base)
Convert String to Int (with validation).
This method converts a string to an int with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
- base: is the expected base of the number
110def rtems_string_to_unsigned_int(s, n, endptr, base): 111 r""" 112 Convert String to Unsigned Int (with validation). 113 114 This method converts a string to an unsigned int with range validation. 115 116 :type s: string, in 117 :param s: is the string to convert 118 :type n: int, in 119 :param n: points to the variable to place the converted output in 120 :type endptr: string, in 121 :param endptr: is used to keep track of the position in the string 122 :type base: int, in 123 :param base: is the expected base of the number 124 """ 125 return _stringto.rtems_string_to_unsigned_int(s, n, endptr, base)
Convert String to Unsigned Int (with validation).
This method converts a string to an unsigned int with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
- base: is the expected base of the number
127def rtems_string_to_long(s, n, endptr, base): 128 r""" 129 Convert String to Long (with validation). 130 131 This method converts a string to a long with 132 range validation. 133 134 :type s: string, in 135 :param s: is the string to convert 136 :type n: int, in 137 :param n: points to the variable to place the converted output in 138 :type endptr: string, in 139 :param endptr: is used to keep track of the position in the string 140 :type base: int, in 141 :param base: is the expected base of the number 142 """ 143 return _stringto.rtems_string_to_long(s, n, endptr, base)
Convert String to Long (with validation).
This method converts a string to a long with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
- base: is the expected base of the number
145def rtems_string_to_unsigned_long(s, n, endptr, base): 146 r""" 147 Convert String to Unsigned Long (with validation). 148 149 This method converts a string to an unsigned long with 150 range validation. 151 152 :type s: string, in 153 :param s: is the string to convert 154 :type n: int, in 155 :param n: points to the variable to place the converted output in 156 :type endptr: string, in 157 :param endptr: is used to keep track of the position in the string 158 :type base: int, in 159 :param base: is the expected base of the number 160 """ 161 return _stringto.rtems_string_to_unsigned_long(s, n, endptr, base)
Convert String to Unsigned Long (with validation).
This method converts a string to an unsigned long with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
- base: is the expected base of the number
163def rtems_string_to_long_long(s, n, endptr, base): 164 r""" 165 Convert String to Long Long (with validation). 166 167 This method converts a string to a long long with 168 range validation. 169 170 :type s: string, in 171 :param s: is the string to convert 172 :type n: int, in 173 :param n: points to the variable to place the converted output in 174 :type endptr: string, in 175 :param endptr: is used to keep track of the position in the string 176 :type base: int, in 177 :param base: is the expected base of the number 178 """ 179 return _stringto.rtems_string_to_long_long(s, n, endptr, base)
Convert String to Long Long (with validation).
This method converts a string to a long long with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
- base: is the expected base of the number
181def rtems_string_to_unsigned_long_long(s, n, endptr, base): 182 r""" 183 Convert String to Unsigned Long Long (with validation). 184 185 This method converts a string to an unsigned character with 186 range validation. 187 188 :type s: string, in 189 :param s: is the string to convert 190 :type n: int, in 191 :param n: points to the variable to place the converted output in 192 :type endptr: string, in 193 :param endptr: is used to keep track of the position in the string 194 :type base: int, in 195 :param base: is the expected base of the number 196 """ 197 return _stringto.rtems_string_to_unsigned_long_long(s, n, endptr, base)
Convert String to Unsigned Long Long (with validation).
This method converts a string to an unsigned character with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
- base: is the expected base of the number
199def rtems_string_to_float(s, n, endptr): 200 r""" 201 Convert String to Float (with validation). 202 203 This method converts a string to a float with range validation. 204 205 :type s: string, in 206 :param s: is the string to convert 207 :type n: float, in 208 :param n: points to the variable to place the converted output in 209 :type endptr: string, in 210 :param endptr: is used to keep track of the position in the string 211 """ 212 return _stringto.rtems_string_to_float(s, n, endptr)
Convert String to Float (with validation).
This method converts a string to a float with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
214def rtems_string_to_double(s, n, endptr): 215 r""" 216 Convert String to Double (with validation). 217 218 This method converts a string to a double with range validation. 219 220 :type s: string, in 221 :param s: is the string to convert 222 :type n: float, in 223 :param n: points to the variable to place the converted output in 224 :type endptr: string, in 225 :param endptr: is used to keep track of the position in the string 226 """ 227 return _stringto.rtems_string_to_double(s, n, endptr)
Convert String to Double (with validation).
This method converts a string to a double with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string
229def rtems_string_to_long_double(s, n, endptr): 230 r""" 231 Convert String to long double (with validation). 232 233 This method converts a string to a long double with range validation. 234 235 :type s: string, in 236 :param s: is the string to convert 237 :type n: float, in 238 :param n: points to the variable to place the converted output in 239 :type endptr: string, in 240 :param endptr: is used to keep track of the position in the string 241 """ 242 return _stringto.rtems_string_to_long_double(s, n, endptr)
Convert String to long double (with validation).
This method converts a string to a long double with range validation.
Parameters
- s: is the string to convert
- n: points to the variable to place the converted output in
- endptr: is used to keep track of the position in the string