Cface__Platform.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 10 Jul 2008 20:56:08 +0000
changeset 6 ae25dce94003
parent 1 b6c0180314d1
child 14 1f730d82496e
permissions -rw-r--r--
Added SVNMapping. Now it is able to parse libsvn.def

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

"{ NameSpace: Cface }"

Object subclass:#Platform
	instanceVariableNames:''
	classVariableNames:'TheInstance'
	poolDictionaries:''
	category:'Cface-Platforms'
!


!Platform class methodsFor:'accessing'!

theInstance

    TheInstance ifNil:
        [Smalltalk isSmalltalkX 
            ifTrue:[TheInstance := SmalltalkX new]
            ifFalse:[self error:'Unsupported platform']].
    ^TheInstance

    "Created: / 08-02-2008 / 08:17:48 / janfrog"
! !

!Platform methodsFor:'accessing'!

generator

    ^self generatorClass new

    "Created: / 18-02-2008 / 15:31:25 / janfrog"
!

generatorCommand

    ^GeneratorCommand new platform: self

    "Created: / 18-02-2008 / 15:34:28 / janfrog"
!

mappings
    ^ self mappingClass new

    "Created: / 27-05-2008 / 14:23:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

parser

    ^self parserClass

    "Created: / 18-02-2008 / 15:38:41 / janfrog"
!

typeMapper

    ^self typeMapperClass new

    "Created: / 18-02-2008 / 15:32:12 / janfrog"
!

typeResolver

    ^self typeResolverClass new

    "Created: / 18-02-2008 / 15:32:05 / janfrog"
! !

!Platform methodsFor:'accessing - classes'!

generatorClass
    "raise an error: must be redefined in concrete subclass(es)"

    ^ self subclassResponsibility

    "Created: / 18-02-2008 / 15:31:35 / janfrog"
!

mappingClass

    ^TypeMapping

    "Created: / 27-05-2008 / 14:22:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

parserClass


    ^CDefinitionParser

    "Created: / 18-02-2008 / 15:38:12 / janfrog"
!

typeMapperClass
    "raise an error: must be redefined in concrete subclass(es)"

    ^TypeMapper

    "Created: / 18-02-2008 / 15:31:55 / janfrog"
!

typeResolverClass
    "raise an error: must be redefined in concrete subclass(es)"

    ^TypeResolver

    "Created: / 18-02-2008 / 15:31:46 / janfrog"
! !

!Platform class methodsFor:'documentation'!

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