Cface__CConstNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 10 Jul 2008 07:31:14 +0000
changeset 5 c110eef5b9ef
parent 4 fc74bd43a3eb
child 6 ae25dce94003
permissions -rw-r--r--
- externalization of libraryName (now supports unix & win32 simultaneously) - basi support for accessing structure fields

"{ Package: 'cvut:fel/cface' }"

"{ NameSpace: Cface }"

CModifierNode subclass:#CConstNode
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Cface-C AST'
!

!CConstNode class methodsFor:'documentation'!

history

    "Created: / 25-10-2007 / 16:58:14 / haja"
    "Created: #id / 25-10-2007 / 16:58:17 / haja"
    "Created: #id: / 29-10-2007 / 20:48:37 / haja"
    "Created: #acceptVisitor: / 02-11-2007 / 10:41:30 / haja"
    "Created: #acceptNameVisitor: / 05-11-2007 / 17:37:52 / haja"
    "Deleted: #acceptNameVisitor: / 12-11-2007 / 09:46:40 / haja"
    "Created: #buildTypeCheckFor:on: / 19-12-2007 / 15:57:17 / haja"
    "Created: #buildObjectCreationOn: / 19-12-2007 / 16:40:59 / haja"
    "Created: #buildValueExtractionFor:on: / 19-12-2007 / 17:30:58 / haja"
    "Created: #buildObjectCreationFor:on: / 19-12-2007 / 17:39:29 / haja"
    "Deleted: #buildObjectCreationOn: / 19-12-2007 / 17:39:31 / haja"
    "Created: #buildCTypeOn: / 19-12-2007 / 18:20:45 / haja"
    "Created: #buildTypeDescriptionOn: / 20-12-2007 / 12:19:58 / haja"
! !

!CConstNode class methodsFor:'instance creation'!

id:anId

    | defConstNode |

    defConstNode := self new.
    defConstNode id:anId.

    ^defConstNode

    "Created: / 29-10-2007 / 20:48:37 / haja"
! !

!CConstNode methodsFor:'accessing'!

smalltalkClassName
    ^ type smalltalkClassName

    "Created: / 04-07-2008 / 11:55:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
    "Modified: / 10-07-2008 / 08:01:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

smalltalkClassNameWithNamespace

    ^type smalltalkClassNameWithNamespace

    "Created: / 04-07-2008 / 11:56:36 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!CConstNode methodsFor:'printing'!

printOn: stream indent: indent

    stream 
        nextPutAll:'const '; 
        cr;
        next: indent + 1 put: Character tab.

    type printOn: stream indent: indent + 1.

    "Created: / 04-03-2008 / 10:57:12 / janfrog"
! !

!CConstNode methodsFor:'testing'!

isAnonymous

    ^type isAnonymous

    "Created: / 04-07-2008 / 11:56:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

isCCharNode
    ^ type isCCharNode

    "Created: / 04-07-2008 / 09:27:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

isCConstNode
    ^ true

    "Created: / 17-02-2008 / 21:52:38 / janfrog"
!

isCStructNode
    ^ type isCStructNode

    "Created: / 04-07-2008 / 09:28:04 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

isForeign

    ^type isForeign

    "Created: / 04-07-2008 / 11:56:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!CConstNode methodsFor:'visiting'!

acceptVisitor:aVisitor 
    "Double dispatch back to the visitor, passing my type encoded in
     the selector (visitor pattern)"
    "stub code automatically generated - please change if required"
    
    ^ aVisitor visitCConstNode:self

    "Created: / 02-11-2007 / 10:41:30 / haja"
    "Modified: / 10-02-2008 / 10:44:45 / janfrog"
! !

!CConstNode class methodsFor:'documentation'!

version
    ^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__CConstNode.st,v 1.1 2008/02/26 15:59:11 vranyj1 Exp $'
! !