Changeset 35209 in project


Ignore:
Timestamp:
02/25/18 07:03:55 (7 months ago)
Author:
kon
Message:

rel 1.1.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/coops-utils

    r34228 r35209  
    3333The slot accessor recursion.
    3434
    35 <syntax>(slot@ INSTANCE SLOT ...) => *</syntax>
     35<syntax>(slot@ INSTANCE SLOT ...) --> *</syntax>
    3636
    3737Returns the slot value of the N'th named slot from {{INSTANCE}}.
     
    6464==== make/copy
    6565
    66 <procedure>(make/copy INSTANCE [INITFORM ...]) => coops-instance</procedure>
     66<procedure>(make/copy INSTANCE [INITFORM ...]) --> coops-instance</procedure>
    6767
    6868Returns a copy of the object {{INSTANCE}} except where an {{INITFORM}}
     
    7979A more detailed {{print-object}} for use in a ''REPL''.
    8080
     81==== describe-object-slot
     82
     83<procedure>(describe-object-slot INSTANCE SLOT [NAME-MAXLEN 32 [OUT (current-output-port)]])</procedure>
     84
     85Prints information about the {{INSTANCE}}'s {{SLOT}} to the {{output-port}}
     86{{OUT}}. Does not append a {{(newline)}}.
     87
     88{{NAME-MAXLEN}} is the maximum number of single-width characters in a slotname.
     89
    8190
    8291=== Introspection
     
    105114==== instance-of?
    106115
    107 <procedure>(instance-of? OBJECT CLASS) => boolean</procedure>
     116<procedure>(instance-of? OBJECT CLASS) --> boolean</procedure>
    108117
    109118Is {{OBJECT}} an {{instance}} of the {{CLASS>}}?
     
    111120==== class?
    112121
    113 <procedure>(class? OBJECT) => boolean</procedure>
     122<procedure>(class? OBJECT) --> boolean</procedure>
    114123
    115124Is {{OBJECT}} an {{instance}} of the {{<standard-class>}}?
    116125
    117 <procedure>(check-class LOC OBJ [ARGNAM]) => *</procedure>
     126<procedure>(check-class LOC OBJ [ARGNAM]) --> *</procedure>
    118127<procedure>(error-class LOC OBJ [ARGNAM])</procedure>
    119128
    120129==== instance?
    121130
    122 <procedure>(instance? OBJECT) => boolean</procedure>
     131<procedure>(instance? OBJECT) --> boolean</procedure>
    123132
    124133Is {{OBJECT}} an instance of a basic class. Neither an {{instance}} of
    125134the {{<standard-class>}} or a primitive such as {{boolean}} or {{vector}}?
    126135
    127 <procedure>(check-instance LOC OBJ [ARGNAM]) => *</procedure>
     136<procedure>(check-instance LOC OBJ [ARGNAM]) --> *</procedure>
    128137<procedure>(error-instance LOC OBJ [ARGNAM])</procedure>
    129138
    130139==== primitive-instance?
    131140
    132 <procedure>(primitive-instance? OBJECT) => boolean</procedure>
    133 <procedure>(primitive? OBJECT) => boolean</procedure>
     141<procedure>(primitive-instance? OBJECT) --> boolean</procedure>
    134142
    135143Is {{OBJECT}} an {{instance}} of the {{<primitive-object>}} class?
     
    137145==== generic?
    138146
    139 <procedure>(generic? OBJECT) => boolean</procedure>
     147<procedure>(generic? OBJECT) --> boolean</procedure>
    140148
    141149Synonym for {{generic-procedure?}}.
    142150
    143 <procedure>(check-generic LOC OBJ [ARGNAM]) => *</procedure>
     151<procedure>(check-generic LOC OBJ [ARGNAM]) --> *</procedure>
    144152<procedure>(error-generic LOC OBJ [ARGNAM])</procedure>
    145153
    146154==== method?
    147155
    148 <procedure>(method? OBJECT) => boolean</procedure>
     156<procedure>(method? OBJECT) --> boolean</procedure>
    149157
    150158Is {{OBJECT}} a {{method}} of a {{generic-procedure}}?
     
    153161system. This function only validates the form of the argument and can be fooled.
    154162
    155 <procedure>(check-method LOC OBJ [ARGNAM]) => *</procedure>
     163<procedure>(check-method LOC OBJ [ARGNAM]) --> *</procedure>
    156164<procedure>(error-method LOC OBJ [ARGNAM])</procedure>
    157165
    158166==== class-precedence-list
    159167
    160 <procedure>(class-precedence-list CLASS) => (list-of class)</procedure>
    161 <procedure>(class-cpl CLASS) => (list-of class)</procedure>
    162 <procedure>(class-supers CLASS) => (list-of class)</procedure>
     168<procedure>(class-precedence-list CLASS) --> (list-of class)</procedure>
    163169
    164170Returns the superclasses of {{CLASS}}.
     
    166172==== class-slots
    167173
    168 <procedure>(class-slots CLASS) => (list-of symbol)</procedure>
     174<procedure>(class-slots CLASS) --> (list-of symbol)</procedure>
    169175
    170176Returns the slot names of {{CLASS}}.
     
    172178==== class-direct-supers
    173179
    174 <procedure>(class-direct-supers CLASS) => (list-of class)</procedure>
     180<procedure>(class-direct-supers CLASS) --> (list-of class)</procedure>
    175181
    176182Returns the uninherited superclasses of {{CLASS}}.
     
    178184==== class-direct-slots
    179185
    180 <procedure>(class-direct-slots CLASS) => (list-of symbol)</procedure>
     186<procedure>(class-direct-slots CLASS) --> (list-of symbol)</procedure>
    181187
    182188Returns the uninherited slot names of {{CLASS}}.
     
    184190==== generic-anonymous?
    185191
    186 <procedure>(generic-anonymous? GENERIC) => boolean</procedure>
     192<procedure>(generic-anonymous? GENERIC) --> boolean</procedure>
    187193
    188194Is {{GENERIC}} an unnamed {{generic-procedure}}.
     
    190196==== generic-name
    191197
    192 <procedure>(generic-name GENERIC) => (union #f symbol)</procedure>
     198<procedure>(generic-name GENERIC) --> (union #f symbol)</procedure>
    193199
    194200Returns the name of {{GENERIC}}. The name is {{#f}} for an anonymous generic
     
    197203==== generic-specialized-arguments
    198204
    199 <procedure>(generic-specialized-arguments GENERIC) => (list-of symbol)</procedure>
     205<procedure>(generic-specialized-arguments GENERIC) --> (list-of symbol)</procedure>
    200206
    201207The arguments that {{GENERIC}} is specialized upon.
     
    203209==== generic-primary-methods
    204210
    205 <procedure>(generic-primary-methods GENERIC) => (list-of method)</procedure>
    206 <procedure>(generic-methods GENERIC) => (list-of method)</procedure>
     211<procedure>(generic-primary-methods GENERIC) --> (list-of method)</procedure>
    207212
    208213Returns the list of {{#:primary}} methods for {{GENERIC}}.
     
    210215==== generic-before-methods
    211216
    212 <procedure>(generic-before-methods GENERIC) => (list-of method)</procedure>
     217<procedure>(generic-before-methods GENERIC) --> (list-of method)</procedure>
    213218
    214219Returns the  list of {{#:before}} methods for {{GENERIC}}.
     
    216221==== generic-after-methods
    217222
    218 <procedure>(generic-after-methods GENERIC) => (list-of method)</procedure>
     223<procedure>(generic-after-methods GENERIC) --> (list-of method)</procedure>
    219224
    220225Returns the list of {{#:after}} methods for {{GENERIC}}.
     
    222227==== generic-around-methods
    223228
    224 <procedure>(generic-around-methods GENERIC) => (list-of method)</procedure>
     229<procedure>(generic-around-methods GENERIC) --> (list-of method)</procedure>
    225230
    226231Returns the list of {{#:around}} methods for {{GENERIC}}.
     
    228233==== method-specializers
    229234
    230 <procedure>(method-specializers METHOD) => (list-of class)</procedure>
     235<procedure>(method-specializers METHOD) --> (list-of class)</procedure>
    231236
    232237Returns the classes that specialize {{METHOD}}.
     
    234239==== method-procedure
    235240
    236 <procedure>(method-procedure METHOD) => procedure</procedure>
     241<procedure>(method-procedure METHOD) --> procedure</procedure>
    237242
    238243Returns the {{procedure}} for {{METHOD}}.
     244
     245
     246=== TinyClos Introspection
     247
     248[[TInyCLOS]] synonyms.
     249
     250==== Usage
     251
     252<enscript language=scheme>
     253(require-extension coops-introspection-tinyclos)
     254</enscript>
     255
     256==== class-cpl
     257
     258<procedure>(class-cpl CLASS) --> (list-of class)</procedure>
     259
     260See {{coops-introspection#coops-introspection#class-precedence-list}}.
     261
     262==== class-supers
     263
     264<procedure>(class-supers CLASS) --> (list-of class)</procedure>
     265
     266See {{coops-introspection#class-precedence-list}}.
     267
     268==== primitive?
     269
     270<procedure>(primitive? OBJECT) --> boolean</procedure>
     271
     272See {{coops-introspection#primitive-instance?}}.
     273
     274==== generic-methods
     275
     276<procedure>(generic-methods GENERIC) --> (list-of method)</procedure>
     277
     278See {{coops-introspection#generic-primary-methods}}.
    239279
    240280
     
    258298        " specialized by " (method-specializers m)
    259299        " as " (method-procedure m)))
    260     (generic-methods generic)) )
     300    (generic-primary-methods generic)) )
    261301</enscript>
    262302
     
    285325== Version history
    286326
    287 ; 1.0.4 : .
    288 ; 1.0.3 : .
     327; 1.1.0 : Collect TinyCLOS synonyms in own module: {{coops-introspection-tinyclos}}; reexport by {{coops-utils}} DEPRECATED.
     328; 1.0.4 : Remove test, remove inlines.
     329; 1.0.3 : Add test, fix library requirement.
    289330; 1.0.2 : Fix {{make/copy}} for objects with uninitialized slots, thanks to Sandra Snan
    290331; 1.0.1 : Fix {{class-direct-supers}} and {{class-direct-slots}}, minor internal optimization.
Note: See TracChangeset for help on using the changeset viewer.