- externalization of libraryName (now supports unix & win32 simultaneously)
- basi support for accessing structure fields
"{ Package: 'cvut:fel/cface' }"
"{ NameSpace: Cface }"
Object subclass:#GeneratorCommand
instanceVariableNames:'platform mappings definitions unixLibraryName win32LibraryName'
classVariableNames:''
poolDictionaries:''
category:'Cface-Generators'
!
!GeneratorCommand class methodsFor:'projects'!
generateCairo
|cairoDir cairoDefFile |
cairoDir := '/home/janfrog/Projects/Cface/libcairo/'.
cairoDefFile := cairoDir , 'libcairo.def'.
(
Cface::Platform theInstance generatorCommand
definitions: cairoDefFile asFilename;
mappings: Cface::CairoMapping new;
module:'libcairo.so';
process
) apply.
"Created: / 03-07-2008 / 23:55:14 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 04-07-2008 / 12:33:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
generateSubversion
|svnDir svnDefFile|
svnDir := '/home/janfrog/Projects/Cface/libsvn/'.
svnDefFile := svnDir , 'svn_client.h.def'.
Cface::Platform theInstance generatorCommand
definitions: svnDefFile asFilename;
process
"Created: / 03-07-2008 / 23:55:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!GeneratorCommand methodsFor:'accessing'!
definitions
^ definitions
"Created: / 18-02-2008 / 15:36:22 / janfrog"
!
definitions:aFilename
definitions := self platform parser parse: aFilename contents asString.
"Created: / 18-02-2008 / 15:36:22 / janfrog"
!
mappings
^ mappings ifNil:[platform mappings]
"Created: / 18-02-2008 / 15:35:04 / janfrog"
"Modified: / 27-05-2008 / 14:22:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
mappings:something
mappings := something.
"Created: / 18-02-2008 / 15:35:04 / janfrog"
!
platform
platform ifNil:[platform := Cface::Platform theInstance].
^platform
"Created: / 18-02-2008 / 15:28:45 / janfrog"
!
platform:something
platform := something.
"Created: / 18-02-2008 / 15:30:12 / janfrog"
!
typeMapper
^platform typeMapper
"Created: / 18-02-2008 / 15:30:40 / janfrog"
!
typeResolver
^platform typeResolver
"Created: / 18-02-2008 / 15:30:32 / janfrog"
!
unixLibraryName
^ unixLibraryName
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
unixLibraryName:something
unixLibraryName := something.
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
win32LibraryName
^ win32LibraryName
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
win32LibraryName:something
win32LibraryName := something.
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!GeneratorCommand methodsFor:'processing'!
process
self platform typeResolver process: definitions.
self platform typeMapper process: definitions using: self mappings.
^self platform generator
unixLibraryName: unixLibraryName;
win32LibraryName: win32LibraryName;
process: definitions.
"Created: / 18-02-2008 / 15:25:54 / janfrog"
"Modified: / 10-07-2008 / 09:08:18 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!GeneratorCommand class methodsFor:'documentation'!
version
^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__GeneratorCommand.st,v 1.1 2008/02/26 15:58:30 vranyj1 Exp $'
! !