Cface__CStructuredNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 18 Jul 2011 16:13:22 +0000
changeset 18 2f55519f3d0b
parent 16 ffcbe7184a53
child 24 e7afa531abcf
permissions -rw-r--r--
(none)

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

"{ NameSpace: Cface }"

CDerivedTypeNode subclass:#CStructuredNode
	instanceVariableNames:'cByteSize fields'
	classVariableNames:''
	poolDictionaries:''
	category:'Cface-C AST'
!


!CStructuredNode methodsFor:'accessing'!

cByteSize
    ^ cByteSize

    "Created: / 09-09-2008 / 16:49:58 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

cByteSize:anInteger
    cByteSize := anInteger.

    "Created: / 09-09-2008 / 16:49:58 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

ffiPointerTypeSymbol

    ^smalltalkName notNil ifTrue:[
        self smalltalkClassNameWithNamespace
    ] ifFalse:[
        #pointer
    ]

    "Created: / 18-07-2011 / 16:44:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

ffiTypeSymbol

    ^ self shouldNotImplement

    "Modified: / 18-07-2011 / 16:42:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

fields
    ^ fields

    "Created: / 10-07-2008 / 08:43:26 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

fields:aCollection
    fields := aCollection.
    fields do:[:f|f owner: self].

    "Created: / 10-07-2008 / 08:43:26 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

stxStructFieldGetterSelector
    ^ #at:

    "Created: / 09-09-2008 / 21:32:39 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!CStructuredNode methodsFor:'testing'!

isCStructuredNode
    ^ true
! !

!CStructuredNode 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 visitCStructuredNode:self
! !

!CStructuredNode class methodsFor:'documentation'!

version
    ^'$Id$'
!

version_SVN
    ^ '$Id$'
! !