BookmarkVisitor.st
author Claus Gittinger <cg@exept.de>
Fri, 01 Jul 2011 15:12:27 +0200
changeset 9966 cd0e10ea0091
child 10081 bef38feae7ce
permissions -rw-r--r--
initial checkin

"
 COPYRIGHT (c) 2006 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:libtool' }"

Object subclass:#BookmarkVisitor
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-Bookmarks'
!

!BookmarkVisitor class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2006 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.
"
! !

!BookmarkVisitor methodsFor:'visiting'!

visit:anObject 
    "visit anObject (visitor pattern).
     The object should call back one of my visitXXXX methods."

    ^ anObject acceptVisitor:self
!

visitBookmark:anObject 

    self subclassResponsibility

    "Created: / 23-05-2011 / 10:41:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

visitBookmarkList:anObject 
    "dispatched back from the visited bookmarkList-object (visitor pattern)"

    "fall back to general object-case - please change as required"

    ^ self visit:anObject root

    "Modified: / 02-06-2011 / 21:53:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

visitClass:anObject 

    ^self visitBookmark: anObject

    "Modified: / 23-05-2011 / 10:41:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

visitFile:anObject 
    ^ self visitBookmark:anObject
!

visitFolder:anObject 

    ^self visitBookmark: anObject

    "Modified: / 23-05-2011 / 10:41:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

visitMethod:anObject 

    ^self visitBookmark: anObject

    "Modified: / 23-05-2011 / 10:42:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

visitRecent:anObject 
    ^ self visitFolder:anObject
!

visitSeparator:anObject 
    ^ self visitBookmark:anObject
!

visitURL:anObject 

    ^self visitBookmark: anObject

    "Created: / 16-06-2011 / 16:08:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!BookmarkVisitor class methodsFor:'documentation'!

version_CVS
    ^ '$Header: /cvs/stx/stx/libtool/BookmarkVisitor.st,v 1.1 2011-07-01 13:12:27 cg Exp $'
!

version_SVN
    ^ '§Id§'
! !