InlineObjectClassDescription.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 24240 5a8ca163fbfc
child 24517 5aaa5e876057
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...

"{ Encoding: utf8 }"

"
 COPYRIGHT (c) 2009 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libbasic' }"

"{ NameSpace: Smalltalk }"

ClassDescription subclass:#InlineObjectClassDescription
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Classes'
!

!InlineObjectClassDescription class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2009 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    inline objects are an experimental feature in ST/X
    (and currently not used by the system).
    Inline literal objects are created by the parsers/compilers with the following
    syntax:
        #{
            <slotName1>: value .
            <slotName2>: value .
            ...
        }
    where each value is a literal, separated by period from the next   
    i.e. similar to the brace-array construct { expr1 . expr2... }

    For every inline object, an anonymous class is created,
    providing getters and setters for the slots.
    (if literal objects are immutable (which is the default), 
     no setters are generated)

    You cannot add any semantic (i.e. methods) to inline objects -
    they are only useful as containers with a nicer protocol
    as compared to dictionaries or arrays.

    All such created classes will be subclasses of me.

    [example:]
        |foo|

        foo := #{ 
                 foo: 'foo value' .
                 bar: 'bar value' .
                 baz: 'and obviously: a baz value' .
                }.
        foo bar.
        foo baz.
        foo inspect.
"
! !

!InlineObjectClassDescription methodsFor:'queries'!

name
    "although inline objects have no name, we return something
     useful here - there are many places (inspectors) where
     a classes name is asked for."

    ^ #'someInlineObject'
!

nameSpace
    ^ nil

    "Created: / 13-08-2010 / 18:23:33 / cg"
!

package
    "return libbasic, so the methods of my subclass-instances (i.e. the inline objects)
     are not seen as extensions in the browser)"

    ^ InlineObjectClassDescription package
! !

!InlineObjectClassDescription class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !