Cface__CTypedefNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 10 Jul 2008 07:31:14 +0000
changeset 5 c110eef5b9ef
parent 2 cfd2c393abfe
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 }"

CTypeNode subclass:#CTypedefNode
	instanceVariableNames:'type'
	classVariableNames:''
	poolDictionaries:''
	category:'Cface-C AST'
!

!CTypedefNode class methodsFor:'documentation'!

history

    "Created: / 25-10-2007 / 15:07:10 / haja"
    "Created: #local / 25-10-2007 / 15:07:18 / haja"
    "Created: #local: / 25-10-2007 / 15:07:18 / haja"
    "Created: #names / 25-10-2007 / 15:07:18 / haja"
    "Created: #names: / 25-10-2007 / 15:07:18 / haja"
    "Created: #local:names: / 25-10-2007 / 15:08:27 / haja"
    "Deleted: #local / 29-10-2007 / 19:58:35 / haja"
    "Deleted: #local: / 29-10-2007 / 19:58:35 / haja"
    "Deleted: #names / 29-10-2007 / 19:58:35 / haja"
    "Deleted: #names: / 29-10-2007 / 19:58:35 / haja"
    "Created: #name / 29-10-2007 / 19:58:43 / haja"
    "Created: #name: / 29-10-2007 / 19:58:43 / haja"
    "Created: #id / 29-10-2007 / 19:58:43 / haja"
    "Created: #id: / 29-10-2007 / 19:58:43 / haja"
    "Created: #name:id: / 29-10-2007 / 19:59:29 / haja"
    "Deleted: #local:names: / 29-10-2007 / 19:59:43 / haja"
    "Created: #acceptVisitor: / 02-11-2007 / 10:46:04 / haja"
    "Created: #foreign / 19-11-2007 / 09:41:32 / haja"
    "Created: #foreign: / 19-11-2007 / 09:41:32 / haja"
    "Created: #name:id:foreign: / 19-11-2007 / 09:41:41 / haja"
    "Deleted: #name:id: / 19-11-2007 / 09:41:43 / haja"
! !

!CTypedefNode methodsFor:'accessing'!

cByteSize

    ^type cByteSize

    "Created: / 09-07-2008 / 19:39:38 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

ffiTypeSymbol

    ^type ffiTypeSymbol

    "Created: / 03-07-2008 / 22:40:25 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

foreign
    ^ foreign

    "Created: / 19-11-2007 / 09:41:32 / haja"
!

foreign:something
    foreign := something.

    "Created: / 19-11-2007 / 09:41:32 / haja"
!

id
    ^ id

    "Created: / 29-10-2007 / 19:58:43 / haja"
!

id:something
    id := something.

    "Created: / 29-10-2007 / 19:58:43 / haja"
!

name
    ^ name

    "Created: / 29-10-2007 / 19:58:43 / haja"
!

name:something
    name := something.

    "Created: / 29-10-2007 / 19:58:43 / haja"
!

type
    ^ type

    "Created: / 10-02-2008 / 19:23:13 / janfrog"
!

type:something
    type := something.

    "Created: / 10-02-2008 / 19:23:13 / janfrog"
! !

!CTypedefNode methodsFor:'printing'!

printOn: stream indent: level

    stream
        nextPutAll: '(typedef '; cr;
        next: level + 1 put: Character tab; nextPutAll: cName; cr;
        next: level + 1 put: Character tab.
    type printOn: stream indent: level + 1.
    stream nextPut: $)

    "Created: / 17-02-2008 / 18:13:13 / janfrog"
    "Modified: / 18-02-2008 / 15:12:01 / janfrog"
! !

!CTypedefNode 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 visitCTypedefNode:self

    "Created: / 02-11-2007 / 10:46:04 / haja"
    "Modified: / 10-02-2008 / 10:45:50 / janfrog"
! !

!CTypedefNode class methodsFor:'documentation'!

version
    ^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__CTypedefNode.st,v 1.1 2008/02/26 16:00:01 vranyj1 Exp $'
! !