Cface__TypeMapping.st
changeset 6 ae25dce94003
parent 5 c110eef5b9ef
child 7 75608e40c6da
equal deleted inserted replaced
5:c110eef5b9ef 6:ae25dce94003
     1 "{ Package: 'cvut:fel/cface' }"
     1 "{ Package: 'cvut:fel/cface' }"
     2 
     2 
     3 "{ NameSpace: Cface }"
     3 "{ NameSpace: Cface }"
     4 
     4 
     5 Object subclass:#TypeMapping
     5 Object subclass:#TypeMapping
     6 	instanceVariableNames:'smalltalkPackage'
     6 	instanceVariableNames:'smalltalkPackage smalltalkNamespace'
     7 	classVariableNames:''
     7 	classVariableNames:''
     8 	poolDictionaries:''
     8 	poolDictionaries:''
     9 	category:'Cface-Mappings'
     9 	category:'Cface-Mappings'
    10 !
    10 !
    11 
    11 
    31     "Created: / 03-07-2008 / 22:09:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
    31     "Created: / 03-07-2008 / 22:09:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
    32 !
    32 !
    33 
    33 
    34 smalltalkCategoryForDerivedType:cType 
    34 smalltalkCategoryForDerivedType:cType 
    35 
    35 
    36     ^self smalltalkNamespace , ' - C Types'
    36     ^(self smalltalkNamespaceForDerivedType: cType) , ' - C Types'
    37 
    37 
    38     "Created: / 10-07-2008 / 08:06:58 / Jan Vrany <vranyj1@fel.cvut.cz>"
    38     "Created: / 10-07-2008 / 08:06:58 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
    39     "Modified: / 10-07-2008 / 20:30:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
    39 !
    40 !
    40 
    41 
    41 smalltalkCategoryForEnum: enum
    42 smalltalkCategoryForEnum: enum
    42 
    43 
    43     ^self smalltalkNamespace , ' - Constants'
    44     ^self smalltalkNamespace , ' - Constants'
    62 
    63 
    63     "Created: / 10-07-2008 / 08:06:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
    64     "Created: / 10-07-2008 / 08:06:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
    64 !
    65 !
    65 
    66 
    66 smalltalkClassNameForDerivedType:cType 
    67 smalltalkClassNameForDerivedType:cType 
    67     ^ self smalltalkize:cType cName
    68     ^ (self smalltalkize:cType cName) capitalized asSymbol
    68 
    69 
    69     "Created: / 10-07-2008 / 08:05:42 / Jan Vrany <vranyj1@fel.cvut.cz>"
    70     "Created: / 10-07-2008 / 08:05:42 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
    71     "Modified: / 10-07-2008 / 20:29:30 / Jan Vrany <vranyj1@fel.cvut.cz>"
    70 !
    72 !
    71 
    73 
    72 smalltalkClassNameForEnum:cEnum 
    74 smalltalkClassNameForEnum:cEnum 
    73     ^ self smalltalkClassNameForDerivedType:cEnum
    75     ^ self smalltalkClassNameForDerivedType:cEnum
    74 
    76 
   124     "Created: / 17-02-2008 / 21:22:15 / janfrog"
   126     "Created: / 17-02-2008 / 21:22:15 / janfrog"
   125 !
   127 !
   126 
   128 
   127 smalltalkNamespace
   129 smalltalkNamespace
   128 
   130 
   129     ^#Smalltalk
   131     ^smalltalkNamespace ? #Smalltalk
   130 
   132 
   131     "Created: / 17-02-2008 / 20:51:05 / janfrog"
   133     "Created: / 17-02-2008 / 20:51:05 / janfrog"
       
   134     "Modified: / 10-07-2008 / 20:34:14 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   135 !
       
   136 
       
   137 smalltalkNamespace:something
       
   138     smalltalkNamespace := something.
       
   139 
       
   140     "Created: / 10-07-2008 / 20:23:36 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   141 !
       
   142 
       
   143 smalltalkNamespaceForDerivedType: cType
       
   144 
       
   145     ^self smalltalkNamespace
       
   146 
       
   147     "Created: / 10-07-2008 / 20:23:22 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   148 !
       
   149 
       
   150 smalltalkNamespaceForEnum: cType
       
   151 
       
   152     ^self smalltalkNamespaceForDerivedType: cType
       
   153 
       
   154     "Created: / 10-07-2008 / 20:24:08 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   155 !
       
   156 
       
   157 smalltalkNamespaceForFunction: cType
       
   158 
       
   159     ^self smalltalkNamespaceForDerivedType: cType
       
   160 
       
   161     "Created: / 10-07-2008 / 20:24:08 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   162 !
       
   163 
       
   164 smalltalkNamespaceForStruct: cType
       
   165 
       
   166     ^self smalltalkNamespaceForDerivedType: cType
       
   167 
       
   168     "Created: / 10-07-2008 / 20:24:50 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   169 !
       
   170 
       
   171 smalltalkNamespaceForUnion: cType
       
   172 
       
   173     ^self smalltalkNamespaceForDerivedType: cType
       
   174 
       
   175     "Created: / 10-07-2008 / 20:24:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
   132 !
   176 !
   133 
   177 
   134 smalltalkPackage
   178 smalltalkPackage
   135     ^ smalltalkPackage
   179     ^ smalltalkPackage
   136 
   180