CallChain.st
author Claus Gittinger <cg@exept.de>
Sat, 18 May 1996 19:05:49 +0200
changeset 261 2fb596a13d0c
parent 236 7f570e0a0a75
child 951 971345596471
permissions -rw-r--r--
commentary

"
 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.
"

Object subclass:#CallChain
	instanceVariableNames:'receiver selector class isBlock rest'
	classVariableNames:''
	poolDictionaries:''
	category:'System-Debugging-Support'
!

!CallChain class methodsFor:'documentation'!

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.
"
!

documentation
"
    This is is used as a companion to MessageTally.
    Instances of it are used to represent a calling chain.
    They are simply holders for some of the contexts values - no
    intelligence here.
    (MessageTally could have used the contexts themself, but these
     may create more overhead)

    [author:]
        Claus Gittinger

    [see also:]
        MessageTally ProfileTree
        MessageTracer
        AbstractTime
"
! !

!CallChain methodsFor:'accessing'!

isBlock
    "return true, if this is a callChain for a block-context"

    ^ isBlock

    "Modified: 18.5.1996 / 18:52:05 / cg"
!

methodClass
    "return the contexts methods class"

    ^ class

    "Modified: 18.5.1996 / 18:54:04 / cg"
!

receiver
    "return the contexts receiver"

    ^ receiver

    "Modified: 18.5.1996 / 18:54:12 / cg"
!

receiver:r selector:s class:cls 
    "private tally interface - set receiver, selector and class.
     the block flag is cleared."

    receiver := r.
    selector := s.
    class := cls.
    isBlock := false.

    "Modified: 18.5.1996 / 18:54:42 / cg"
!

receiver:r selector:s class:cls isBlock:blk
    "private tally interface - set receiver, selector, class
     and the block flag."

    receiver := r.
    selector := s.
    class := cls.
    isBlock := blk.

    "Created: 18.5.1996 / 18:52:34 / cg"
    "Modified: 18.5.1996 / 18:54:58 / cg"
!

rest
    "return the chains link"

    ^ rest

    "Modified: 18.5.1996 / 18:55:24 / cg"
!

rest:r
    "set the chains link"

    rest := r.

    "Modified: 18.5.1996 / 18:55:19 / cg"
!

selector
    "return the contexts selector"

    ^ selector

    "Modified: 18.5.1996 / 18:55:11 / cg"
! !

!CallChain methodsFor:'comparing'!

= someInfo
    "return true, if the argument chain is for the same method invocation"

    receiver == someInfo receiver ifFalse:[^ false].
    selector == someInfo selector ifFalse:[^ false].
    ^ class == someInfo methodClass

    "Modified: 18.5.1996 / 18:55:47 / cg"
! !

!CallChain class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic3/CallChain.st,v 1.12 1996-05-18 17:05:34 cg Exp $'
! !