Esempio n. 1
0
 def qualified_superclass(self):
     if self.page.superclass is None:
         return BASE_PAGE_CLASS
     else:
         super_namespace = util.get_namespace(self.page.superclass)
         super_name = mutable_page_name(util.strip_namespace(self.page.superclass))
         return util.qualified_name(super_namespace, super_name)
Esempio n. 2
0
 def qualified_superclass(self):
     if self.tome.superclass is None:
         return AS3_MUTABLE_TYPENAMES[s.TomeType]
     else:
         super_namespace = util.get_namespace(self.tome.superclass)
         super_name = mutable_tome_name(util.strip_namespace(self.tome.superclass))
         return util.qualified_name(super_namespace, super_name)
Esempio n. 3
0
 def from_qualified_name(cls, lib, name):
     namespace = util.get_namespace(name)
     name = util.strip_namespace(name)
     # In the python microtome runtime, tomes are stored in their own individual modules -
     # e.g. 'from game.data.BaddieTome import BaddieTome' - so we account for that here
     if is_tome_name(lib, name):
         namespace += "." + name
     return ImportView(namespace, name)
Esempio n. 4
0
def get_objc_typename(the_type, pointer_type=True):
    '''converts a microtome typename to an objective-c typename'''
    if the_type in OBJC_TYPENAMES:
        typename = OBJC_TYPENAMES[the_type]
    else:
        typename = the_type

    if not the_type in s.PRIMITIVE_TYPES and pointer_type:
        typename += "*"

    return util.strip_namespace(typename)
Esempio n. 5
0
def is_tome_name(lib, the_type):
    return (util.strip_namespace(the_type) in [tome_spec.name for tome_spec in lib.tomes])
Esempio n. 6
0
 def parent_interface(self):
     return util.strip_namespace(self.qualified_parent_interface)
Esempio n. 7
0
 def superclass(self):
     return util.strip_namespace(self.qualified_superclass)
Esempio n. 8
0
 def typename(self):
     return util.strip_namespace(self.qualified_typename)
Esempio n. 9
0
 def all_typenames(self):
     return [util.strip_namespace(name) for name in self.qualified_typenames(True)]
Esempio n. 10
0
 def mutable_name(self):
     return util.strip_namespace(self.get_qualified_name(True))
Esempio n. 11
0
 def name(self):
     return util.strip_namespace(self.get_qualified_name(False))
Esempio n. 12
0
def mutable_tome_name(tome_name):
    return util.qualified_name(util.get_namespace(tome_name),
                               "Mutable" + util.strip_namespace(tome_name))
Esempio n. 13
0
def is_page_name(lib, the_type):
    return (util.strip_namespace(the_type) in [page_spec.name for page_spec in lib.pages])