eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ClassOrganizer':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ClassOrganizer


Inheritance:

   Object
   |
   +--ClassOrganizer

Package:
stx:libbasic3
Category:
Kernel-Support
Version:
rev: 1.26 date: 2024/02/29 13:37:46
user: cg
file: ClassOrganizer.st directory: libbasic3
module: stx stc-classLibrary: libbasic3

Description:


in contrast to other smalltalks, ST/X does not keep the
method <-> category associations in the class (as organization),
but instead keeps the category as an instance variable of methods.

For compatibility with (fileOut-) files which include a class organization
message, 'aClass organization' returns an instance of this class, which
implements the category change functionality.
Also, some PD code seems to use & define methods for ClassOrganizers 
- having this (somewhat dummy) class around helps to fileIn that code.

Notice, that instances of ClassOrganizer are NOT used in the current ST/X
system; all of this is pure compatibility mimicri.


This is an additional goody class; therefore:

THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTOR ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE CONTRIBUTOR BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

copyright

COPYRIGHT (c) 1995 by Claus Gittinger 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.

Class protocol:

defaults
o  defaultProtocol

instance creation
o  for: aClass
create & return a new instance of myself, to organize aClass


Instance protocol:

Compatibility-Squeak
o  commentStamp
( an extension from the stx:libcompat package )

accessing
o  addCategory: aCategory
ignored.

Usage example(s):

     Number organization addCategory:'foo'. 

o  addCategory: aCategory before: symbolOrNil
ignored.

o  categories
return a collection of my classes method-categorySymbols

Usage example(s):

     SmallInteger organization categories 

o  categoryOfElement: aSelectorSymbol
return the category for the method specified by aSelectorSymbol.
Return nil, if there is no such method.

Usage example(s):

     Number organization categoryOfElement:#foo. 
     Object organization categoryOfElement:#==   

o  classComment
return the classes comment

Usage example(s):

     Number organization classComment  

o  elements
return a collection of my classes selectors

Usage example(s):

     SmallInteger organization elements 

o  listAtCategoryNamed: aCategorySymbol
return a collection of selectors whose methods are categorized
as aCategorySymbol

Usage example(s):

     SmallInteger organization listAtCategoryNamed:#arithmetic 

o  removeCategory: aCategory
remove a categories assignments - dummy here

change & update
o  update: something with: parameter from: changedObject
(comment from inherited method)
dependent is notified of some change -
Default is to try update:with:

changing
o  changeFromString: organizationString
take category<->selector associations from aString, and change
the categories of those methods.
Only required when filing in ST-80 code, which changes the categorization
this way.

Usage example(s):

     TestClass 
        organization
            changeFromString:'( ''category1'' #foo1 #foo2 foo3)
                              ( ''category2'' #bar1 #bar2)'

o  classify: aSelector under: aCategory
change the category of the method stored under aSelector
to aCategory.

printing & storing
o  printOn: aStream
Number organization printString

private access
o  class: aClass
set the class



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:47:04 GMT