/[eiffelstudio]/trunk/eweasel/tests/incr071/internal.e
ViewVC logotype

Contents of /trunk/eweasel/tests/incr071/internal.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (show annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years, 2 months ago) by manus
File size: 26062 byte(s)
Moved from trunk/Src/eweasel to trunk/eweasel so that a simple checkout of the source code is not penalized by the lenghty process of checking out all the tests of eweasel.
1 indexing
2 description: "[
3 Access to internal object properties.
4 This class may be used as ancestor by classes needing its facilities.
5 ]"
6 status: "See notice at end of class"
7 date: "$Date$"
8 revision: "$Revision$"
9
10 class
11 INTERNAL
12
13 feature -- Conformance
14
15 is_instance_of (object: ANY; type_id: INTEGER): BOOLEAN is
16 -- Is `object' an instance of type `type_id'?
17 require
18 object_not_void: object /= Void
19 type_id_nonnegative: type_id >= 0
20 do
21 Result := c_is_instance_of (type_id, $object)
22 end
23
24 type_conforms_to (type1, type2: INTEGER): BOOLEAN is
25 -- Does `type1' conform to `type2'?
26 require
27 type1_nonnegative: type1 >= 0
28 type2_nonnegative: type2 >= 0
29 do
30 Result := c_type_conforms_to (type1, type2)
31 end
32
33 feature -- Creation
34
35 dynamic_type_from_string (class_type: STRING): INTEGER is
36 -- Dynamic type corresponding to `class_type'.
37 -- If no dynamic type available, returns -1.
38 require
39 class_type_not_void: class_type /= Void
40 local
41 a: ANY
42 do
43 a := class_type.to_c
44 Result := feature {ISE_RUNTIME}.type_id_from_name ($a)
45 ensure
46 dynamic_type_from_string_valid: Result = -1 or else Result >= 0
47 end
48
49 new_instance_of (type_id: INTEGER): ANY is
50 -- New instance of dynamic `type_id'.
51 -- Note: returned object is not initialized and may
52 -- hence violate its invariant.
53 -- `type_id' cannot represent a SPECIAL type, use
54 -- `new_special_any_instance' instead.
55 require
56 type_id_nonnegative: type_id >= 0
57 not_special_type: not is_special_type (type_id)
58 do
59 Result := c_new_instance_of (type_id)
60 ensure
61 not_special_type: not is_special (Result)
62 dynamic_type_set: dynamic_type (Result) = type_id
63 end
64
65 new_special_any_instance (type_id, count: INTEGER): SPECIAL [ANY] is
66 -- New instance of dynamic `type_id' that represents
67 -- a SPECIAL with `count' element. To create a SPECIAL of
68 -- basic type, use `SPECIAL'.
69 require
70 count_valid: count >= 0
71 type_id_nonnegative: type_id >= 0
72 special_type: is_special_any_type (type_id)
73 do
74 create Result.make (count)
75 c_set_dynamic_type ($Result, type_id)
76 ensure
77 special_type: is_special (Result)
78 dynamic_type_set: dynamic_type (Result) = type_id
79 count_set: Result.count = count
80 end
81
82 feature -- Status report
83
84 is_special_any_type (type_id: INTEGER): BOOLEAN is
85 -- Is type represented by `type_id' represent
86 -- a SPECIAL [XX] where XX is a reference type.
87 require
88 type_id_nonnegative: type_id >= 0
89 do
90 Result := c_eif_special_any_type (type_id)
91 end
92
93 is_special_type (type_id: INTEGER): BOOLEAN is
94 -- Is type represented by `type_id' represent
95 -- a SPECIAL [XX] where XX is a reference type
96 -- or a basic type.
97 require
98 type_id_nonnegative: type_id >= 0
99 do
100 Result := c_eif_is_special_type (type_id)
101 end
102
103 is_special (object: ANY): BOOLEAN is
104 -- Is `object' a special object?
105 require
106 object_not_void: object /= Void
107 do
108 Result := c_is_special ($object)
109 end
110
111 is_marked (obj: ANY): BOOLEAN is
112 -- Is `obj' marked?
113 require
114 object_exists: obj /= Void
115 do
116 Result := c_is_marked ($obj)
117 end
118
119 feature -- Access
120
121 Pointer_type: INTEGER is 0
122
123 Reference_type: INTEGER is 1
124
125 Character_type: INTEGER is 2
126
127 Boolean_type: INTEGER is 3
128
129 Integer_type: INTEGER is 4
130
131 Integer_32_type: INTEGER is 4
132
133 Real_type: INTEGER is 5
134
135 Double_type: INTEGER is 6
136
137 Expanded_type: INTEGER is 7
138
139 Bit_type: INTEGER is 8
140
141 Integer_8_type: INTEGER is 9
142
143 Integer_16_type: INTEGER is 10
144
145 Integer_64_type: INTEGER is 11
146
147 Wide_character_type: INTEGER is 12
148
149 class_name (object: ANY): STRING is
150 -- Name of the class associated with `object'
151 require
152 object_not_void: object /= Void
153 do
154 Result := object.generator
155 end
156
157 class_name_of_type (type_id: INTEGER): STRING is
158 -- Name of class associated with dynamic type `type_id'.
159 require
160 type_id_nonnegative: type_id >= 0
161 do
162 Result := feature {ISE_RUNTIME}.c_generator_of_type (type_id)
163 end
164
165 type_name (object: ANY): STRING is
166 -- Name of `object''s generating type (type of which `object'
167 -- is a direct instance).
168 require
169 object_not_void: object /= Void
170 do
171 Result := object.generating_type
172 end
173
174 type_name_of_type (type_id: INTEGER): STRING is
175 -- Name of `type_id''s generating type (type of which `type_id'
176 -- is a direct instance).
177 require
178 type_id_nonnegative: type_id >= 0
179 do
180 Result := feature {ISE_RUNTIME}.c_generating_type_of_type (type_id)
181 end
182
183 dynamic_type (object: ANY): INTEGER is
184 -- Dynamic type of `object'
185 require
186 object_not_void: object /= Void
187 do
188 Result := feature {ISE_RUNTIME}.dynamic_type ($object)
189 ensure
190 dynamic_type_nonnegative: Result >= 0
191 end
192
193 generic_count (obj: ANY): INTEGER is
194 -- Number of generic parameter in `obj'.
195 require
196 obj_not_void: obj /= Void
197 do
198 Result := eif_gen_count_with_dftype (feature {ISE_RUNTIME}.dynamic_type ($obj))
199 end
200
201 generic_count_of_type (type_id: INTEGER): INTEGER is
202 -- Number of generic parameter in `type_id'.
203 require
204 type_id_nonnegative: type_id >= 0
205 do
206 Result := eif_gen_count_with_dftype (type_id)
207 end
208
209 generic_dynamic_type (object: ANY; i: INTEGER): INTEGER is
210 -- Dynamic type of generic parameter of `object' at
211 -- position `i'.
212 require
213 object_not_void: object /= Void
214 object_generic: generic_count (object) > 0
215 i_valid: i > 0 and i <= generic_count (object)
216 do
217 Result := eif_gen_param_id (- 1, feature {ISE_RUNTIME}.dynamic_type ($object), i)
218 ensure
219 dynamic_type_nonnegative: Result >= 0
220 end
221
222 generic_dynamic_type_of_type (type_id: INTEGER; i: INTEGER): INTEGER is
223 -- Dynamic type of generic parameter of `type_id' at position `i'.
224 require
225 type_id_nonnegative: type_id >= 0
226 type_id_generic: generic_count_of_type (type_id) > 0
227 i_valid: i > 0 and i <= generic_count_of_type (type_id)
228 do
229 Result := eif_gen_param_id (- 1, type_id, i)
230 ensure
231 dynamic_type_nonnegative: Result >= 0
232 end
233
234 field (i: INTEGER; object: ANY): ANY is
235 -- Object attached to the `i'-th field of `object'
236 -- (directly or through a reference)
237 require
238 object_not_void: object /= Void
239 index_large_enough: i >= 1
240 index_small_enough: i <= field_count (object)
241 not_special: not is_special (object)
242 do
243 Result := c_field (i - 1, $object)
244 end
245
246 field_name (i: INTEGER; object: ANY): STRING is
247 -- Name of `i'-th field of `object'
248 require
249 object_not_void: object /= Void
250 index_large_enough: i >= 1
251 index_small_enough: i <= field_count (object)
252 not_special: not is_special (object)
253 do
254 create Result.make_from_c (c_field_name_of_type (i - 1, feature {ISE_RUNTIME}.dynamic_type ($object)))
255 ensure
256 Result_exists: Result /= Void
257 end
258
259 field_name_of_type (i: INTEGER; type_id: INTEGER): STRING is
260 -- Name of `i'-th field of dynamic type `type_id'.
261 require
262 type_id_nonnegative: type_id >= 0
263 index_large_enough: i >= 1
264 index_small_enought: i <= field_count_of_type (type_id)
265 do
266 create Result.make_from_c (c_field_name_of_type (i - 1, type_id))
267 end
268
269 field_offset (i: INTEGER; object: ANY): INTEGER is
270 -- Offset of `i'-th field of `object'
271 require
272 object_not_void: object /= Void
273 index_large_enough: i >= 1
274 index_small_enough: i <= field_count (object)
275 not_special: not is_special (object)
276 do
277 Result := c_field_offset (i - 1, $object)
278 end
279
280 field_type (i: INTEGER; object: ANY): INTEGER is
281 -- Abstract type of `i'-th field of `object'
282 require
283 object_not_void: object /= Void
284 index_large_enough: i >= 1
285 index_small_enough: i <= field_count (object)
286 do
287 Result := c_field_type_of_type (i - 1, feature {ISE_RUNTIME}.dynamic_type ($object))
288 ensure
289 field_type_nonnegative: Result >= 0
290 end
291
292 field_type_of_type (i: INTEGER; type_id: INTEGER): INTEGER is
293 -- Abstract type of `i'-th field of dynamic type `type_id'
294 require
295 type_id_nonnegative: type_id >= 0
296 index_large_enough: i >= 1
297 index_small_enough: i <= field_count_of_type (type_id)
298 do
299 Result := c_field_type_of_type (i - 1, type_id)
300 ensure
301 field_type_nonnegative: Result >= 0
302 end
303
304 field_static_type_of_type (i: INTEGER; type_id: INTEGER): INTEGER is
305 -- Static type of declared `i'-th field of dynamic type `type_id'
306 require
307 type_id_nonnegative: type_id >= 0
308 index_large_enough: i >= 1
309 index_small_enough: i <= field_count_of_type (type_id)
310 do
311 Result := c_field_static_type_of_type (i - 1, type_id)
312 ensure
313 field_type_nonnegative: Result >= 0
314 end
315
316 expanded_field_type (i: INTEGER; object: ANY): STRING is
317 -- Class name associated with the `i'-th
318 -- expanded field of `object'
319 require
320 object_not_void: object /= Void
321 index_large_enough: i >= 1
322 index_small_enough: i <= field_count (object)
323 is_expanded: field_type (i, object) = Expanded_type
324 do
325 Result := c_expanded_type (i - 1, $object)
326 ensure
327 Result_exists: Result /= Void
328 end
329
330 character_field (i: INTEGER; object: ANY): CHARACTER is
331 -- Character value of `i'-th field of `object'
332 require
333 object_not_void: object /= Void
334 index_large_enough: i >= 1
335 index_small_enough: i <= field_count (object)
336 character_field: field_type (i, object) = Character_type
337 do
338 Result := c_character_field (i - 1, $object)
339 end
340
341 boolean_field (i: INTEGER; object: ANY): BOOLEAN is
342 -- Boolean value of `i'-th field of `object'
343 require
344 object_not_void: object /= Void
345 index_large_enough: i >= 1
346 index_small_enough: i <= field_count (object)
347 boolean_field: field_type (i, object) = Boolean_type
348 do
349 Result := c_boolean_field (i - 1, $object)
350 end
351
352 integer_8_field (i: INTEGER; object: ANY): INTEGER_8 is
353 -- Integer value of `i'-th field of `object'
354 require
355 object_not_void: object /= Void
356 index_large_enough: i >= 1
357 index_small_enough: i <= field_count (object)
358 integer_8_field: field_type (i, object) = Integer_8_type
359 do
360 Result := c_integer_8_field (i - 1, $object)
361 end
362
363 integer_16_field (i: INTEGER; object: ANY): INTEGER_16 is
364 -- Integer value of `i'-th field of `object'
365 require
366 object_not_void: object /= Void
367 index_large_enough: i >= 1
368 index_small_enough: i <= field_count (object)
369 integer_16_field: field_type (i, object) = Integer_16_type
370 do
371 Result := c_integer_16_field (i - 1, $object)
372 end
373
374 integer_field (i: INTEGER; object: ANY): INTEGER is
375 -- Integer value of `i'-th field of `object'
376 require
377 object_not_void: object /= Void
378 index_large_enough: i >= 1
379 index_small_enough: i <= field_count (object)
380 integer_field: field_type (i, object) = Integer_type
381 do
382 Result := c_integer_field (i - 1, $object)
383 end
384
385 integer_64_field (i: INTEGER; object: ANY): INTEGER_64 is
386 -- Integer value of `i'-th field of `object'
387 require
388 object_not_void: object /= Void
389 index_large_enough: i >= 1
390 index_small_enough: i <= field_count (object)
391 integer_64_field: field_type (i, object) = Integer_64_type
392 do
393 Result := c_integer_64_field (i - 1, $object)
394 end
395
396 real_field (i: INTEGER; object: ANY): REAL is
397 -- Real value of `i'-th field of `object'
398 require
399 object_not_void: object /= Void
400 index_large_enough: i >= 1
401 index_small_enough: i <= field_count (object)
402 real_field: field_type (i, object) = Real_type
403 do
404 Result := c_real_field (i - 1, $object)
405 end
406
407 pointer_field (i: INTEGER; object: ANY): POINTER is
408 -- Pointer value of `i'-th field of `object'
409 require
410 object_not_void: object /= Void
411 index_large_enough: i >= 1
412 index_small_enough: i <= field_count (object)
413 pointer_field: field_type (i, object) = Pointer_type
414 do
415 Result := c_pointer_field (i - 1, $object)
416 end
417
418 double_field (i: INTEGER; object: ANY): DOUBLE is
419 -- Double precision value of `i'-th field of `object'
420 require
421 object_not_void: object /= Void
422 index_large_enough: i >= 1
423 index_small_enough: i <= field_count (object)
424 double_field: field_type (i, object) = Double_type
425 do
426 Result := c_double_field (i - 1, $object)
427 end
428
429 feature -- Version
430
431 compiler_version: INTEGER is
432 external
433 "C [macro %"eif_project.h%"]"
434 alias
435 "egc_compiler_tag"
436 end
437
438 feature -- Element change
439
440 set_reference_field (i: INTEGER; object: ANY; value: ANY) is
441 require
442 object_not_void: object /= Void
443 index_large_enough: i >= 1
444 index_small_enough: i <= field_count (object)
445 reference_field: field_type (i, object) = Reference_type
446 do
447 c_set_reference_field (i - 1, $object, $value)
448 end
449
450 set_double_field (i: INTEGER; object: ANY; value: DOUBLE) is
451 require
452 object_not_void: object /= Void
453 index_large_enough: i >= 1
454 index_small_enough: i <= field_count (object)
455 double_field: field_type (i, object) = Double_type
456 do
457 c_set_double_field (i - 1, $object, value)
458 end
459
460 set_character_field (i: INTEGER; object: ANY; value: CHARACTER) is
461 -- Set character value of `i'-th field of `object' to `value'
462 require
463 object_not_void: object /= Void
464 index_large_enough: i >= 1
465 index_small_enough: i <= field_count (object)
466 character_field: field_type (i, object) = Character_type
467 do
468 c_set_character_field (i - 1, $object, value)
469 end
470
471 set_boolean_field (i: INTEGER; object: ANY; value: BOOLEAN) is
472 require
473 object_not_void: object /= Void
474 index_large_enough: i >= 1
475 index_small_enough: i <= field_count (object)
476 boolean_field: field_type (i, object) = Boolean_type
477 do
478 c_set_boolean_field (i - 1, $object, value)
479 end
480
481 set_integer_8_field (i: INTEGER; object: ANY; value: INTEGER_8) is
482 require
483 object_not_void: object /= Void
484 index_large_enough: i >= 1
485 index_small_enough: i <= field_count (object)
486 integer_field: field_type (i, object) = Integer_8_type
487 do
488 c_set_integer_8_field (i - 1, $object, value)
489 end
490
491 set_integer_16_field (i: INTEGER; object: ANY; value: INTEGER_16) is
492 require
493 object_not_void: object /= Void
494 index_large_enough: i >= 1
495 index_small_enough: i <= field_count (object)
496 integer_field: field_type (i, object) = Integer_16_type
497 do
498 c_set_integer_16_field (i - 1, $object, value)
499 end
500
501 set_integer_field (i: INTEGER; object: ANY; value: INTEGER) is
502 require
503 object_not_void: object /= Void
504 index_large_enough: i >= 1
505 index_small_enough: i <= field_count (object)
506 integer_field: field_type (i, object) = Integer_type
507 do
508 c_set_integer_field (i - 1, $object, value)
509 end
510
511 set_integer_64_field (i: INTEGER; object: ANY; value: INTEGER_64) is
512 require
513 object_not_void: object /= Void
514 index_large_enough: i >= 1
515 index_small_enough: i <= field_count (object)
516 integer_field: field_type (i, object) = Integer_64_type
517 do
518 c_set_integer_64_field (i - 1, $object, value)
519 end
520
521 set_real_field (i: INTEGER; object: ANY; value: REAL) is
522 require
523 object_not_void: object /= Void
524 index_large_enough: i >= 1
525 index_small_enough: i <= field_count (object)
526 real_field: field_type (i, object) = Real_type
527 do
528 c_set_real_field (i - 1, $object, value)
529 end
530
531 set_pointer_field (i: INTEGER; object: ANY; value: POINTER) is
532 require
533 object_not_void: object /= Void
534 index_large_enough: i >= 1
535 index_small_enough: i <= field_count (object)
536 pointer_field: field_type (i, object) = Pointer_type
537 do
538 c_set_pointer_field (i - 1, $object, value)
539 end
540
541 feature -- Measurement
542
543 field_count (object: ANY): INTEGER is
544 -- Number of logical fields in `object'
545 require
546 object_not_void: object /= Void
547 do
548 Result := field_count_of_type (feature {ISE_RUNTIME}.dynamic_type ($object))
549 end
550
551 field_count_of_type (type_id: INTEGER): INTEGER is
552 -- Number of logical fields in dynamic type `type_id'.
553 require
554 type_id_nonnegative: type_id >= 0
555 external
556 "C macro signature (EIF_INTEGER): EIF_INTEGER use %"eif_internal.h%""
557 alias
558 "ei_count_field_of_type"
559 end
560
561 bit_size (i: INTEGER; object: ANY): INTEGER is
562 -- Size (in bit) of the `i'-th bit field of `object'
563 require
564 object_not_void: object /= Void
565 index_large_enough: i >= 1
566 index_small_enough: i <= field_count (object)
567 is_bit: field_type (i, object) = Bit_type
568 do
569 Result := c_bit_size (i - 1, $object)
570 ensure
571 positive_result: Result > 0
572 end
573
574 physical_size (object: ANY): INTEGER is
575 -- Space occupied by `object' in bytes
576 require
577 object_not_void: object /= Void
578 do
579 Result := c_size ($object)
580 end
581
582 feature -- Marking
583
584 mark (obj: ANY) is
585 -- Mark object `obj'
586 require
587 object_not_void: obj /= Void
588 do
589 c_mark ($obj)
590 end
591
592 unmark (obj: ANY) is
593 -- Unmark object `obj'
594 require
595 object_not_void: obj /= Void
596 do
597 c_unmark ($obj)
598 end
599
600 feature {NONE} -- Implementation
601
602 c_is_instance_of (type1: INTEGER; obj: POINTER): BOOLEAN is
603 -- Is `obj' an instance of `type1'?
604 external
605 "C [macro %"eif_macros.h%"]"
606 alias
607 "RTRA"
608 end
609
610 c_field (i: INTEGER; object: POINTER): ANY is
611 -- Object referenced by the `i'-th field of `object'
612 external
613 "C (long, EIF_REFERENCE): EIF_REFERENCE | %"eif_internal.h%""
614 alias
615 "ei_field"
616 end
617
618 c_field_name_of_type (i: INTEGER; type_id: INTEGER): POINTER is
619 -- C pointer to name of `i'-th field of `object'
620 external
621 "C macro signature (EIF_INTEGER, EIF_INTEGER): EIF_POINTER use %"eif_internal.h%""
622 alias
623 "ei_field_name_of_type"
624 end
625
626 c_field_type_of_type (i: INTEGER; type_id: INTEGER): INTEGER is
627 -- Abstract type of `i'-th field of dynamic type `type_id'
628 external
629 "C signature (long, EIF_INTEGER): EIF_INTEGER use %"eif_internal.h%""
630 alias
631 "ei_field_type_of_type"
632 end
633
634 c_field_static_type_of_type (i: INTEGER; type_id: INTEGER): INTEGER is
635 -- Static type of `i'-th field of dynamic type `type_id'
636 external
637 "C signature (long, EIF_INTEGER): EIF_INTEGER use %"eif_internal.h%""
638 alias
639 "ei_field_static_type_of_type"
640 end
641
642 c_expanded_type (i: INTEGER; object: POINTER): STRING is
643 -- Class name of the `i'-th expanded field of `object'
644 external
645 "C (long, EIF_REFERENCE): EIF_REFERENCE | %"eif_internal.h%""
646 alias
647 "ei_exp_type"
648 end
649
650 c_character_field (i: INTEGER; object: POINTER): CHARACTER is
651 -- Character value of `i'-th field of `object'
652 external
653 "C macro signature (long, EIF_REFERENCE): EIF_CHARACTER use %"eif_internal.h%""
654 alias
655 "ei_char_field"
656 end
657
658 c_boolean_field (i: INTEGER; object: POINTER): BOOLEAN is
659 -- Boolean value of `i'-th field of `object'
660 external
661 "C macro signature (long, EIF_REFERENCE): EIF_BOOLEAN use %"eif_internal.h%""
662 alias
663 "ei_bool_field"
664 end
665
666 c_integer_8_field (i: INTEGER; object: POINTER): INTEGER_8 is
667 -- Integer value of `i'-th field of `object'
668 external
669 "C macro signature (long, EIF_REFERENCE): EIF_INTEGER_8 use %"eif_internal.h%""
670 alias
671 "ei_int_8_field"
672 end
673
674 c_integer_16_field (i: INTEGER; object: POINTER): INTEGER_16 is
675 -- Integer value of `i'-th field of `object'
676 external
677 "C macro signature (long, EIF_REFERENCE): EIF_INTEGER_16 use %"eif_internal.h%""
678 alias
679 "ei_int_16_field"
680 end
681
682 c_integer_field (i: INTEGER; object: POINTER): INTEGER is
683 -- Integer value of `i'-th field of `object'
684 external
685 "C macro signature (long, EIF_REFERENCE): EIF_INTEGER use %"eif_internal.h%""
686 alias
687 "ei_int_field"
688 end
689
690 c_integer_64_field (i: INTEGER; object: POINTER): INTEGER_64 is
691 -- Integer value of `i'-th field of `object'
692 external
693 "C macro signature (long, EIF_REFERENCE): EIF_INTEGER_64 use %"eif_internal.h%""
694 alias
695 "ei_int_64_field"
696 end
697
698 c_real_field (i: INTEGER; object: POINTER): REAL is
699 -- Real value of `i'-th field of `object'
700 external
701 "C macro signature (long, EIF_REFERENCE): EIF_REAL use %"eif_internal.h%""
702 alias
703 "ei_float_field"
704 end
705
706 c_pointer_field (i: INTEGER; object: POINTER): POINTER is
707 -- Pointer value of `i'-th field of `object'
708 external
709 "C macro signature (long, EIF_REFERENCE): EIF_POINTER use %"eif_internal.h%""
710 alias
711 "ei_ptr_field"
712 end
713
714 c_double_field (i: INTEGER; object: POINTER): DOUBLE is
715 -- Double precision value of `i'-th field of `object'
716 external
717 "C macro signature (long, EIF_REFERENCE): EIF_DOUBLE use %"eif_internal.h%""
718 alias
719 "ei_double_field"
720 end
721
722 c_is_special (object: POINTER): BOOLEAN is
723 -- Is `object' a special object?
724 external
725 "C (EIF_REFERENCE): EIF_BOOLEAN | %"eif_internal.h%""
726 alias
727 "ei_special"
728 end
729
730 c_field_offset (i: INTEGER; object: POINTER): INTEGER is
731 -- Offset of `i'-th field of `object'
732 external
733 "C macro signature (long, EIF_REFERENCE): EIF_INTEGER use %"eif_internal.h%""
734 alias
735 "ei_offset"
736 end
737
738 c_bit_size (i: INTEGER; object: POINTER): INTEGER is
739 -- Size (in bit) of the `i'-th bit field of `object'
740 external
741 "C (long, EIF_REFERENCE): EIF_INTEGER | %"eif_internal.h%""
742 alias
743 "ei_bit_size"
744 end
745
746 c_size (object: POINTER): INTEGER is
747 -- Physical size of `object'
748 external
749 "C (EIF_REFERENCE): EIF_INTEGER | %"eif_internal.h%""
750 alias
751 "ei_size"
752 end
753
754 c_set_reference_field (i: INTEGER; object: POINTER; value: POINTER) is
755 external
756 "C macro signature (long, EIF_REFERENCE, EIF_REFERENCE) use %"eif_internal.h%""
757 alias
758 "ei_set_reference_field"
759 end
760
761 c_set_double_field (i: INTEGER; object: POINTER; value: DOUBLE) is
762 external
763 "C macro signature (long, EIF_REFERENCE, EIF_DOUBLE) use %"eif_internal.h%""
764 alias
765 "ei_set_double_field"
766 end
767
768 c_set_character_field (i: INTEGER; object: POINTER; value: CHARACTER) is
769 external
770 "C macro signature (long, EIF_REFERENCE, EIF_CHARACTER) use %"eif_internal.h%""
771 alias
772 "ei_set_char_field"
773 end
774
775 c_set_boolean_field (i: INTEGER; object: POINTER; value: BOOLEAN) is
776 external
777 "C macro signature (long, EIF_REFERENCE, EIF_BOOLEAN) use %"eif_internal.h%""
778 alias
779 "ei_set_boolean_field"
780 end
781
782 c_set_integer_8_field (i: INTEGER; object: POINTER; value: INTEGER_8) is
783 external
784 "C macro signature (long, EIF_REFERENCE, EIF_INTEGER_8) use %"eif_internal.h%""
785 alias
786 "ei_set_integer_8_field"
787 end
788
789 c_set_integer_16_field (i: INTEGER; object: POINTER; value: INTEGER_16) is
790 external
791 "C macro signature (long, EIF_REFERENCE, EIF_INTEGER_16) use %"eif_internal.h%""
792 alias
793 "ei_set_integer_16_field"
794 end
795
796 c_set_integer_field (i: INTEGER; object: POINTER; value: INTEGER) is
797 external
798 "C macro signature (long, EIF_REFERENCE, EIF_INTEGER) use %"eif_internal.h%""
799 alias
800 "ei_set_integer_field"
801 end
802
803 c_set_integer_64_field (i: INTEGER; object: POINTER; value: INTEGER_64) is
804 external
805 "C macro signature (long, EIF_REFERENCE, EIF_INTEGER_64) use %"eif_internal.h%""
806 alias
807 "ei_set_integer_64_field"
808 end
809
810 c_set_real_field (i: INTEGER; object: POINTER; value: REAL) is
811 external
812 "C macro signature (long, EIF_REFERENCE, EIF_REAL) use %"eif_internal.h%""
813 alias
814 "ei_set_float_field"
815 end
816
817 c_set_pointer_field (i: INTEGER; object: POINTER; value: POINTER) is
818 external
819 "C macro signature (long, EIF_REFERENCE, EIF_POINTER) use %"eif_internal.h%""
820 alias
821 "ei_set_pointer_field"
822 end
823
824 eif_gen_count_with_dftype (type_id: INTEGER): INTEGER is
825 -- Number of generic parameters of `obj'.
826 external
827 "C signature (int16): int use %"eif_gen_conf.h%""
828 end
829
830 eif_gen_param_id (stype: INTEGER; dftype: INTEGER; pos: INTEGER): INTEGER is
831 -- Type of generic parameter in `obj' at position `pos'.
832 external
833 "C (int16, int16, int): EIF_INTEGER | %"eif_gen_conf.h%""
834 end
835
836 c_new_instance_of (type_id: INTEGER): ANY is
837 -- New instance of dynamic `type_id'.
838 -- Note: returned object is not initialized and may
839 -- hence violate its invariant.
840 -- `type_id' cannot represent a SPECIAL type, use
841 -- `new_special_any_instance' instead.
842 external
843 "C macro use %"eif_macros.h%""
844 alias
845 "RTLN"
846 end
847
848 c_set_dynamic_type (obj: POINTER; dtype: INTEGER) is
849 -- Set `obj' dynamic type to `dtype'.
850 external
851 "C signature (EIF_REFERENCE, EIF_INTEGER) use %"eif_internal.h%""
852 alias
853 "eif_set_dynamic_type"
854 end
855
856 c_eif_special_any_type (type_id: INTEGER): BOOLEAN is
857 -- Is type represented by `type_id' represent
858 -- a SPECIAL [XX] where XX is a reference type.
859 external
860 "C signature (EIF_INTEGER): EIF_BOOLEAN use %"eif_internal.h%""
861 alias
862 "eif_special_any_type"
863 end
864
865 c_eif_is_special_type (type_id: INTEGER): BOOLEAN is
866 -- Is type represented by `type_id' represent
867 -- a SPECIAL [XX] where XX is a reference type or
868 -- a basic type.
869 external
870 "C signature (EIF_INTEGER): BOOLEAN use %"eif_internal.h%""
871 alias
872 "eif_is_special_type"
873 end
874
875 c_type_conforms_to (type1, type2: INTEGER): BOOLEAN is
876 -- Does `type1' conform to `type2'?
877 external
878 "C signature (int16, int16): EIF_BOOLEAN use %"eif_gen_conf.h%""
879 alias
880 "eif_gen_conf"
881 end
882
883 c_is_marked (obj: POINTER): BOOLEAN is
884 external
885 "C macro signature (EIF_REFERENCE): EIF_BOOLEAN use %"eif_internal.h%""
886 alias
887 "ei_is_marked"
888 end
889
890 c_unmark (obj: POINTER) is
891 external
892 "C macro signature (EIF_REFERENCE) use %"eif_internal.h%""
893 alias
894 "ei_unmark"
895 end
896
897 c_mark (obj: POINTER) is
898 external
899 "C macro signature (EIF_REFERENCE) use %"eif_internal.h%""
900 alias
901 "ei_mark"
902 end
903
904 indexing
905
906 library: "[
907 EiffelBase: Library of reusable components for Eiffel.
908 ]"
909
910 status: "[
911 --| Copyright (c) 1993-2006 University of Southern California and contributors.
912 For ISE customers the original versions are an ISE product
913 covered by the ISE Eiffel license and support agreements.
914 ]"
915
916 license: "[
917 EiffelBase may now be used by anyone as FREE SOFTWARE to
918 develop any product, public-domain or commercial, without
919 payment to ISE, under the terms of the ISE Free Eiffel Library
920 License (IFELL) at http://eiffel.com/products/base/license.html.
921 ]"
922
923 source: "[
924 Interactive Software Engineering Inc.
925 ISE Building
926 360 Storke Road, Goleta, CA 93117 USA
927 Telephone 805-685-1006, Fax 805-685-6869
928 Electronic mail <info@eiffel.com>
929 Customer support http://support.eiffel.com
930 ]"
931
932 info: "[
933 For latest info see award-winning pages: http://eiffel.com
934 ]"
935
936 end -- class INTERNAL

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23